On 2011-08-02 06:30, Noel Butler wrote:
Folks,
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 ;)

.. which has served us well on the massive 2 domains we've need it to ;)   ...so, my question is, is there planned an easier, more
direct call to do it, since, IIRC, the virtual alias domains despite its name, does not do this (or I never got it to work)

It's one feature I miss from old sendmail days which did this easily  as a simple  "from_domain"  "to_domain"  table.


Since this blindly forwards mail to (possibly external) destinations, it's not a very good practice, security-wise.
Hence why postfix requires you to jump through one or two hoops to achieve it.

-- 
J.

Reply via email to