[pfx] Re: Help with reject_sender_login_mismatch

2024-06-18 Thread Benny Pedersen via Postfix-users

Jeff Peng via Postfix-users skrev den 2024-06-18 09:30:


smtps inet  n   -   y   -   -   smtpd
  -o 
smtpd_sender_restrictions=permit_sasl_authenticated,reject_sender_login_mismatch,reject


order matters, first wins

-o 
smtpd_sender_restrictions=reject_sender_login_mismatch,permit_sasl_authenticated,reject



Can you help further? Thanks.


join roundcube maillist ?

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Help with reject_sender_login_mismatch

2024-06-18 Thread Jeff Peng via Postfix-users



Thanks for all the kind helps. I have resolved the issue and wrote a 
note for it.

https://notes.postno.de/how-to-use-reject-sender-login-mismatch-in-postfix.html

if you find any issue in this note, please let me know.

Thanks.




Oh, sorry I didn't see you weren't using smtpd_sender_login_maps. I'm
pretty sure you'll need that to list the allowed logins (and/or their
aliases if needed). See https://www.postfix.org/postconf.5.html for how
that works.


___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Help with reject_sender_login_mismatch

2024-06-18 Thread Gilgongo via Postfix-users
On Tue, 18 Jun 2024 at 08:55, Jeff Peng  wrote:

> I did have tried this line (with just one value
> reject_sender_login_mismatch).
> But then I even can't send mail from the valid user (the user who login
> into RC).
>

Oh, sorry I didn't see you weren't using smtpd_sender_login_maps. I'm
pretty sure you'll need that to list the allowed logins (and/or their
aliases if needed). See https://www.postfix.org/postconf.5.html for how
that works.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Help with reject_sender_login_mismatch

2024-06-18 Thread Gilgongo via Postfix-users
On Tue, 18 Jun 2024 at 08:31, Jeff Peng via Postfix-users <
postfix-users@postfix.org> wrote:

> Hello,
>
> I have this section in master.cf:
>
> smtps inet  n   -   y   -   -   smtpd
>-o syslog_name=postfix/smtps
>-o smtpd_tls_wrappermode=yes
>-o smtpd_sasl_auth_enable=yes
>-o
>
> smtpd_sender_restrictions=permit_sasl_authenticated,reject_sender_login_mismatch,reject
>-o smtpd_relay_restrictions=permit_sasl_authenticated,reject


I think all you need is:

-o smtpd_sender_restrictions=reject_sender_login_mismatch

Right now you're letting sasl-auth clients in without that check since
postfix evaluates left to right.

(By chance I was just looking at this when I saw your mail:
https://doc.dovecot.org/configuration_manual/howto/postfix_and_dovecot_sasl/
)
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Help with reject_sender_login_mismatch

2024-06-18 Thread Jeff Peng via Postfix-users

On 2024-06-18 15:51, Gilgongo wrote:

On Tue, 18 Jun 2024 at 08:31, Jeff Peng via Postfix-users <
postfix-users@postfix.org> wrote:


Hello,

I have this section in master.cf:

smtps inet  n   -   y   -   -   smtpd
   -o syslog_name=postfix/smtps
   -o smtpd_tls_wrappermode=yes
   -o smtpd_sasl_auth_enable=yes
   -o

smtpd_sender_restrictions=permit_sasl_authenticated,reject_sender_login_mismatch,reject
   -o smtpd_relay_restrictions=permit_sasl_authenticated,reject



I think all you need is:

-o smtpd_sender_restrictions=reject_sender_login_mismatch



I did have tried this line (with just one value 
reject_sender_login_mismatch).
But then I even can't send mail from the valid user (the user who login 
into RC).


so how?

Thanks.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org