Merge branch 'master' into k3s
This commit is contained in:
commit
2458c52211
@ -1,11 +1,12 @@
|
|||||||
FROM thallian/confd-env:latest
|
FROM docker.io/thallian/confd-env:3.16
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
postfix \
|
postfix \
|
||||||
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
|
||||||
|
@ -8,7 +8,8 @@ create table if not exists virtual_domains (
|
|||||||
|
|
||||||
create table if not exists virtual_users (
|
create table if not exists virtual_users (
|
||||||
email text primary key,
|
email text primary key,
|
||||||
domain_name text not null references virtual_domains(name)
|
domain_name text not null references virtual_domains(name),
|
||||||
|
wildcard_sender bool default false
|
||||||
);
|
);
|
||||||
|
|
||||||
create table if not exists virtual_aliases (
|
create table if not exists virtual_aliases (
|
||||||
@ -17,9 +18,6 @@ create table if not exists virtual_aliases (
|
|||||||
destination text not null
|
destination text not null
|
||||||
);
|
);
|
||||||
|
|
||||||
create table if not exists virtual_senders (
|
|
||||||
email text not null references virtual_users(email)
|
|
||||||
);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Volumes
|
# Volumes
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
compatibility_level = 2
|
compatibility_level = 3.7
|
||||||
|
|
||||||
|
inet_protocols = all
|
||||||
|
|
||||||
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 = +
|
||||||
|
|
||||||
@ -22,8 +20,8 @@ virtual_mailbox_domains = pgsql:/etc/postfix/pgsql-virtual-mailbox-domains.cf
|
|||||||
virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual-alias-maps.cf
|
virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual-alias-maps.cf
|
||||||
virtual_transport = lmtp:inet:{{getenv "LMTP_HOST"}}:{{getenv "LMTP_PORT"}}
|
virtual_transport = lmtp:inet:{{getenv "LMTP_HOST"}}:{{getenv "LMTP_PORT"}}
|
||||||
|
|
||||||
smtpd_tls_key_file=/etc/ssl/mail/tls.key
|
smtpd_tls_key_file=/etc/ssl/mail/key.pem
|
||||||
smtpd_tls_cert_file=/etc/ssl/mail/tls.crt
|
smtpd_tls_cert_file=/etc/ssl/mail/cert.pem
|
||||||
|
|
||||||
smtp_tls_security_level = {{getenv "TLS_SECURITY_LEVEL" "may"}}
|
smtp_tls_security_level = {{getenv "TLS_SECURITY_LEVEL" "may"}}
|
||||||
smtp_tls_auth_only = yes
|
smtp_tls_auth_only = yes
|
||||||
@ -59,18 +57,19 @@ 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
|
||||||
|
|
||||||
smtpd_milters={{getenv "RSPAMD_ADDRESS" "inet:127.0.0.1:11332"}}
|
smtpd_milters={{getenv "RSPAMD_ADDRESS" "inet:127.0.0.1:11332"}}
|
||||||
non_smtpd_milters=$smtpd_milters
|
non_smtpd_milters=$smtpd_milters
|
||||||
milter_mail_macros="i {mail_addr} {client_addr} {client_name} {auth_authen}"
|
|
||||||
milter_default_action = accept
|
milter_default_action = accept
|
||||||
milter_macro_daemon_name = ORIGINATING
|
milter_macro_daemon_name = ORIGINATING
|
||||||
milter_connect_macros = "i j {daemon_name} v {if_name} _"
|
|
||||||
|
|
||||||
message_size_limit = {{getenv "MESSAGE_SIZELIMIT" "20000000"}}
|
message_size_limit = {{getenv "MESSAGE_SIZELIMIT" "20000000"}}
|
||||||
|
|
||||||
|
@ -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='%s' UNION SELECT destination FROM virtual_aliases WHERE email='%s'
|
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'
|
||||||
|
@ -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 destination FROM virtual_aliases WHERE email='%s'
|
query = SELECT destination FROM virtual_aliases WHERE source='%u'
|
||||||
|
@ -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 name FROM virtual_domains WHERE name='%s'
|
query = SELECT name FROM virtual_domains WHERE name='%u'
|
||||||
|
@ -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 ='%s'
|
query = SELECT email FROM virtual_users WHERE email ='%u'
|
||||||
|
Loading…
Reference in New Issue
Block a user