Google's network supports IPv6 traffic and prioritizes IPv6 traffic over IPv4 traffic. Your VPS supports and uses both IPv6 and IPv4 by default. Typically, IPv6 is used when your VPS sends mail to the Google network, for instance, to a @gmail.com address.
However, Google imposes strict requirements on your mail server, such as a correctly configured reverse DNS / PTR record and an SPF record that authorizes your mail server to send mail on behalf of that domain. If this configuration is incomplete, you may encounter a 550-5.7.25 error and your mail will be rejected.
The cause of the 550-5.7.25 error
If your mail server's reverse DNS configuration is incomplete, you may receive the following error message:
Status: 5.0.0
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.25 [IPv6 address of your VPS] The IP address sending this message does not
550-5.7.25 have a PTR record setup, or the corresponding forward DNS entry does
550-5.7.25 not point to the sending IP. As a policy, Gmail does not accept
550-5.7.25 messages from IPs with missing PTR records. Please visit
550-5.7.25 https://support.google.com/mail/answer/81126#ip-practices for more
550 5.7.25 information.
The above bounce message indicates the problem: Mail is being sent via an IPv6 address (typically that of your VPS), but there is no correct or complete reverse DNS / PTR record set up. Because your VPS does not comply with Google's IPv6 sending guidelines, the mail is blocked.
Resolving the 550-5.7.25 error
In our experience, this error message is almost always caused by the absence of a DNS record for the reverse DNS record, even though a reverse DNS record is configured in your VPS's network settings. To be sure, we recommend checking both. You can use the steps in our reverse DNS guide for this.
After correctly setting up your reverse DNS record(s), your mail will typically be delivered correctly to addresses on the Google network within an hour.