I have an Linux server (Ubuntu) in which, while setting it up, I entered my gmail address. So now, each 5 or 6 minutes, gmail servers respond to my server with the following message (appearing in the logs):
Sep 3 15:47:41 mainserver postfix/smtp[5404]: 9CA07314035F: to=<{myName}@gmail.com>, relay=alt1.gmail-smtp-in.l.google.com[108.177.14.27]:25, delay=193543, delays=193541/0.61/0.31/0.2, dsn=4.7.0, status=deferred (host alt1.gmail-smtp-in.l.google.com[108.177.14.27] said: 421-4.7.0 [{my ip xxx.xxx.xxx.xx} 15] Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/?p=UnsolicitedRateLimitError to 421 4.7.0 review our Bulk Email Senders Guidelines. v11si11693915lfi.41 - gsmtp (in reply to end of DATA command))
(For security purposes I replaced above my real address with {myName} and my real IP with {my ip xxx.xxx.xxx.xx})
So, Gmail is trying to protect my gmail.com email (which is obviously mine) from receiving messages sent to it by my server.
Trying to stop this behavior, I replaced my gmail address in every hosted site with a self-hosted email address.
But, as you can see, the warnings are still appearing.
I also edited /etc/aliases
and after
# See man 5 aliases for format
postmaster: root
clamav: root
...I added root:postmaster@{my.address}
hoping it will rewrite the gmail root email with the self-hosted one (here my real address is replaced with {my.address})
What do you thing I have to do to stop these mails from getting to gmail?