readd wildcard sending functionality

This commit is contained in:
Sebastian Hugentobler 2022-10-31 13:38:08 +01:00
parent 17449cfdb4
commit fba756d7ac
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
4 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,8 @@ RUN apk add --no-cache \
postfix-pgsql \ postfix-pgsql \
openssl \ openssl \
libstdc++ \ libstdc++ \
libmilter libmilter \
icu-data-full
RUN addgroup -g 2222 access RUN addgroup -g 2222 access
RUN addgroup postfix access RUN addgroup postfix access

View File

@ -1,15 +1,11 @@
compatibility_level = 2 compatibility_level = 3.7
mail_owner = postfix mail_owner = postfix
myhostname = {{getenv "MYHOSTNAME"}} myhostname = {{getenv "MYHOSTNAME"}}
mydomain = {{getenv "MYDOMAIN"}} mydomain = {{getenv "MYDOMAIN"}}
myorigin = $mydomain myorigin = $mydomain
mydestination = $myhostname, localhost
proxy_interfaces = {{getenv "EXTERNAL_IP"}}
unknown_local_recipient_reject_code = 550 unknown_local_recipient_reject_code = 550
mynetworks_style = host
relay_domains = $mydestination relay_domains = $mydestination
recipient_delimiter = + recipient_delimiter = +
@ -59,8 +55,11 @@ smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes smtpd_tls_auth_only = yes
smtpd_sasl_tls_security_options = noanonymous smtpd_sasl_tls_security_options = noanonymous
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination smtpd_relay_restrictions =
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination, reject_unverified_recipient permit_mynetworks
permit_sasl_authenticated
defer_unauth_destination
reject_sender_login_mismatch
smtpd_sender_restrictions = reject_sender_login_mismatch smtpd_sender_restrictions = reject_sender_login_mismatch
smtpd_sender_login_maps = pgsql:/etc/postfix/pgsql-login-maps.cf smtpd_sender_login_maps = pgsql:/etc/postfix/pgsql-login-maps.cf

View File

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