Threaded View

Relay host per domain and avatar

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?