Den 19.01.2026 19:27, skrev Dennis Putnam via Postfix-users:
Thanks for the reply. I thought I did what was documented but it does not work for me. Authentication fails. The same authentication works if I don't use like originally posted:

smtp_sender_dependent_authentication = yes

Here's what I did:

sender_relay

[email protected]              [smtp.relay.com]:587
[email protected]                  [smtp.relay.com]:587

sasl_passwd

[email protected] [email protected]:keystring
[email protected] [email protected]:anotherkeystring
# default authentication
[smtp.myisp.net]:587 [email protected]:differentkeystring

I don't know what relay_sender or sender_relay is. Postfix has a setting (in main.cf ) relayhost (https://www.postfix.org/postconf.5.html#relayhost) , for picking where your outgoing mail gets relayed via.

I happen to be using transport_maps (https://www.postfix.org/postconf.5.html#transport_maps) for picking the relayhost, but it ends up picking something like "smtp:[smtp.relayhost.example]:587" .  If you need different relayhosts for different *recipients*, the mapping goes in the file pointed to by transport_maps. Otherwise, just set relayhost directly, and it will be used for mail *to* all non-local users.

Then, I have in main.cf:

------------------
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = cdb:/etc/postfix/sasl_passwd
smtp_sender_dependent_authentication = yes
-----------------------
My file sasl_passwd is like like:

-----------------------
# specific to user:
[email protected]/[email protected]:password
# default:
@mydomain.example [email protected]:password
-----------------------
/

See docs at https://www.postfix.org/postconf.5.html#smtp_sasl_password_maps . As far as I understand you only want mappings from your local senders to the remote user:password in here. If the local user is not found in this file "then the Postfix SMTP client will not attempt to authenticate to the remote host" .

/
/
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to