Den 19.01.2026 21:04, skrev Dennis Putnam via Postfix-users:
On 1/19/2026 2:45 PM, Håkon Alstadheim via Postfix-users wrote:
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.
Sorry, I thought it was obvious. In main.cf I have, in part:
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sender_dependent_authentication = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
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" .
Are you saying I don't need sender_relay? I'm using transport_maps but
for mailman3. That hash file looks like:
Read
https://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps
. I believe you said you were using the same relayhost, with different
logins? If so, no need to override the host, so you can delete the
sender_dependent_relayhost_maps, and just use relayhost. Anyway, the
excerpt below is a bit confusing, it says that mail from
[email protected] should be relayed through your local host, port
8024. Is that what you want?
[email protected] lmtp:[127.0.0.1]:8024
[email protected] lmtp:[127.0.0.1]:8024
.
.
.
I thought that was for incoming mail.
Relayhost gets used for all mail that is *not* destined for your local
users (be they virtual mailboxes or regular local users) . Mailbox
transport is used for local users.
/
/
_______________________________________________
Postfix-users mailing list [email protected]
To unsubscribe send an email [email protected]
_______________________________________________
Postfix-users mailing list [email protected]
To unsubscribe send an email [email protected]
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]