exim4:test_sending_emails
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exim4:test_sending_emails [2016/11/02 12:44] – peter | exim4:test_sending_emails [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Exim4 - Test sending emails ====== | ====== Exim4 - Test sending emails ====== | ||
- | Try | + | ===== Using Telnet ===== |
+ | |||
+ | <code bash> | ||
+ | telnet localhost 25 | ||
+ | </ | ||
+ | |||
+ | Result | ||
+ | |||
+ | < | ||
+ | Trying 127.0.0.1… | ||
+ | Connected to localhost. | ||
+ | Escape character is ‘^]’. | ||
+ | 220 mail.sharewiz.net ESMTP exim | ||
+ | ehlo client | ||
+ | 250-mail.sharewiz.net | ||
+ | 250-PIPELINING | ||
+ | 250-SIZE 10240000 | ||
+ | 250-ETRN | ||
+ | 250-STARTTLS | ||
+ | 250-ENHANCEDSTATUSCODES | ||
+ | 250-8BITMIME | ||
+ | 250 DSN | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Using openssl ===== | ||
+ | |||
+ | <code bash> | ||
+ | % openssl s_client -starttls smtp -connect mail.sharewiz.net: | ||
+ | </ | ||
+ | |||
+ | Result | ||
+ | |||
+ | < | ||
+ | 250 DSN | ||
+ | ehlo client | ||
+ | 250-mail.sharewiz.net | ||
+ | 250-PIPELINING | ||
+ | 250-SIZE 10240000 | ||
+ | 250-ETRN | ||
+ | 250-AUTH PLAIN LOGIN | ||
+ | 250-AUTH=PLAIN LOGIN | ||
+ | 250-ENHANCEDSTATUSCODES | ||
+ | 250-8BITMIME | ||
+ | 250 DSN | ||
+ | auth login | ||
+ | 334 VXNlcm5hbWU6 | ||
+ | Y2xlbWVudEBmb3J1bWFuYWxvZ3VlLmZy | ||
+ | 334 UGFzc3dvcmQ6 | ||
+ | Q2xlbWVudDAx | ||
+ | DONE | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Using swaks ===== | ||
+ | |||
+ | <code bash> | ||
+ | apt-get install swaks libnet-ssleay-perl | ||
+ | </ | ||
+ | |||
+ | Test the connection: | ||
+ | |||
+ | <code bash> | ||
+ | swaks -a -tls -q HELO -s localhost -au your_user -ap '<>' | ||
+ | </ | ||
+ | |||
+ | Result | ||
+ | |||
+ | < | ||
+ | === Trying localhost: | ||
+ | === Connected to localhost. | ||
+ | < | ||
+ | -> EHLO debianwb | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | -> STARTTLS | ||
+ | < | ||
+ | === TLS started w/ cipher DHE-RSA-AES256-SHA | ||
+ | ~> EHLO debianwb | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | ~> QUIT | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Note that above we are sending an empty password while testing with the swaks tool. | ||
+ | |||
+ | |||
+ | ===== Sending a test email ===== | ||
Sending a mail from command line with: | Sending a mail from command line with: | ||
Line 39: | Line 132: | ||
- | Using a PHP script | + | ===== Using a PHP script |
IPs may be different so run **dig smtp.sharewiz.net** and use the IPs it returns instead. | IPs may be different so run **dig smtp.sharewiz.net** and use the IPs it returns instead. |
exim4/test_sending_emails.1478090670.txt.gz · Last modified: 2020/07/15 09:30 (external edit)