add virtual-mailbox-maps configuration

This commit is contained in:
Sebastian Hugentobler 2021-12-21 18:19:11 +01:00
parent 282d8d57e7
commit ca1514a6bb
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
3 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[template]
src = "pgsql-virtual-mailbox-maps.cf.tmpl"
dest = "/etc/postfix/pgsql-virtual-mailbox-maps.cf"

View File

@ -17,6 +17,7 @@ mailbox_transport = lmtp:{{getenv "LMTP_HOST"}}
mailbox_size_limit = {{getenv "MAILBOX_SIZELIMIT" "0"}}
smtpd_banner = {{getenv "SMTP_BANNER"}} $myhostname ESMTP $mail_name
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql-virtual-mailbox-maps.cf
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql-virtual-mailbox-domains.cf
virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual-alias-maps.cf
virtual_transport = lmtp:inet:{{getenv "LMTP_HOST"}}:{{getenv "LMTP_PORT"}}

View File

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