I have set up a Postfix server with SMTP AUTH (STARTTLS on port 587). All my users are in the domain "example.org". I want to enforce the sender address to be "email@example.com".
I learned that this can be achieved with the main.cf options
smtpd_sender_restrictions = reject_sender_login_mismatch, ... smtpd_sender_login_maps = hash:/etc/postfix/smtpd_sender_login_maps
with a login_maps file like:
firstname.lastname@example.org a email@example.com b firstname.lastname@example.org c ...
(see also Block sender address spoofing with SMPT AUTH), but this would mean I'll have to edit the login_maps file every time I have a new user. I don't need such a flexible mapping: It should always be "email@example.com". Is there an easier option?