mailcow/data/conf/postfix/sql/mysql_relay_recipient_maps.cf

6 lines
289 B
CFEngine3
Raw Normal View History

2017-03-02 18:23:23 +08:00
user = mailcow
password = mysafepasswd
hosts = mysql
dbname = mailcow
query = SELECT DISTINCT CASE WHEN '%d' IN (SELECT domain FROM domain WHERE relay_all_recipients=1 AND domain='%d' AND backupmx=1) THEN '%s' ELSE (SELECT goto FROM alias WHERE address='%s' AND active='1') END AS result;