I've a Postfix server with two virtual domains, users and aliases. Some of my users want their email centralized at Gmail and have aliases in place to redirect incoming e-mail to their Gmail accounts.
Eg. [email protected]
is forwarded to [email protected]
. The DB looks like this:
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`domainid` int(10) unsigned NOT NULL,
`source` varchar(255) NOT NULL,
`destination` varchar(255) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
Eg. Record: ( 1, 1, '[email protected]', '[email protected]' )
The Postfix config:
virtual_alias_maps = mysql:/etc/postfix/virtual/mysql-alias-maps.cf
(...)
query = SELECT destination FROM `aliases` WHERE source='%s'
This setup works fine, however Google sometimes they classify forwarded email as SPAM and it stays on my Postfix queue. Later Postfix re-tries deliveries and eventually I get rate limited like this:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
EB7F52D4AC6 68880 Wed May 10 15:47:55 [email protected]
(host alt1.gmail-smtp-in.l.google.com[142.250.153.27] said: 421-4.7.28 [x.x.x.x 15] Our system has detected an unusual rate of 421-4.7.28 unsolicited mail originating from your IP address. To protect our 421-4.7.28 users from spam, mail sent from your IP address has been temporarily 421-4.7.28 rate limited. Please visit 421-4.7.28 https://support.google.com/mail/?p=UnsolicitedRateLimitError to 421 4.7.28 review our Bulk Email Senders Guidelines. xxxxxxxxxxxxxx - gsmtp (in reply to end of DATA command))
[email protected]
727102D4897 9357 Wed May 10 13:16:19 [email protected]
(host alt1.gmail-smtp-in.l.google.com[142.250.153.27] said: 421-4.7.0 [x.x.x.x 15] Our system has detected that this message is 421-4.7.0 suspicious due to the very low reputation of the sending domain. To 421-4.7.0 best protect our users from spam, the message has been blocked. 421-4.7.0 Please visit 421 4.7.0 https://support.google.com/mail/answer/188131 for more information. xxxxxxxxxxxxxx - gsmtp (in reply to end of DATA command))
[email protected]
5A5612C600F 114347 Thu May 4 13:47:25 [email protected]
(host alt1.gmail-smtp-in.l.google.com[142.250.153.26] said: 421-4.7.28 [x.x.x.x 15] Our system has detected an unusual rate of 421-4.7.28 unsolicited mail originating from your IP address. To protect our 421-4.7.28 users from spam, mail sent from your IP address has been temporarily 421-4.7.28 rate limited. Please visit 421-4.7.28 https://support.google.com/mail/?p=UnsolicitedRateLimitError to 421 4.7.28 review our Bulk Email Senders Guidelines. xxxxxxxxxxxxxx - gsmtp (in reply to end of DATA command))
[email protected]
Google is saying mail sent from your IP address has been temporarily 421-4.7.28 rate limited
. This causes issues with emails sent by other users as they can't be delivered. This seem to happen very frequently with emails from Linkedin and ISMG Network News but sometimes with others.
Is there a way to set Postfix to never re-try deliveries of forwardings to Google if they refuse it once? I don't want this to apply to emails sent by my users.
Thank you.