Hello! Currently I've virtual_alias_maps and virtual_alias_domains set:
virtual_alias_domains = mysql:/etc/postfix/mysql-virtual-alias-domains.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf domains use this query: query = SELECT domain FROM domains WHERE mail AND domain = '%s' UNION SELECT alias FROM http_aliases WHERE domain IN (SELECT domain FROM domains WHERE mail) AND alias = '%s' It checks if the domain is in the domains table with mail enabled or if there is a http_alias of a mail enabled domain. maps this: query = SELECT alias FROM virtual_aliases WHERE virtual='%s' alias is the system user account, e.g. flindner virtual is the mail address, e.g. mailingli...@xgm.de Since there are not many users and rather low mail traffic on the machine I want to simplify the query. There will be no more mail enabled or disabled domains, postfix should take all emails for which virtual_alias_maps returns an alias. If I simply remove virtual_alias_domains from the configuration it defaults to $virtual_alias_maps, but the query with %s = xgm.de returns nothing and relay access is denied. A virtual_alias_maps query = SELECT alias FROM virtual_aliases WHERE virtual LIKE '%%s' (first % should be the SQL wildcard, probably needs escaping) could be doing the trick and return a result for the domain query (afaik postfix only checks existince of a result) and return an alias for the maps query. I have some concern that this query might be overly brought and returns false positives. What is the best way here? Thanks, Florian