Difference between revisions of "POP3"
From Ilianko
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
https://unix.stackexchange.com/questions/201818/checking-pop-mail-account-using-terminal | https://unix.stackexchange.com/questions/201818/checking-pop-mail-account-using-terminal | ||
− | Свързване към pop3 | + | Свързване към pop3 през текстов терминал: |
− | + | *telnet (за тест/вкраен случай, за връзка към localhost ресурс или към сървър във вътрешната мрежа, паролата се предава не криптирана) | |
<code><pre> | <code><pre> | ||
− | telnet | + | telnet localhost 110 |
− | Trying | + | Trying ::1... |
− | Connected to | + | Connected to localhost. |
Escape character is '^]'. | Escape character is '^]'. | ||
− | +OK | + | +OK Dovecot (Debian) ready. |
− | USER | + | USER info@example.com |
− | +OK password required for user " | + | +OK password required for user "info@example.com" |
− | PASS | + | PASS password |
− | - | + | +OK Logged in. |
+ | LIST | ||
+ | +OK 1 messages: | ||
+ | 1 1007 | ||
+ | RETR 1 | ||
+ | +OK 1007 octets | ||
+ | Return-Path: <info@example.com> | ||
+ | Delivered-To: info@example.com | ||
+ | Received: from localhost (localhost [127.0.0.1]) | ||
+ | by example.com (Postfix) with ESMTP id 421B1C04D5 | ||
+ | ... | ||
+ | Welcome to your new email account. Your webmaster. | ||
+ | . | ||
+ | DELE 1 | ||
+ | +OK Marked to be deleted. | ||
+ | QUIT | ||
+ | +OK Logging out, messages deleted. | ||
Connection closed by foreign host. | Connection closed by foreign host. | ||
</pre></code> | </pre></code> | ||
− | + | ||
+ | *socat използване на криптирана връзка ... | ||
<code><pre> | <code><pre> | ||
− | + | socat - openssl:example.com:995 | |
− | +OK | + | +OK Dovecot (Debian) ready. |
− | + | ... | |
− | |||
− | |||
− | |||
</pre></code> | </pre></code> | ||
− | + | *openssl : | |
− | |||
− | |||
− | |||
− | |||
<code><pre> | <code><pre> | ||
− | + | openssl s_client -quiet -connect example.com:995 | |
− | depth=2 | + | depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3 |
− | verify | + | verify return:1 |
− | verify return: | + | depth=1 C = US, O = Let's Encrypt, CN = R3 |
− | +OK | + | verify return:1 |
+ | depth=0 CN = erazum.com | ||
+ | verify return:1 | ||
+ | +OK Dovecot (Debian) ready. | ||
+ | ... | ||
</pre></code> | </pre></code> | ||
Share | Share |
Latest revision as of 12:25, 26 February 2021
https://unix.stackexchange.com/questions/201818/checking-pop-mail-account-using-terminal
Свързване към pop3 през текстов терминал:
- telnet (за тест/вкраен случай, за връзка към localhost ресурс или към сървър във вътрешната мрежа, паролата се предава не криптирана)
telnet localhost 110
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot (Debian) ready.
USER info@example.com
+OK password required for user "info@example.com"
PASS password
+OK Logged in.
LIST
+OK 1 messages:
1 1007
RETR 1
+OK 1007 octets
Return-Path: <info@example.com>
Delivered-To: info@example.com
Received: from localhost (localhost [127.0.0.1])
by example.com (Postfix) with ESMTP id 421B1C04D5
...
Welcome to your new email account. Your webmaster.
.
DELE 1
+OK Marked to be deleted.
QUIT
+OK Logging out, messages deleted.
Connection closed by foreign host.
- socat използване на криптирана връзка ...
socat - openssl:example.com:995
+OK Dovecot (Debian) ready.
...
- openssl :
openssl s_client -quiet -connect example.com:995
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = erazum.com
verify return:1
+OK Dovecot (Debian) ready.
...
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