好像我的化名都没用了。当我用
postmap -q test@example.org mysql:/etc/postfix/mysql-virtual-alias-maps.cf没有输出。但当我命令
postmap -q jack@example.org mysql:/etc/postfix/mysql-virtual-alias-maps.cf输出是
john@example.org. 我怎么才能解决这个问题?
配置查询是:
query= SELECT destination FROM virtual_aliases WHERE source='%s'表virtual_aliases:
id domain_id source destination
5 1 @example.org john@example.org
7 1 john@example.org john@example.org
8 1 jack@example.org john@example.org表virtual_domains:
id name
1 example.org表virtual_users:
id domain_id password email
1 1 pwd john@example.org发布于 2014-05-17 17:25:59
您的mysql查询应该是
SELECT destination FROM virtual_aliases WHERE source='%s'
UNION ALL
SELECT destination FROM virtual_aliases WHERE source='@%d'
AND NOT EXISTS (SELECT destination FROM virtual_aliases WHERE source='%s')发布于 2021-09-03 04:40:24
@clement是正确的,但是有一个更简单的查询可以更容易地在sql服务器上工作。以下是对我起作用的东西:
更改/etc/后缀/mysql中的查询行-虚拟别名-maps.cf
query = select distinct destination from virtual_aliases where source='%s' or source = '@%d';https://stackoverflow.com/questions/23713295
复制相似问题