Friday, 24 January 2020

How do we troubleshoot SMTP connectivity or timeout issues with Amazon SES

My Amazon Simple Email Service (Amazon SES) Simple Mail Transfer Protocol (SMTP) is timing out. How do I resolve SMTP connectivity or timeout errors with Amazon SES? 




Run telnet or netcat (nc) commands, similar to the following:

telnet email-smtp.us-east-1.amazonaws.com 587 telnet email-smtp.us-east-1.amazonaws.com 25 telnet email-smtp.us-east-1.amazonaws.com 465

nc -vz email-smtp.us-east-1.amazonaws.com 587 nc -vz email-smtp.us-east-1.amazonaws.com 25 nc -vz email-smtp.us-east-1.amazonaws.com 465


Note the output. For example, if the connection is successful, then the telnet command returns an output similar to the following:


Trying 35.170.126.22... Connected to email-smtp.us-east-1.amazonaws.com. Escape character is '^]'. 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-A12BCD3EF example0mJncW410pSau


If the connection times out, then the telnet command returns an output similar to the following:

Trying 18.232.32.150... telnet: connect to address 18.232.32.150: Connection timed out


If the connection times out, confirm that your local firewall rules, routes, and access control lists (ACLs) allow traffic on the SMTP port that you're using. Additionally, confirm that your sending application has access to the internet.
For example, if you're using an Amazon Elastic Compute Cloud (Amazon EC2) instance to send emails and connect to the SMTP endpoint, then check the following:
Note: By default, Amazon EC2 throttles traffic on SMTP port 25 for all instances. If you continue to receive timeout errors using SMTP port 25, you can request that the throttle be removed. Or, you can change the port that's used for sending emails. For example, you can use port 587 instead.

No comments:

Post a Comment