On Tuesday, August 02, 2011 at 19:25 CEST, Jeroen Geilman <jer...@adaptr.nl> wrote:
> On 2011-08-02 06:30, Noel Butler wrote: > > > Has been a while since I've looked at this, but at present if we > > need to alias a domain, eg f...@example.com to f...@example.net > > we are using mysql:/etc/postfix/mysql_alias_domains.cf after > > other entries in our virtual_alias_maps > > and using > > query = SELECT email from virtual_users where email='%s' OR email = > > CONCAT('%u@', (SELECT destination from aliased_domains where > > domain = '%d')) > > Consider adding a regexp or PCRE map for this: > > virtual_alias_maps = mysql:/etc/postfix/mysql_alias_domains.cf > regexp:/etc/postfix/domain_aliases > > /etc/postfix/domain_aliases: > > /^([^@]+)@from_domain$/ $(1)@to_domain > > It'll be faster than mysql, too ;) No, don't do this. This breaks recipient validation in the same way that @from_domain @to_domain in an indexed map does, except it's more complicated. [...] -- Magnus Bäck mag...@dsek.lth.se