Sender-Dependent Relay Routing
Route different envelope senders through different relays.
Production note: Back up configuration, run
postfix check, and stage changes before reloading.Use case
Useful when tenants, brands, or streams must use separate relay services or credentials.
Map configuration
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
# sender_relay
@example.com [smtp1.example.net]:587
@example.org [smtp2.example.net]:587Credential security
chmod 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.dbVerify
postmap /etc/postfix/sender_relay
postmap /etc/postfix/sasl_passwd
postmap -q [email protected] hash:/etc/postfix/sender_relay
postfix check