>> if i have defined 100 virtual users, ie [email protected]
>> [email protected] [email protected] etc, does that mean I need to add
>> 100 entries ([email protected] -> [email protected], etc) to the
>> virtual_alias_maps table if i want to use a @example.com ->
>> [email protected]?
> 
> Yes, and generating these is easily automated.

Ah yes, you're right and after thinking about it I came up with this solution 
to break recursion:
(If it helps future readers trying to do the same thing)

main.cf
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_email_aliases

/etc/postfix/mysql_email_aliases
    query = SELECT email FROM users WHERE email = '%s' UNION SELECT email FROM 
aliases WHERE alias = '%s' LIMIT 1

Reply via email to