[Postfix] Implement disallowed logins

master
andryyy 2020-04-29 11:00:00 +02:00
parent 85a69a580e
commit 3459c13022
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 4 additions and 4 deletions

View File

@ -194,7 +194,7 @@ dbname = ${DBNAME}
query = SELECT username FROM mailbox, alias_domain query = SELECT username FROM mailbox, alias_domain
WHERE alias_domain.alias_domain = '%d' WHERE alias_domain.alias_domain = '%d'
AND mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.username = CONCAT('%u', '@', alias_domain.target_domain)
AND mailbox.active = '1' AND (mailbox.active = '1' OR mailbox.active = '2')
AND alias_domain.active='1' AND alias_domain.active='1'
EOF EOF
@ -264,7 +264,7 @@ user = ${DBUSER}
password = ${DBPASS} password = ${DBPASS}
hosts = unix:/var/run/mysqld/mysqld.sock hosts = unix:/var/run/mysqld/mysqld.sock
dbname = ${DBNAME} dbname = ${DBNAME}
query = SELECT CONCAT(JSON_UNQUOTE(JSON_EXTRACT(attributes, '$.mailbox_format')), mailbox_path_prefix, '%d/%u/') FROM mailbox WHERE username='%s' AND active = '1' query = SELECT CONCAT(JSON_UNQUOTE(JSON_EXTRACT(attributes, '$.mailbox_format')), mailbox_path_prefix, '%d/%u/') FROM mailbox WHERE username='%s' AND (active = '1' OR active = '2')
EOF EOF
cat <<EOF > /opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf cat <<EOF > /opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf
@ -314,7 +314,7 @@ query = SELECT goto FROM alias
SELECT username FROM mailbox, alias_domain SELECT username FROM mailbox, alias_domain
WHERE alias_domain.alias_domain = '%d' WHERE alias_domain.alias_domain = '%d'
AND mailbox.username = CONCAT('%u','@',alias_domain.target_domain) AND mailbox.username = CONCAT('%u','@',alias_domain.target_domain)
AND mailbox.active ='1' AND (mailbox.active = '1' OR mailbox.active ='2')
AND alias_domain.active='1' AND alias_domain.active='1'
EOF EOF

View File

@ -249,7 +249,7 @@ services:
- dovecot - dovecot
postfix-mailcow: postfix-mailcow:
image: mailcow/postfix:1.48 image: mailcow/postfix:1.49
depends_on: depends_on:
- mysql-mailcow - mysql-mailcow
volumes: volumes: