Over the weekend, I finally installed and configured my own e-mail server. What a challenge that was!
It returned with the following message:
host gmail-smtp-in.l.google.com[188.8.131.52] said:
550-5.7.1 [184.108.40.206] Our system has detected an unusual amount of unsolicited 550-5.7.1 mail originating from your IP address. To protect our
550-5.7.1 users from spam, mail sent from your IP address has been 550-5.7.1 rejected. Please visit 550-5.7.1 http://www.google.com/mail/help/bulk_mail.html to review 550 5.7.1 our Bulk Email Senders Guidelines. 39si20019987nzk (in reply to end of DATA command)
Rejected? Huh? Apparently, my IP address has been blacklisted because Google couldn’t identify my server; also because I don’t have a static IP.
To ensure that Gmail can identify you:
- Use a consistent IP address to send bulk mail.
- Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain.
- Use the same address in the ‘From:’ header on every bulk mail you send.
At this point, I don’t really want to run and maintain my own DNS server nor obtain a static IP (everything works fine and it’s cheaper!), so I found a way around it: Set Postfix to use another SMTP server.
1. Edit /etc/postfix/main.cf, and add or edit this line:
relayhost = smtp.servertouse.com
2. Restart the Postfix service (I run FC6), so:
sudo service postfix restart
That’s it! Your server will now send to the SMTP server specified above rather than sending directly to the destination, which as a result, will not be “rejected” by Gmail or the like. ;0)