Hi there,

I configured postfix to relay emails sent from a specific mail domain to an external SMTP relay (MailJet).

Emails are relayed successfully. However they are relayed only when I send email from an account created on this specific domain.

We have 2 mail domains with a shared folder from an account created on this specific mail domain. This shared folder is shared with some other accounts created on the second mail domain (on the same ZCS server).

From these other accounts, we reply to emails from this shared folder with an avatar corresponding to the mail domain relayed.

The issue is emails sent from these other accounts are not relayed to the external SMTP relay.

After some diagnostics, it seems than postfix (in my configuration) does not read the "from address" to relay through an external relay but only the "received: from address". By consequently, emails sent from avatars are not relayed via this external SMTP relay.

Is there a way to tell to postfix to relay emails sent from some specifics avatars?

To simplify,
2 mail domains : domain1 and domain2
mails sent from domain1 are relayed via an external SMTP relay
1 account account@domain1 with a shared folder folder1
multiple accounts on domain2 with access to the shared folder folder1
accounts from domain2 need to reply to emails received on folder1 and have to use an avatar account@domain1

How to relay emails sent with avatar account@domain1 via the external SMTP relay?

My current postfix configuration look at this :
/opt/zimbra/postfix/conf/main.cf :
smtp_sasl_password_maps = hash:/opt/zimbra/postfix/conf/relay_password
sender_dependent_relayhost_maps = hash:/opt/zimbra/postfix/conf/sender_relay
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtpd_tls_security_level = may
smtpd_tls_key_file = /opt/zimbra/conf/smtpd.key

/opt/zimbra/postfix/conf/sender_relay :
@domain1 [in.mailjet.com]:587

/opt/zimbra/postfix/conf/relay_password :
@domain1 APIkey:SecretKey

Does someone can help me?