0

I have little experience with SMTPs and have come across some trouble getting my Drupal site to send out emails. The only change that had been made prior to the error was adding a CloudFront to instance. Then months later we changed the email recipient and it stopped working.

Log error from var/log/maillog:

Feb  1 20:27:43 ip-10-0-0-127: from=apache, size=860, class=0, nrcpts=3, msgid=<2017@ip-10-0-0-127>, relay=apache@localhost

Feb  1 20:27:44 ip-10-0-0-127: from=<apache@ip-10-0-0-127>, size=1043, class=0, nrcpts=3, msgid=<2017@ip-10-0-0-127>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]

Feb  1 20:27:44 ip-10-0-0-127: [email protected],[email protected],[email protected], ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=90860, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Message accepted for delivery)

Feb  1 20:27:49 ip-10-0-0-127: STARTTLS=client, relay=mail-in.cc.l.columbia.edu., version=TLSv1/SSLv3, verify=FAIL, cipher=, bits=256/256

Feb  1 20:27:49 ip-10-0-0-127: to=<[email protected]>,<[email protected]>,<[email protected]>, ctladdr=<apache@ip-10-0-0-127> (48/48), delay=00:00:06, xdelay=00:00:05, mailer=esmtp, pri=181043, relay=mail-in.cc.l.columbia.edu. [128.00.000.000], dsn=5.6.0, stat=Data format error

Feb  1 20:27:49 ip-10-0-0-127: DSN: Data format error

Feb  1 20:27:49 ip-10-0-0-127: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32235, dsn=2.0.0, stat=Sent

And the following after removing the Throttle from port 25:

to=<[email protected]>, delay=00:16:00, xdelay=00:16:00, mailer=esmtp, pri=34406, relay=xxxxxxx.cloudfront.net. [54.192.19.124], dsn=4.0.0, stat=Deferred: Connection timed out with xxxxxxx.cloudfront.net.

adsl-static.isp.belgacom.be [81.xxx.xx.xx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

Fems.dsrtg.gov.tw [117.xx.xxx.xxx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

On AWS's Security Group I opened up ports for SMTP 25 and SMTPS 465:

netstat -ntlp | grep sendmail
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
2180/sendmail

Reference: http://www.golinuxhub.com/2013/06/statdeferred-connection-timed-out.html

Changed my sendmail.mc fileto the following:

DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

Copied over the changes and restarted the mail service using:

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

Changed my ect/host file to:

127.0.0.1 localhost
54.192.37.15 site.school.edu site

Reference: https://www.drupal.org/node/1155

One last thing I forgot to mention! The domain name is pointing to the site.cloudfront.net domain name. Hope this helps.

Is there anything else I'm missing that could help with the issue?

Thanks,

3
  • 1
    I'd look into that data format error. I'm not sure this has anything to do with AWS, it seems like an application or Sendmail issue. You could use Amazon SES to send those emails.
    – Tim
    Feb 1, 2017 at 21:32
  • This is how I did email delivery on EC2, using SSMTP. This is send only, not receive: photographerstechsupport.com/tutorials/…
    – Tim
    Feb 1, 2017 at 21:48
  • Why is it using an incomplete domain suffix? from=<apache@ip-10-0-0-127 doesn't look right and some downstream MTAs may not like it.
    – Mike B
    Feb 2, 2017 at 8:50

1 Answer 1

3

Cloudfront has no bearing on SMTP.

Amazon throttles outgoing SMTP as part of spam blocking: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/

You can request to have the throttle lifted off of a link from that page.

2
  • 1
    Both of these things are true and the throttling will kick in soon... but the DSN error is coming from the bad sender address. Also mentioned in this not quite duplicate. Feb 3, 2017 at 0:27
  • I have removed the throttle but it doesn't seem to have solved the issue. I am receiving the following after the error message posted above: to=<[email protected]>, delay=00:16:00, xdelay=00:16:00, mailer=esmtp, pri=34406, relay=xxxxxxx.cloudfront.net. [54.192.19.124], dsn=4.0.0, stat=Deferred: Connection timed out with xxxxxxx.cloudfront.net. adsl-static.isp.belgacom.be [81.xxx.xx.xx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Fems.dsrtg.gov.tw [117.xx.xxx.xxx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA I will also update my question.
    – Lgalan90
    Feb 22, 2017 at 16:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .