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_map
with 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.