Linux Mail Blocked By Gmail 550

0

I have a website set up on a CentOS server which has a contact form on it set up to send mail to a gmail address.

However the mail is being blocked by google with the following error:

Diagnostic-Code: smtp; 550-5.7.1 This message does not have authentication 
information or fails to pass
    550-5.7.1 authentication checks. To best protect our users from spam, the
    550-5.7.1 message has been blocked. Please visit
    550-5.7.1  https://support.google.com/mail/answer/81126#authentication for more
    550 5.7.1 information. q16si15869511wrs.198 - gsmtp

The mail can be received by a hotmail address, however it goes into spam.

I am not sure how I can authenticate the message, I have read this page: https://support.google.com/mail/answer/81126#authentication

Which suggests adding mx records, however there are already mx records for Gsuite emails on the domain.

Can anyone advise how to fix this issue?

Edward144

Posted 2019-04-26T12:50:42.097

Reputation: 13

Add a SPF record or DKIM. Also make sure you are using SSL if possible, and make sure your reverse DNS matches the hostname used in the HELO – ivanivan – 2019-04-26T12:55:43.413

Are you sure you read that support page? The page doesn't even mention MX records at all. – Deltik – 2019-04-26T12:55:48.813

@Deltik You're right, re-reading I have no idea where I got that from. – Edward144 – 2019-04-26T12:58:49.477

Answers

0

You're likely sending messages with a "From:" address whose domain already requires either DKIM digital signatures to be present, and/or messages to be sent from only SPF-whitelisted servers.

Make sure the webserver sends messages only through the domain's mailservers and not directly. For example, if you're trying to use "From: […]@gmail.com", you must submit the message through smtp.gmail.com:587 (and using the corresponding Gmail account's login details).

Similarly, if you're using your own domain but it is managed by Google Apps (G Suite), then you've probably configured the SPF/DKIM/DMARC records according to Google's instructions – and that means you must now use the G Suite SMTP servers for all outgoing mail.

If you're using your own domain, but it is managed by a hosting company, then likewise you should use the outbound SMTP server provided by that hosting company. (These servers might be the same as inbound MX servers, but not necessarily.)


If you're using your own domain and running your own mail system, then it could be that you've placed the mailserver on a network blacklisted by Gmail due to high spam rates. For example, hosting companies which use a shared IPv6 /64 pool for all customers are often blacklisted.

(In the specific case of Linode, requesting a dedicated /64 is the best option – that way Gmail will not mix your server's "reputation" together with others. Sometimes configuring the mail server to use only IPv4 will work around the problem as well.)

user1686

Posted 2019-04-26T12:50:42.097

Reputation: 283 655

0

You need 2 things at least:

  • Have a valid PTR record (reverse DNS for your server IP address)
  • Have a valid SPF or DKIM record.

You can check both against an online dns validator tool

So basically do as Google says:

  • The sending IP must have a PTR record (i.e. a reverse DNS of the
    sending IP) and match the IP obtained via the forward DNS resolution of the hostname specified in the PTR record.
  • The sending domain should pass either a SPF check or DKIM check.

Luis Alberto Barandiaran

Posted 2019-04-26T12:50:42.097

Reputation: 225

Thanks for your help, my hosting provider doesn't have an option for PTR records, can I use something else instead if the information is correct? I only have A, AAAA, CNAME, MX, TXT or SRV – Edward144 – 2019-04-29T07:41:16.847

As far as I know, it can't be replaced with other DNS record. I've encountered hosting providers that do comply and make the change, and others who simply refuse (because it's a pain for them to turn to their ISP and ask for the change). In those cases, at least for me, I had to change hosting providers. Good luck! – Luis Alberto Barandiaran – 2019-04-29T14:02:40.557