This commit is contained in:
parent
59fedb2489
commit
04768cfcfd
1 changed files with 9 additions and 0 deletions
|
|
@ -217,11 +217,20 @@ password = MAILSERVER-PASSWORD-HERE
|
|||
hosts = 127.0.0.1
|
||||
dbname = mailserver
|
||||
query = SELECT 1 FROM virtual_users WHERE email='%s'
|
||||
EOF
|
||||
|
||||
cat > /etc/postfix/mariadb-sender-login-maps.cf << EOF
|
||||
user = mailserver
|
||||
password = MAILSERVER-PASSWORD-HERE
|
||||
hosts = 127.0.0.1
|
||||
dbname = mailserver
|
||||
query = SELECT email FROM virtual_users WHERE email='%s' UNION SELECT source FROM virtual_aliases WHERE destination='%s';
|
||||
EOF
|
||||
|
||||
postconf virtual_mailbox_domains=mysql:/etc/postfix/mariadb-virtual-mailbox-domains.cf
|
||||
postconf virtual_mailbox_maps=mysql:/etc/postfix/mariadb-virtual-mailbox-maps.cf
|
||||
postconf virtual_alias_maps=mysql:/etc/postfix/mariadb-virtual-alias-maps.cf
|
||||
postconf smtpd_sender_login_maps=mysql:/etc/postfix/mariadb-sender-login-maps.cf
|
||||
|
||||
chown root:postfix /etc/postfix/mariadb-*.cf
|
||||
chmod o= /etc/postfix/mariadb-*.cf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue