Darren Pilgrim wrote:
Alexander Hoogerhuis wrote:
Sorry for digging up an old thread, but unless I'm mistaken this will
deal with the case where the user sends email outbound with the MAIL
FROM equal to the SASL login username, but if someone sets their MAIL
FROM to be one of the values from the list of the mailbox'es aliases
it will not validate against the alias table?
Right, the query above only works if the user sends mail from their
login address. If you involve aliases, you need to do the transitive
closure using either a much more advanced query or a policy service.
I had a quick dig at what's actually in the alias tables, and its basically:
alias | mailbox
------------------
alias1 | username
alias2 | username
etc.
So shouldnt the query from the virtual alias maps work?
user = postfix
password = secret
hosts = dbmachine
dbname = postfix
table = alias
select_field = mailbox
where_field = alias
and then use two lookups like this in main.cf:
smtpd_sender_login_maps = \
mysql:/etc/postfix/mysql_sender_login_maps.cf, \
mysql:/etc/postfix/mysql_sender_login_maps-aliases.cf
Or have I misunderstood?
-A