On 8/6/12 2:28 PM, Benny Pedersen wrote: > Den 2012-08-06 12:03, email builder skrev: > >> This causes a bounce instead of reject. Do I have to add a clause for >> this to my query? I start to feel like I'm doing things Postfix should >> be doing. There must be a more simple way to do this? > > postfixadmin have domain-alias support fits 100% to subject, makes sense > if dns data is templated same way >
Probably the best lesson to learn from postfixadmin is: you can have more than one lookup table in postfix per main.cf directive. Postfixadmin uses 2 separate queries for "regular" aliases and domain aliases. from main.cf: virtual_alias_maps = /etc/postfix/mysql_virtual_alias_maps.cf /etc/postfix/virtual_alias_domain_maps.cf where each file contains a simple db query. Makes it much easier to write the correct query, on the expense of some more db load. -- Tom