On 19/01/2026 19:27, Dennis Putnam via Postfix-users wrote:
On 1/19/2026 11:11 AM, John Fawcett via Postfix-users wrote:

On 19/01/2026 16:46, Dennis Putnam via Postfix-users wrote:
I have a situation where I need to use different relay logins to the same host depending on the local sender. For example:

If the local user is [email protected] the the relay host login needs to be [email protected].

However, if the local user is [email protected] then the relay host login needs to be [email protected].

It seems that relay_sender only maps to one login:

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

And of course in sasl_password:

[smtp.relay.com]:587      uuuuuu:keystring
[smtp.relay.com]:587      xxxx:anotherkeystring

Is there not a way to distinguish which login to use in this case? If so, how? TIA

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

Hi Dennis

I saw a section here on how to configure a sender dependent SASL authentication:

https://www.postfix.org/SASL_README.html

using smtp_sender_dependent_authentication

John


_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Hi John,

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

According to the postfix log, it is trying to use relay.com but authentication is failing. I can't tell which from the log but neither works when commenting one or the other out. I am guessing that I am doing something wrong with the syntax in sasl_passwd but I don't see what. The default authentication works.


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

I'm not really sure I understood all your configuration. Is it possible to post it with only obscuring the passwords and the domains as well as postconf -n and any logging from the message sending. I am assuming that you have postmapped the hash maps and reloaded postfix for your tests.

I am pretty sure that the example in the docs is valid.

John

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

Reply via email to