Difference between revisions of "POP3"

From Ilianko
(Created page with "https://unix.stackexchange.com/questions/201818/checking-pop-mail-account-using-terminal Свързване към pop3 $ <code><pre> telnet pop.gmx.net 110 Trying 212.227.1...")
 
Line 14: Line 14:
 
-ERR Error retrieving your GMX emails. Your connection is not encrypted. Enable SSL in your mail program. Instructions: https://ssl.gmx.net
 
-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.
 
Connection closed by foreign host.
 
+
</pre></code>
 
Well, this failed because most mail server require a SSL/TLS encrypted session nowadays. So instead of using telnet you can use socat:
 
Well, this failed because most mail server require a SSL/TLS encrypted session nowadays. So instead of using telnet you can use socat:
 
+
<code><pre>
 
$ socat - OPENSSL:pop.gmx.net:995
 
$ socat - OPENSSL:pop.gmx.net:995
 
+OK POP server ready H migmx113 0MC062-1Yzese0KO7-00AVNE
 
+OK POP server ready H migmx113 0MC062-1Yzese0KO7-00AVNE
Line 23: Line 23:
 
PASS typeyourpassword
 
PASS typeyourpassword
 
+OK mailbox "spamaccount80@gmx.de" has 13518 messages (191718918 octets) H migmx113
 
+OK mailbox "spamaccount80@gmx.de" has 13518 messages (191718918 octets) H migmx113
 +
</pre></code>
  
 
If you type a wrong password, the server will probably say something like:
 
If you type a wrong password, the server will probably say something like:
Line 29: Line 30:
  
 
Or instead of socat you probably have openssl laying around:
 
Or instead of socat you probably have openssl laying around:
 
+
<code><pre>
 
$ openssl s_client -quiet -connect pop.gmx.net:995
 
$ 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
 
depth=2 C = DE, O = Deutsche Telekom AG, OU = T-TeleSec Trust Center, CN = Deutsche Telekom Root CA 2
Line 35: Line 36:
 
verify return:0
 
verify return:0
 
+OK POP server ready H migmx108 0MWpjO-1YiwnK3ZfP-00XoK
 
+OK POP server ready H migmx108 0MWpjO-1YiwnK3ZfP-00XoK
 
+
</pre></code>
 
Share
 
Share
 
Edit
 
Edit

Revision as of 12:04, 26 February 2021

https://unix.stackexchange.com/questions/201818/checking-pop-mail-account-using-terminal

Свързване към 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.

Well, this failed because most mail server require a SSL/TLS encrypted session nowadays. So instead of using telnet you can use 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

If you type a wrong password, the server will probably say something like:

-ERR authentication failed

Or instead of socat you probably have openssl laying around:

$ 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

Share Edit Follow edited May 7 '15 at 6:16 answered May 6 '15 at 19:28 FloHimself 9,18733 gold badges1515 silver badges2323 bronze badges

   Might be worth including the command line for plain ol' POP3 without SSL – roaima May 6 '15 at 22:44
   1
   @roaima Good remark. I've added telnet and openssl examples. – FloHimself May 7 '15 at 6:12

Add a comment 6

If you want to check your pop3 mail accounts then take a look at the following terminal mail clients:

   pine
   alpine
   mutt