Postfix gets email kicked back from external email servers

December 31, 2016 107 views
Email Nginx PHP Ubuntu 16.04

I've configured postfix on my Ubuntu 16.04 server that is running a LEMP stack. My websites are sending the email to the postfix daemon which is attempting to deliver to the remote servers.

My /var/log/mail.log is full of entries like this:

Dec 31 01:42:53 web02 postfix/smtp[2465]: 84EA7FCF22: to=xxxxx@gmail.com, relay=gmail-smtp-in.l.google.com[74.125.29.26]:25, delay=0.26, delays=0.01/0.02/0.13/0.1, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[74.125.29.26] said: 550-5.7.1 [45.55.254.144 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 https://support.google.com/mail/?p=UnsolicitedMessageError 550 5.7.1 for more information. e2si35713566qta.253 - gsmtp (in reply to end of DATA command))

Emails are not being delivered to website users.

The postfix is set to use the hostname of the server, which differs from the domains of the websites. All the websites on this server are affected. The public DNS system points the hostname of the server to the IP address of the server. The link in the log entry is useless... not aimed at server admins at all.

Any help would be much appreciated.

1 Answer

Is your mail server in an RBL?

What address are the emails being sent from? as 550 5.7.1 can be relay denied.

Considering the error is thrown after the end of the data command, the content of this mail be be seen as legitimate spam by gmail.

I would recommend testing the SMTP transaction using telnet and the exact from address used by your server.

Regarrrrrrrrrds, pyrate ;0

Have another answer? Share your knowledge.