I'm using sasldb2 (without saslauthd) for SMTP authentication with Postfix. To create a new user, I run saslpasswd2 -u example.com mail which creates a login mail@example.com. However, using these credentials, I can successfully connect to and send as other@example.com. How can I restrict users to only send as their own mail address?
What I've tried:
- Installed
postfix-pcre. - Set up a file
/etc/postfix/login_mapwith content/^(.*)$/ ${1}. - Reference in Postfix config:
smtpd_sender_login_maps = pcre:/etc/postfix/login_map. - Restart postfix.
The mail server just happily sends mails as other user names. There is nothing special in the logs.
-o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_login_maps=hash:/etc/postfix/virtual -o smtpd_sender_restrictions=reject_sender_login_mismatch– NickW Jun 28 '16 at 13:49