I've found a solution in Postfix's documentation.
Zimbra uses Postfix so this worked for me!
Log as user zimbra 'su - zimbra':
Step 1
Create /opt/zimbra/conf/relayhost_map file:
Append entries for each unique sender => isp relay mapping you need. (note: our default relay, smtp.hugecorp.biz, is not included here):
# Per-sender provider
user1@server1.com [smtp.isp1.com]
user2@server2.com [mail.isp2.org]
user3@server3.com [mx.isp3.net]
Step 2
Create/update the /opt/zimbra/conf/relay_password file with the user authentication information:
# Per-sender authentication
user1@server1.com user1@server1.com:SecretP@ssw0rd1
user1@server2.com user2@server2.com:SecretP@ssw0rd2
user1@server3.com user2@server3.com:SecretP@ssw0rd3
# Login for the default relayhost
[smtp.hugecorp.biz] defaultUsername:defaultPassword
Step 3
Modify these setting in postfix configuration:
postconf -e smtp_sender_dependent_authentication=yes
postconf -e sender_dependent_relayhost_maps=hash:/opt/zimbra/conf/relayhost_map
postconf -e smtp_sasl_auth_enable=yes
postconf -e smtp_sasl_password_maps=hash:/opt/zimbra/conf/relay_password
Step 4
Hash the config files. Restart Postfix:
postmap /opt/zimbra/conf/relayhost_map
postmap /opt/zimbra/conf/relay_password
postfix reload
Mirko Guidolin