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

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
liverpoolfcfan
Outstanding Member
Outstanding Member
Posts: 935
Joined: Sat Sep 13, 2014 12:47 am

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

Postby liverpoolfcfan » Mon Jul 13, 2015 4:56 am

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



Fabio S. Schmidt
Advanced member
Advanced member
Posts: 183
Joined: Fri Apr 25, 2014 12:42 pm

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

Postby Fabio S. Schmidt » Mon Jul 13, 2015 11:22 am

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'



Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 14 guests