View Single Post
  #4 (permalink)  
Old 02-27-2006, 05:23 PM
anand anand is offline
Zimbra Employee
 
Posts: 274
Default scratch what I said earlier

Adding the wildcard address would negate the undesirable address having mail status disabled. argh. This time let me give you an example I tested. Let me rephrase your problem:

example.com - is your domain

me@example.com - is your account

friend@example.com - your friend's account in your domain

bad@example.com - address that you want rejected

me-store1@example.com - not an account, but by "catch all" means mail is redirected to me@example.com

Here are the provisioning steps in Zimbra:

Code:
zmprov cd example.com
zmprov ca me@example.com test123 zimbraMailCatchAllAddress @example.com
zmprov ca friend@example.com test123
Setting zimbraMailCatchAllAddress on the account causes that account to receive mail for any address on that domain that is not otherwise an account or distribution list or alias. I have to insert my 2c on catch all addresses here - they are usually a very bad and spammers start sending you email to your message-id strings - which look like email addresses (I speak from personal experience) - but hey, to each his own.

Also "test123" in the example above is a password, so please substitute.

Now for the part about rejecting mail to bad@example.com. Here is what you need to do (we are thinking of better ways to do this, but for now...):

- Edit /opt/zimbra/conf/postfix_recipient_restrictions.cf

- Add this line to it:
Code:
check_recipient_access hash:/opt/zimbra/conf/rejected_addresses
- Note that this access check line should definitely be very early - above permit_sasl_authenticated and permit_mynetworks - so even authenticated or local clients can not email this address.

- Edit the text file /opt/zimbra/conf/rejected_addresses and add the following line to it:
Code:
dance@example.com       REJECT I hate spammers
- Run this command to create the needed hash db file:
Code:
postmap /opt/zimbra/conf/rejected_addresses
- postfix stop; postfix start

You should be all set. Test it.
Reply With Quote