svoop_pvde84wdgt--- via Postfix-users:
> Hiya!
>
> I'm running my own Postfix as part of a dockered MailU which works
> really smoothly for my own domains. However, I also have a few
> email addresses for client projects at work and for the sake of
> MUA simplicity, I forward all incoming mail to these addresses to
> my main email address on my own domain. Receiving is a piece of
> cake, unfortunately, sending is another story.
>
> This is the situation stripped to the important bits:
>
> * [email protected] is my main email handled by my own MX (Postfix/MailU)
> * [email protected] is my email used for this client project and handled
> by Google workspace
>
> Incoming mail to [email protected] is forwarded to [email protected] and
> delivered normally.
>
> Outgoing mail as [email protected] should use the (authenticated)
> SMTP of Google to assure SPF/DKIM alignment, but my MUAs don't
> support such a setting. (IMO, only Thunderbird allows multiple
> outgoing SMTP per email account.)
>
> I tried to figure out a server-side solution instead, something
> like a reverse forward or submission forward: Submit outgoing mail
> as [email protected] to my own Postfix which is configured to
> recognise this "From" as external and therefore resubmit the message
> via the SMTP of Google (using my credentials for auth).
The official solution is to use sender_dependent_default_transport_maps
(indexed by envelope.from) to choose the relay MTA (such as Google
for a google-hosted sender address), combined with smtp_sasl_passwd
maps, indexed by that same relay MTA (including any :port and []).
Untested example:
/etc/postfix/main.cf:
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sasl_passwd_maps = hash:/etc/postfix/smtp_sasl_passwd
smtp_tls_security_level = may
/etc/postfix/sender_relay:
[email protected] [smtp.google.com]:587
/etc/postfix/smtp_sasl_passwd:
[smtp.gmail.com]:587 usedrname:password
Again, untested, typed from fallible memory.
You can harden this further with sender_dependent_default_transport_maps
and defining a dedicated SMTP client in master.cf, with
-o { smtp_tls_security_level = encrypt }
to make TLS mandatory.
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]