From ad4e8db9b111ebe1aea1ea7ddb56fe7f09616b88 Mon Sep 17 00:00:00 2001 From: Jyri Hovila Date: Thu, 10 Feb 2022 06:32:36 +0800 Subject: [PATCH 1/2] Updated "moving from Postfix (& Postfixadmin)" The example "Moving from Postfix (& Postfixadmin)" was outdated and did not work properly. --- extras/tables/table-mysql/table-mysql.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/tables/table-mysql/table-mysql.5 b/extras/tables/table-mysql/table-mysql.5 index 3ed0da5..1744649 100644 --- a/extras/tables/table-mysql/table-mysql.5 +++ b/extras/tables/table-mysql/table-mysql.5 @@ -222,9 +222,9 @@ host db.example.com username postfix password PostfixOutOpenSMTPDin database postfix -query_alias SELECT destination FROM alias WHERE email=?; -query_credentials SELECT username, password FROM mailbox WHERE username=?; -query_domain SELECT domain FROM domain WHERE domain=?; +query_alias SELECT IF(goto=address, 'vmail', goto) from alias WHERE address=? AND active='1'; +query_credentials SELECT username, password FROM mailbox WHERE username=? AND active='1'; +query_domain SELECT domain FROM domain WHERE domain=? AND active='1'; .Ed The rest of the config remains the same. From d5de21fdf0c1e130ed027e41484f43788793be2e Mon Sep 17 00:00:00 2001 From: Jyri Hovila Date: Thu, 10 Feb 2022 06:40:32 +0800 Subject: [PATCH 2/2] Updated "Moving from Postfix (& Postfixadmin)" The example "Moving from Postfix (& Postfixadmin)" was outdated and did not work properly. --- extras/tables/table-postgres/table-postgres.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/tables/table-postgres/table-postgres.5 b/extras/tables/table-postgres/table-postgres.5 index 968d4cc..15aaf68 100644 --- a/extras/tables/table-postgres/table-postgres.5 +++ b/extras/tables/table-postgres/table-postgres.5 @@ -191,9 +191,9 @@ accept from any for domain virtual deliver to mbox .Ic Pa /etc/mail/postgres.conf .Bd -literal -compact conninfo host='db.example.com' user='postfix' password='PostfixOutOpenSMTPDin' dbname='postfix' -query_alias SELECT destination FROM alias WHERE email=$1; -query_credentials SELECT username, password FROM mailbox WHERE username=$1; -query_domain SELECT domain FROM domain WHERE domain=$1; +query_alias SELECT IF(goto=address, 'vmail', goto) from alias WHERE address=$1 AND active='1'; +query_credentials SELECT username, password FROM mailbox WHERE username=$1 AND active='1'; +query_domain SELECT domain FROM domain WHERE domain=$1 AND active='1'; .Ed The rest of the config remains the same.