My mailbox cannot receive emails from machines in the US West (Oregon) us-west-2 region

1

The machine configuration and email configuration are the same. Machines in other areas can receive emails sent using the command line, and the emails are stored in the trash. That is, the emails sent in this area cannot receive emails. Two Ubuntu system instances in this area are tested Yes, the log report was sent successfully,

echo -e "Subject: Your Subject Here\n\nThis is the body of the email." | sendmail zh@acc.com

"sendmail[5633]: 38179AMm005633: to=zh@acc.com, ctladdr=ubuntu (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer= relay, pri=30059, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (38179AgZ005634 Message accepted for delivery)”

echo -e "$acc\n$fail\n$Sudo\n ---- $date" | mail -s " PROD2 Systems Logs " -a FROM:Logs@acclivityhealth.com zh@acc.com "3816aN6x2730326: from=Logs@acc.com, size=197, class=0, nrcpts=1, msgid=202309010636.3816aN6x2730326@ip-172-31-11-114.us-west-2.compute.internal, relay=ubuntu@localhost Sep 1 06:36:23 ip-172-31-11-114 sm-mta[2730327]: 3816aNnM2730327: from=Logs@acc.com, size=565, class=0, nrcpts=1, msgid=< 202309010636.3816aN6x2730326@ip-172-31-11-114.us-west-2.compute.internal>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Sep 1 06:36:23 ip-172-31-11-114 sendmail[2730326]: 3816aN6x2730326: to=zhi@acc.com, ctladdr=Logs@acclivityhealth.com (1000/1000), delay=00: 00:00, xdelay=00:00:00, mailer=relay, pri=30197, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (3816aNnM2730327 Message accepted for delivery) Sep 1 06:36:41 ip-172-31-11-114 sm-mta[2729660]: 3816WfFA2729658: to=zh@acc.com, ctladdr=<ubuntu@ip-172-31-11-114. us-west-2.compute.internal> (1000/1000), delay=00:04:00, xdelay=00:04:00, mailer=esmtp, pri=120440, relay=acclivityhealth-co...ction. outlook.com. [104.47.58.110], dsn=4.0.0, stat=Deferred: Connection timed out with accessibilityhealth-com.mail.protection.outlook.com.”

DD-Boom
asked 8 months ago181 views
1 Answer
0

I understand that you're encountering email delivery issues specifically with Amazon EC2 instances located in the US West (Oregon) us-west-2 region. The provided logs indicate that while the emails are accepted for delivery, they are subsequently deferred with a "Connection timed out" error when attempting to send.

First, it's important to note that Amazon EC2, by default, imposes restrictions on egress traffic on port 25 for all instances. If your application requires traffic on SMTP port 25, you can request the removal of this restriction.

Since you have instances in more than one Region and you are experiencing issues with specifically in US West (Oregon) us-west-2 region, then submit a separate request for US West (Oregon) us-west-2 region. Please note if you have instances in more than one Region, then submit a separate request for each Region.

You'll receive an email with the Request ID after submitting the request form. It might take up to 48 hours to process your request. If your request is approved, you receive an email to notify you that the port 25 restriction is removed. If you don't receive an update within 48 hours after submitting the request, reply to the initial email that you received.

Now, let's delve into some troubleshooting steps:

  1. Confirm that your EC2 instances in the us-west-2 region have proper network connectivity to both the internet and the mail servers. Replace email-smtp.us-west-2.amazonaws.com with the mail server/SMTP endpoint. You can use commands like telnet or netcat (nc) to test connectivity on the relevant SMTP ports (25, 587, 465).
telnet email-smtp.us-west-2.amazonaws.com 587
telnet email-smtp.us-west-2.amazonaws.com 25
telnet email-smtp.us-west-2.amazonaws.com 465

nc -vz email-smtp.us-west-2.amazonaws.com 587
nc -vz email-smtp.us-west-2.amazonaws.com 25
nc -vz email-smtp.us-west-2.amazonaws.com 465

Or, in PowerShell:

Test-NetConnection -Port 587 -ComputerName email-smtp.us-west-2.amazonaws.com
  1. Please ensure that neither your security groups nor network ACLs are blocking outbound email traffic from the us-west-2 region to the mail server. Here are the key points to verify:

    • Outbound rules in security groups must allow traffic to the SMTP server on TCP ports 25, 587, or 465.
    • Network ACL outbound rules should also permit traffic to the SMTP server on the same ports.
    • Inbound network ACL rules should allow traffic from the SMTP server on TCP ports 1024-65535.
    • Confirm that your EC2 instance has proper internet connectivity.
  2. Double-check that you're using the correct SMTP port and protocol settings for sending emails. Typically, as you might be aware SMTP uses port 25 or 587.

  3. Please ensure that your EC2 instances present in us-west-2 region can perform DNS resolution correctly. You can use tools like "nslookup" to test DNS resolution.

If the issue persists after these steps, it's advisable to contact the AWS Support Team and create a case based on your Support Plan. Complex email delivery issues often require in-depth investigation and collaboration to resolve effectively.

I hope this guidance helps you address the email delivery problem you're facing with your EC2 instances in the us-west-2 region.

AWS
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions