Difference between revisions of "Check IMAP and POP with OpenSSL"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) (→IMAP) |
Michael.mast (talk | contribs) (→Gmail) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==IMAP== | ==IMAP== | ||
===Gmail=== | ===Gmail=== | ||
− | <ref>https://donsutherland.org/crib/imap</ref><ref>http://stackoverflow.com/questions/14959461/how-to-talk-to-imap-server-in-shell-via-openssl</ref><ref>http://busylog.net/telnet-imap-commands-note/</ref><ref>https://social.msdn.microsoft.com/Forums/en-US/9ac90ca5-e527-4372-98da-d7056818ebe2/imap-command-for-delete-the-mail-from-gmail-using-uid?forum=csharpgeneral</ref>Currently I have little understanding as to what I am looking at. More specifically I do not know what the "-crlf" in openssl does or | + | <ref>https://donsutherland.org/crib/imap</ref><ref>http://stackoverflow.com/questions/14959461/how-to-talk-to-imap-server-in-shell-via-openssl</ref><ref>http://busylog.net/telnet-imap-commands-note/</ref><ref>https://social.msdn.microsoft.com/Forums/en-US/9ac90ca5-e527-4372-98da-d7056818ebe2/imap-command-for-delete-the-mail-from-gmail-using-uid?forum=csharpgeneral</ref><s>Currently I have little understanding as to what I am looking at. More specifically I do not know what the "-crlf" in openssl does or</s> |
+ | <br> | ||
+ | <br> | ||
+ | <ref>https://blog.yimingliu.com/2009/01/23/testing-a-pop3-server-via-telnet-or-openssl/</ref> | ||
+ | <i>The second incantation is typically used for Microsoft Exchange servers. Note the -crlf option, which tells s_client to send \r\n line endings. If the wrong line ending is used for a server, the symptom is that the server will not respond to any commands. It will only sit there and wait for further input, while you are staring at a blank responses or blank lines in your telnet session.</i> | ||
<pre> | <pre> | ||
openssl s_client -connect imap.gmail.com:993 -crlf | openssl s_client -connect imap.gmail.com:993 -crlf | ||
Line 27: | Line 31: | ||
==POP3== | ==POP3== | ||
+ | ===Office365=== | ||
<ref>http://www.suburbancomputer.com/tips_email.htm</ref> | <ref>http://www.suburbancomputer.com/tips_email.htm</ref> | ||
<pre> | <pre> | ||
Line 39: | Line 44: | ||
==SMTP== | ==SMTP== | ||
+ | ===Office365=== | ||
<ref>http://www.samlogic.net/articles/smtp-commands-reference-auth.htm</ref> | <ref>http://www.samlogic.net/articles/smtp-commands-reference-auth.htm</ref> | ||
<pre> | <pre> |
Latest revision as of 15:25, 19 September 2017
IMAP
Gmail
[1][2][3][4]Currently I have little understanding as to what I am looking at. More specifically I do not know what the "-crlf" in openssl does or
[5]
The second incantation is typically used for Microsoft Exchange servers. Note the -crlf option, which tells s_client to send \r\n line endings. If the wrong line ending is used for a server, the symptom is that the server will not respond to any commands. It will only sit there and wait for further input, while you are staring at a blank responses or blank lines in your telnet session.
openssl s_client -connect imap.gmail.com:993 -crlf a login <username> <password> a select inbox a FETCH 1 (FLAGS BODY[HEADER.FIELDS (subject)]) a store 1 +flags /deleted a expunge a close a logout
Office365
openssl s_client -connect outlook.office365.com:993 -crlf a login <username> <password> a select inbox a FETCH 1 (FLAGS BODY[HEADER.FIELDS (subject)]) a store 1 +flags /deleted a expunge a close a logout QUIT
POP3
Office365
openssl s_client -connect outlook.office365.com:995 -crlf USER user@yourdamin.com PASS yourpassword LIST STAT RETR message# QUIT
SMTP
Office365
openssl s_client -starttls smtp -connect smtp.office365.com:587 -crlf 250 CHUNKING ehlo 250-DM5PR04CA0045.outlook.office365.com Hello [64.191.109.50] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH LOGIN 250-8BITMIME 250-BINARYMIME 250 CHUNKING auth login 334 VXNlcm5hbWU6
- ↑ https://donsutherland.org/crib/imap
- ↑ http://stackoverflow.com/questions/14959461/how-to-talk-to-imap-server-in-shell-via-openssl
- ↑ http://busylog.net/telnet-imap-commands-note/
- ↑ https://social.msdn.microsoft.com/Forums/en-US/9ac90ca5-e527-4372-98da-d7056818ebe2/imap-command-for-delete-the-mail-from-gmail-using-uid?forum=csharpgeneral
- ↑ https://blog.yimingliu.com/2009/01/23/testing-a-pop3-server-via-telnet-or-openssl/
- ↑ http://www.suburbancomputer.com/tips_email.htm
- ↑ http://www.samlogic.net/articles/smtp-commands-reference-auth.htm