mail:test-smtp-auth-telnet
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mail:test-smtp-auth-telnet [2011-07-01 12:06:50] – Approved garrett.plasky | mail:test-smtp-auth-telnet [2017-01-04 10:01:49] (current) – rory.blanchard | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| The first thing you need to do is get a base64 encoding of your username and password. There are a couple ways to do this, the example below uses Perl: | The first thing you need to do is get a base64 encoding of your username and password. There are a couple ways to do this, the example below uses Perl: | ||
| - | <sxh shell>perl -MMIME:: | + | <code> |
| - | perl -MMIME:: | + | perl -MMIME:: |
| + | perl -MMIME:: | ||
| + | </code> | ||
| + | < | ||
| + | If you have any special characters such as @ or ' or ! you must put \ in front of it to escape the character. | ||
| + | </ | ||
| What will be returned from each command is a base64 encoding of the username and password; save these as you will need them later. Now connect to the mail server using Telnet: | What will be returned from each command is a base64 encoding of the username and password; save these as you will need them later. Now connect to the mail server using Telnet: | ||
| - | <sxh shell>telnet mailserver.com 25</sxh> | + | <code> |
| + | telnet mailserver.com 25 | ||
| + | </code> | ||
| Greet the mail server: | Greet the mail server: | ||
| - | <sxh shell>EHLO mailserver.com</ | + | <code> |
| + | EHLO mailserver.com | ||
| + | </code> | ||
| Tell the server you want to authenticate with it: | Tell the server you want to authenticate with it: | ||
| - | <sxh shell>AUTH LOGIN</sxh> | + | <code> |
| + | AUTH LOGIN | ||
| + | </code> | ||
| The server should have returned < | The server should have returned < | ||
| - | <sxh plain> | + | <code> |
| + | dXNlcm5hbWUuY29t | ||
| + | </code> | ||
| Now the server should have returned < | Now the server should have returned < | ||
| - | <sxh plain> | + | <code> |
| + | bXlwYXNzd29yZA== | ||
| + | </code> | ||
| Now you should have received a message telling you that you successfully authenticated. If it failed your user/pass may have been wrong or your mailserver is broken. | Now you should have received a message telling you that you successfully authenticated. If it failed your user/pass may have been wrong or your mailserver is broken. | ||
| Line 33: | Line 48: | ||
| Below is a log of a real successful SMTP AUTH connection over Telnet: | Below is a log of a real successful SMTP AUTH connection over Telnet: | ||
| - | <sxh plain> | + | <code> |
| Trying 1.1.1.1... | Trying 1.1.1.1... | ||
| Connected to exampledomain.com (1.1.1.1). | Connected to exampledomain.com (1.1.1.1). | ||
| Line 53: | Line 68: | ||
| bXlwYXNzd29yZA== | bXlwYXNzd29yZA== | ||
| - | 235 Authentication succeeded</ | + | 235 Authentication succeeded |
| + | </code> | ||
| {{tag> | {{tag> | ||
mail/test-smtp-auth-telnet.txt · Last modified: by rory.blanchard
