After a little research I think there are a couple of ways to do this however...
My main question is: after all the virus/spam checking, how is mail to a local destination delivered? Does it use the SMTP client or does in end up in the message store some other way.
If the latter, it should be a simple matter of editing /opt/zimbra/postfix/conf/master.cf.in as follows (addition in bold) as the SMTP client would only be used to deliver mail to external domains.
Code:
.
.
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
-o smtp_bind_address=x.x.x.x
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
. If however, the SMTP client is used to deliver external AND local mail (after spam/virus filter) then one could use a transport map which would contain all local domains and use the smtp-local service for these and all other mail would use the standard smtp service. A pain to administer tho...
Code:
.
.
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
-o smtp_bind_address=x.x.x.x
smtp-local unix - - n - - smtp
-o smtp_bind_address=127.0.0.1
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
. in theory anyway...