On 17.11.22 12:56, Bryan K. Walton wrote:
I would like to enforce a match between the "From" address and a sasl
authenticated username, but I would like to only enforce this for a
single sasl username.
In my postfix main.cf, I have the following:
smtpd_sender_restrictions =
<other restrictions>
reject_authenticated_sender_login_mismatch,
<other restrictions>
smtpd_sender_login_maps =
hash:/etc/postfix/restricted_senders
In /etc/postfix/restricted_sender, I have the following:
[email protected] jdoe
this restricts using addresses [email protected] by other users, it doesn't
prevent user jdoe from using other addresses.
This works, for this user. However, it breaks sending for all of my
other sasl authenticated users, unless I also put their info into
/etc/postfix/restricted_sender
see archive where Wietse explained how do these work:
https://marc.info/?l=postfix-users&m=165263335106167&w=2
Is there a way to make this restriction *only* apply to the username
present in that file?
I believe Victor explained the rest.
Also I believe that for rejecting header From: you'd need to use external
milter.
I know of no milters supporting this feature now.
however with help of https://www.mailmunge.org/ it should be easy to write
that in perl.
--
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Nothing is fool-proof to a talented fool.