[Postfix] Create resource maps

master
andryyy 2019-06-09 16:49:38 +02:00
parent 5ce6688c78
commit e25e9c7b40
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,15 @@ query = SELECT CONCAT('smtp_via_transport_maps:', nexthop) AS transport FROM tra
AND destination = '%s';
EOF
cat <<EOF > /opt/postfix/conf/sql/mysql_virtual_resource_maps.cf
user = ${DBUSER}
password = ${DBPASS}
hosts = unix:/var/run/mysqld/mysqld.sock
dbname = ${DBNAME}
query = SELECT 'null@localhost' FROM mailbox
WHERE kind REGEXP 'location|thing|group' AND username = '%s';
EOF
cat <<EOF > /opt/postfix/conf/sql/mysql_sasl_passwd_maps_sender_dependent.cf
user = ${DBUSER}
password = ${DBPASS}