mouss пишет:
aliases for your own domains. since you are using mysql, let mysql do it
for you:

virtual_alias_maps =
        mysql:/etc/postfix/virtual_alias_maps.cf
        mysql:/etc/postfix/standard_aliases.cf

and in the latter, use something like:

query = select 'postmas...@example.com'
        from YourDomainTable
        where
                '%u' = 'postmaster'
        AND
                '%d' = domain

(Note: the query only returns a result if the domain part is listed in
your domains table).

now, once you do this, you could build a table for the "standard"
aliases instead of hardcoding 'postmaster'...
Thank you! Continuing idea, there is generic way to make such aliases:

select concat(`common_aliases`.`alias`,'@localhost') from `common_aliases`,`domains` where '%u'=`common_aliases`.`email` and '%d'=`domains`.`name`;

and have the table `common_aliases` which says to where alias that email address (and both tables are indexed by query field). This matters only when there are lots of common aliases, else your way is better.

So, I've got an idea.

Reply via email to