Page 1 of 1

Is there a way to prevent emails to a single external address?

Posted: Mon Jul 13, 2015 4:56 am
by liverpoolfcfan

Our external spam filter sends a daily digest to any user who has had incoming email blocked/quarantined so that they can release any that were blocked in error. This comes from a do-not-reply address which does not accept return emails. Every time a user with an Out-of-office message set gets one of these spam digests a reply email gets generated that can never be delivered. This sits in the mail queue getting retried over and over until it expires. 


Is there a way to have postfix simply drop these emails? Or to redirect them to an internal mailbox from where they could be deleted?  I would prefer not to have to rely on every user creating a filter in their account to drop them. 


Or if filters are the only way to go, does anyone have a suggested method to cycle through all accounts from zmprov and check for the existence of the filter, and add it if it is not already configured for that account?


Thanks


Is there a way to prevent emails to a single external address?

Posted: Mon Jul 13, 2015 11:22 am
by Fabio S. Schmidt

Hi,


I think you could follow this steps in  https://wiki.zimbra.com/wiki/New_Features_ZCS_8.5 



Ability to reject or accept deny emails for specific users


Reference: 


Starting with ZCS 8.5, it is possible to configure postfix to deny or accept specific emails for a given user address, IP address, etc.. This can be used to effectively block spammers targeting a given user, or coming in from a specific IP.


$ vi /opt/zimbra/conf/postfix_recipient_access


qa_test1@zqa-062.eng.vmware.com 550 User Unknown


qa_test2@zqa-062.eng.vmware.com OK


10.137.244.61 OK


50.60.70.80 550 User Unknown


I would just write the recipient and apply the action DISCARD:


recipient@domain.com   DISCARD


postmap /opt/zimbra/conf/postfix_recipient_access


zmprov mcf +zimbraMtaRestriction 'check_recipient_access lmdb:/opt/zimbra/conf/postfix_recipient_access'