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 "firstname.lastname@example.org".
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:
email@example.com a firstname.lastname@example.org b email@example.com 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 "firstname.lastname@example.org". Is there an easier option?