User Tools

Site Tools


email:test_smtp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
email:test_smtp [2016/07/04 18:51] โ€“ created peteremail:test_smtp [2019/11/27 22:15] (current) โ€“ removed peter
Line 1: Line 1:
-====== Email - Test SMTP ====== 
- 
-===== Connect to server ===== 
- 
-For non-secure SMTP, you can use 
- 
-<code bash> 
-telnet example.com 25 
-</code> 
- 
-For secure SMTP, you can use one of following: 
- 
-<code bash> 
-openssl s_client -starttls smtp -connect example.com:25 
-openssl s_client -starttls smtp -connect example.com:465 
-openssl s_client -starttls smtp -connect example.com:587 
-</code> 
- 
-As soon as you connect to the server, run: 
- 
-<code bash> 
-ehlo example.com 
-</code> 
- 
-You will get output like below as reply: 
- 
-<code> 
-250-test.rtcamp.com 
-250-PIPELINING 
-250-SIZE 10240000 
-250-VRFY 
-250-ETRN 
-250-STARTTLS 
-250-AUTH PLAIN LOGIN 
-250-ENHANCEDSTATUSCODES 
-250-8BITMIME 
-250 DSN 
-</code> 
- 
-If you do not see line like 250-AUTH ... line, then your server may not support authentication.  Most likely you will see this when trying with telnet or openssl without startls. 
- 
- 
-===== Authentication ===== 
- 
-For admin@example.com and password, generate base64 encoded string like below: 
- 
-<code bash> 
-echo -ne '\0admin@example.com\0password' | base64 
-</code> 
- 
-Please note use of **\0** before username and password.  It must be used as it is.  Also, use single-quotes to avoid escaping special characters in your password. 
- 
-It will output a string like below: 
- 
-<code> 
-AGFkbWluQGV4YW1wbGUuY29tAHBhc3N3b3Jk 
-</code> 
- 
-Use above string with AUTH command: 
- 
-<code bash> 
-AUTH PLAIN AGFkbWluQGV4YW1wbGUuY29tAHBhc3N3b3Jk 
-</code> 
- 
- 
-===== SMTP Commands to send test email ===== 
- 
-Type/paste following commands 1-by-1.  They are interactive and needs input. 
- 
-<code bash> 
-ehlo example.com 
-mail from: admin@example.com 
-rcpt to: admin@other.com 
-data 
-quit 
-</code> 
- 
-For more SMTP Tests, check http://www.stat.ufl.edu/system/mailtesting.shtml. 
- 
-===== Open-Relay Test ===== 
- 
-Worst thing that could happen to your SMTP server is โ€“ it becomes open-relay (accidentally).  An open-relay allows anybody to connect and send email using your server.  It can lead to your server being blacklisted.  I am not sure if it can result in legal hassles! 
- 
-There are many tools available online which can check if your smtp server is acting as open relay. 
- 
-===== swaks utility ===== 
- 
-This is a small package which can make it easy to test your smtp server. 
- 
-<code bash> 
-apt-get install swaks 
-</code> 
- 
-Example usage: 
- 
-<code bash> 
-swaks --server example.com --to admin@example.com 
-</code> 
- 
-Please note that SpamAssassin marks, swaks generated email as spam. 
  
email/test_smtp.1467658278.txt.gz ยท Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki