I've configured my Zimbra system in this way:
- All local addresses are rewriten from email@example.com to firstname.lastname@example.org with a smtp_generic_maps option in main.cf
- The mail is fetched from the ISP with fetchmail:
Everything works as expected: users can send mail as email@example.com and receive mail as firstname.lastname@example.org. Local mail between email@example.com and firstname.lastname@example.org works well.
poll pop3.isp.com user email@example.com with password pass is firstname.lastname@example.org
The problem starts when the AS/AV option is started:
- Local users can send mails
- Local users don't receive mails fetched from fetchmail because amavisd gets the MX record of the rewrited address (email@example.com) as the relay.
How can I tell amavis to not relay some addresses and deliver locally? Is it possible to rewrite the recipient address before scanning/antispamming?