correctly configure login maps

This commit is contained in:
Sebastian Hugentobler 2022-01-24 17:56:25 +01:00
parent 52725a888c
commit ef2904e513
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
5 changed files with 5 additions and 8 deletions

View File

@ -63,10 +63,7 @@ smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_u
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination, reject_unverified_recipient
smtpd_sender_restrictions = reject_sender_login_mismatch
smtpd_sender_login_maps = unionmap:{
$virtual_mailbox_maps,
pgsql:/etc/postfix/pgsql-login-maps.cf
}
smtpd_sender_login_maps = pgsql:/etc/postfix/pgsql-login-maps.cf
smtpd_milters={{getenv "RSPAMD_ADDRESS" "inet:127.0.0.1:11332"}}
non_smtpd_milters=$smtpd_milters

View File

@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }}
user = {{ getenv "DB_USER" "email" }}
password = {{ getenv "DB_PASSWORD" }}
dbname = {{ getenv "DB_NAME" "email" }}
query = SELECT source FROM virtual_aliases WHERE destination='%u'
query = SELECT email FROM virtual_users WHERE email='%s' UNION SELECT destination FROM virtual_aliases WHERE email='%s'

View File

@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }}
user = {{ getenv "DB_USER" "email" }}
password = {{ getenv "DB_PASSWORD" }}
dbname = {{ getenv "DB_NAME" "email" }}
query = SELECT destination FROM virtual_aliases WHERE source='%u'
query = SELECT destination FROM virtual_aliases WHERE email='%s'

View File

@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }}
user = {{ getenv "DB_USER" "email" }}
password = {{ getenv "DB_PASSWORD" }}
dbname = {{ getenv "DB_NAME" "email" }}
query = SELECT name FROM virtual_domains WHERE name='%u'
query = SELECT name FROM virtual_domains WHERE name='%s'

View File

@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }}
user = {{ getenv "DB_USER" "email" }}
password = {{ getenv "DB_PASSWORD" }}
dbname = {{ getenv "DB_NAME" "email" }}
query = SELECT email FROM virtual_users WHERE email ='%u'
query = SELECT email FROM virtual_users WHERE email ='%s'