In it's simplest form on the secondary you run the following commands: Code:
zmprov md domain.com zimbraMailCatchAllAddress @domain.com
zmprov md domain.com zimbraMailCatchAllForwardingAddress @domain.com
zmprov md domain.com zimbraMailTransport smtp:primary.domain.com
On your primary in /opt/zimbra/conf/zmmta.cf I would change the line for smtpd_reject_unlisted_recipients to yes, save the file and 'postfix reload'.
(Which drops traffic on the floor to non-existent addresses rather than spending time processing.)
---
As far as cutting down on spam through the secondary (not that the users would see, but that affects server load and traffic):
You can provision all users on the secondary itself, then set the ZimbraMailTransport on each account individually. Just have to remember to maintain both places.
You could configure postfix to accept an occasional dump of zmprov gaa, gaaa, gadl > address table.
Or query the primary's LDAP for a list on a schedule and store it in local_recipient_maps aka mailbox_transport_maps. Here's how we normally make use of virtual:
postfix_virtual_alias_domains = proxy:ldap:${zimbra_home}/conf/ldap-vad.cf
postfix_virtual_alias_maps = proxy:ldap:${zimbra_home}/conf/ldap-vam.cf
postfix_virtual_mailbox_domains = proxy:ldap:${zimbra_home}/conf/ldap-vmd.cf
postfix_virtual_mailbox_maps = proxy:ldap:${zimbra_home}/conf/ldap-vmm.cf
You can't just change the server_host & bind_pw in those files, you also need to cache a table copy or the system really isn't a backup, just a 2nd mx dependent on the 1st. (Once upon a time I had some scripts to do this, but don't know where those went - search the forums/wiki.)