Initial commit

This commit is contained in:
2026-03-27 04:12:36 +01:00
parent 0ed8044a70
commit 7306fe697c
5 changed files with 230 additions and 2 deletions

41
config/main.cf.tpl Normal file
View File

@@ -0,0 +1,41 @@
biff = no
maillog_file = /dev/stdout
debug_peer_level = 1
compatibility_level=3.6
append_dot_mydomain = no
readme_directory = no
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
smtpd_banner = {{ .Env.POSTFIX_SMTPD_BANNER }}
smtpd_relay_restrictions = permit_mynetworks defer_unauth_destination
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
smtpd_use_tls = {{ .Env.POSTFIX_SMTPD_USE_TLS }}
smtpd_tls_auth_only = {{ .Env.POSTFIX_SMTPD_TLS_AUTH_ONLY }}
smtpd_tls_cert_file={{ .Env.POSTFIX_SMTPD_TLS_CERT_FILE }}
smtpd_tls_key_file={{ .Env.POSTFIX_SMTPD_TLS_KEY_FILE }}
smtp_tls_CApath={{ .Env.POSTFIX_SMTP_TLS_CAPATH }}
smtp_tls_security_level = {{ .Env.POSTFIX_SMTP_TLS_SECURITY_LEVEL }}
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
myhostname = {{ .Env.POSTFIX_MYHOSTNAME }}
mydomain = {{ .Env.POSTFIX_MYDOMAIN }}
mynetworks = {{ .Env.POSTFIX_MYNETWORKS }}
mydestination = $myhostname, localhost.$mydomain $mydomain
inet_interfaces = {{ .Env.POSTFIX_INET_INTERFACES }}
inet_protocols = {{ .Env.POSTFIX_INET_PROTOCOLS }}
milter_protocol = 6
milter_default_action = accept
{{- if .Env.POSTFIX_SMTPD_MILTERS }}
smtpd_milters = inet:{{ .Env.POSTFIX_SMTPD_MILTERS }}
{{- end }}
{{- if .Env.POSTFIX_NON_SMTPD_MILTERS }}
non_smtpd_milters = inet:{{ .Env.POSTFIX_NON_SMTPD_MILTERS }}
{{- end }}

64
config/master.cf.tpl Normal file
View File

@@ -0,0 +1,64 @@
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
# SMTP configuration.
{{ if eq .Env.POSTFIX_SMTP_ENABLED "yes" }}
smtp inet n - y - - smtpd
-o syslog_name=postfix/smtp
{{ end }}
# Submission configuration.
{{ if eq .Env.POSTFIX_SUBMISSION_ENABLED "yes" }}
submission inet n - y - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
{{ end }}
# SSL encrypted SMTP configuration.
{{ if eq .Env.POSTFIX_SMTPS_ENABLED "yes" }}
smtps inet n - y - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
{{ end }}
# Other internal services.
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
-o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
postlog unix-dgram n - n - 1 postlogd