Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to send email from my EC2 instance.

Regardless of the target email address the SMTP service logs show that the email is sent but it never turns up on the remote server.

I've done a blacklist check of my domain at: http://whatismyipaddress.com/blacklist-check and it returns ok.

Email to greg@netroworx.com shows the following in /var/log/maillog:

May  6 23:52:33 ip-172-31-21-52 sendmail[10534]: r46NqXPF010534: from=root, size=236, class=0, nrcpts=1, msgid=<201305062352.r46NqXPF010534@ip-172-31-21-52.ap-southeast-2.compute.internal>, relay=root@localhost
May  6 23:52:33 ip-172-31-21-52 sendmail[10535]: r46NqXit010535: from=<root@ip-172-31-21-52.ap-southeast-2.compute.internal>, size=571, class=0, nrcpts=1, msgid=<201305062352.r46NqXPF010534@ip-172-31-21-52.ap-southeast-2.compute.internal>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May  6 23:52:33 ip-172-31-21-52 sendmail[10534]: r46NqXPF010534: to=greg@netroworx.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30236, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r46NqXit010535 Message accepted for delivery)
May  6 23:52:35 ip-172-31-21-52 sendmail[10537]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128
May  6 23:52:38 ip-172-31-21-52 sendmail[10537]: r46NqXit010535: to=<greg@netroworx.com>, ctladdr=<root@ip-172-31-21-52.ap-southeast-2.compute.internal> (0/0), delay=00:00:05, xdelay=00:00:05, mailer=esmtp, pri=120571, relay=aspmx.l.google.com. [74.125.129.27], dsn=2.0.0, stat=Sent (OK 1367884358 kx5si16370724pbc.170 - gsmtp)

We have applied to have the send limits removed and Amazon have confirmed this has been done.

Where else should I look?

share|improve this question
1  
Looks like google's mail server (74.125.129.27) is accepting the mail (OK 1367884358 kx5si16370724pbc.170 - gsmtp) I'd try sending mail to another address that doesn't use gmail. –  Mark Wagner May 7 '13 at 0:05

2 Answers 2

The From: address (root@ip-172-31-21-52.ap-southeast-2.compute.internal) is not deliverable. Many mail servers will not accept mail with a From: address that is undeliverable.

You don't appear to have an Elastic IP address. All of Amazon's IP addresses are added to the Spamhaus Policy Blacklist (PBL) by default unless you attain an Elastic IP address, configure a domain to point at it and then fill out the form linked here to have Amazon configure the reverse DNS records to match the forward records you have already created. They also remove the IP addresses from the Policy Blacklist at the same time.

I wouldn't be surprised if Google had a mechanism for either querying the Spamhaus PBL or maintaining their own list.

share|improve this answer
    
I have an elastic IP –  Greg Pagendam-Turner May 7 '13 at 3:44
1  
...and on a side note, because the sender address isn't valid, NDRs from downstream servers wouldn't make their way back to the sender. –  Mike B May 7 '13 at 22:37
up vote 1 down vote accepted

The issue appeared to be related to their being no public DNS for the server's domain.

I configured sendmail to masquerade an internet visible domain name and this fixed the problem.

Edit /etc/mail/sendmail.mc

MASQUERADE_AS(`mydomnain.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(`mydomain.com')dnl

Run

m4 /etc/mail.sendmail.mc > /etc/sendmail.cf

Restart sendmail

share|improve this answer
    
This worked for me, except that I needed to execute 'sendmailconfig'. –  dirkk0 Dec 16 '13 at 17:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.