Roman Medina-Heigl Hernandez a écrit : > mouss escribió: >> Roman Medina-Heigl Hernandez a écrit : >>>> Why is the mail not being rejected due to >>>> reject_unauthenticated_sender_login_mismatch? I must have a silly bug but I >>>> couldn't find it... :-( >>> I got to solve it by: >>> smtpd_sender_login_maps = $virtual_mailbox_maps >>> >> do not reuse maps this way. use a script to generate each map instead >> (or use >> >> note that smtpd_sender_login_maps returns one or more logins, while >> virtual_mailbox_maps returns the path to the mailbox. > > Since I'm using Cyrus LMTP, I don't have the "path to mailbox" variable, so > I could return whatever in $virtual_mailbox_maps. What I did was to return > the email address (which in turn corresponds to the SASL login). >
I guessed that, but still... see below. > So now it's perfectly "compatible" to use the same Mysql map for both > variables. I mean: > > hsnew:/etc/postfix# cat /etc/postfix/vuser.mysql > # Virtual users (Mysql) > hosts = unix:/var/run/mysqld/mysqld.sock > user = postfix > password = xxxxxxxxxx > dbname = postfix > query = select user from user where user = '%s' > > And in main.cf: > virtual_mailbox_maps = mysql:/etc/postfix/vuser.mysql > smtpd_sender_login_maps = mysql:/etc/postfix/vuser.mysql > > Ok now? :-) > yes it's better! now if a new admin has to replace you, he won't get mad trying to figure out what's really configured :)