使用终端检查流行邮件帐户

Duc*_*uck 8 command-line email mail-user-agent

unix 中是否有任何命令可以使用终端检查 pop3 帐户?我的意思是,输入 pop3 帐户的服务器/用户名/密码,看看用户名/密码是否正确?

Flo*_*elf 11

您可以使用telnet连接到邮件服务器并使用POP3来检查您的凭据:

$ telnet pop.gmx.net 110
Trying 212.227.17.185...
Connected to pop.gmx.net.
Escape character is '^]'.
+OK POP server ready H migmx028 0MAbjW-1YwF4D0ml8-00BiVl
USER spamaccount80@gmx.de
+OK password required for user "spamaccount80@gmx.de"
PASS typeyourpassword
-ERR Error retrieving your GMX emails. Your connection is not encrypted. Enable SSL in your mail program. Instructions: https://ssl.gmx.net
Connection closed by foreign host.
Run Code Online (Sandbox Code Playgroud)

好吧,这失败了,因为现在大多数邮件服务器都需要SSL/TLS 加密会话。因此,telnet您可以使用socat

$ socat - OPENSSL:pop.gmx.net:995
+OK POP server ready H migmx113 0MC062-1Yzese0KO7-00AVNE
USER spamaccount80@gmx.de
+OK password required for user "spamaccount80@gmx.de"
PASS typeyourpassword
+OK mailbox "spamaccount80@gmx.de" has 13518 messages (191718918 octets) H migmx113
Run Code Online (Sandbox Code Playgroud)

如果您输入错误的密码,服务器可能会说:

-ERR authentication failed
Run Code Online (Sandbox Code Playgroud)

或者,而不是socat你可能已经openssl铺设:

$ openssl s_client -quiet -connect pop.gmx.net:995
depth=2 C = DE, O = Deutsche Telekom AG, OU = T-TeleSec Trust Center, CN = Deutsche Telekom Root CA 2
verify error:num=19:self signed certificate in certificate chain
verify return:0
+OK POP server ready H migmx108 0MWpjO-1YiwnK3ZfP-00XoK
Run Code Online (Sandbox Code Playgroud)

  • @roaima 好话。我添加了“telnet”和“openssl”示例。 (2认同)

Sai*_*ire 6

如果您想检查您的 pop3 邮件帐户,请查看以下终端邮件客户端:

  1. 松树
  2. 高山
  3. 笨蛋

还有更多,但这些是我所知道的最受欢迎的。