Rename start.d scripts to preserve order
All checks were successful
Build Docker images / docker (eumau/postfix, 6) (push) Successful in 14m58s

This commit is contained in:
Mauro Torrez
2026-01-19 12:15:30 -03:00
parent e4efaf2a7c
commit 9a31fb86f3
5 changed files with 0 additions and 0 deletions

77
templates/start.d/99_main Executable file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
# Managing main.cf:
# postconf [-dfhHnopvx] [-c config_dir] [-C class,...] [parameter ...]
# postconf [-epv] [-c config_dir] parameter=value ...
# postconf -# [-pv] [-c config_dir] parameter ...
# postconf -X [-pv] [-c config_dir] parameter ...
# Managing master.cf service entries:
# postconf -M [-fovx] [-c config_dir] [service[/type] ...]
# postconf -M [-ev] [-c config_dir] service/type=value ...
# postconf -M# [-v] [-c config_dir] service/type ...
# postconf -MX [-v] [-c config_dir] service/type ...
# Managing master.cf service fields:
# postconf -F [-fhHovx] [-c config_dir] [service[/type[/field]] ...]
# postconf -F [-ev] [-c config_dir] service/type/field=value ...
# Managing master.cf service parameters:
# postconf -P [-fhHovx] [-c config_dir] [service[/type[/parameter]] ...]
# postconf -P [-ev] [-c config_dir] service/type/parameter=value ...
# postconf -PX [-v] [-c config_dir] service/type/parameter ...
# Managing bounce message templates:
# postconf -b [-v] [-c config_dir] [template_file]
# postconf -t [-v] [-c config_dir] [template_file]
# Managing TLS features:
# postconf -T mode [-v] [-c config_dir]
# Managing other configuration:
# postconf -a|-A|-l|-m [-v] [-c config_dir]
postconf maillog_file=/dev/stdout
postconf alias_maps=hash:/etc/aliases
{{ with getenv "BIFF" }}postconf biff='{{.}}'{{ end }}
{{ with getenv "MESSAGE_SIZE_LIMIT" }}postconf message_size_limit='{{.}}'{{ end }}
{{ with getenv "MYDESTINATION" }}postconf mydestination='{{.}}'{{ end }}
{{ with getenv "MYDOMAIN" }}postconf mydomain='{{.}}'{{ end }}
{{ with getenv "MYHOSTNAME" }}postconf myhostname='{{.}}'{{ end }}
{{ with getenv "MYNETWORKS" }}postconf mynetworks='{{.}}'{{ end }}
{{ with getenv "MYNETWORKS_STYLE" }}postconf mynetworks_style='{{.}}'{{ end }}
{{ with getenv "PROPAGATE_UNMATCHED_EXTENSIONS" }}postconf propagate_unmatched_extensions='{{.}}'{{ end }}
{{ with getenv "RECIPIENT_DELIMITER" }}postconf recipient_delimiter='{{.}}'{{ end }}
{{ with getenv "SMTP_TLS_SECURITY_LEVEL" }}postconf smtp_tls_security_level='{{.}}'{{ end }}
{{ with getenv "SMTPD_CLIENT_RESTRICTIONS" }}postconf smtpd_client_restrictions='{{.}}'{{ end }}
{{ with getenv "SMTPD_DATA_RESTRICTIONS" }}postconf smtpd_data_restrictions='{{.}}'{{ end }}
{{ with getenv "SMTPD_HELO_REQUIRED" }}postconf smtpd_helo_required='{{.}}'{{ end }}
{{ with getenv "SMTPD_HELO_RESTRICTIONS" }}postconf smtpd_helo_restrictions='{{.}}'{{ end }}
{{ with getenv "SMTPD_RECIPIENT_RESTRICTIONS" }}postconf smtpd_recipient_restrictions='{{.}}'{{ end }}
{{ with getenv "SMTPD_RELAY_RESTRICTIONS" }}postconf smtpd_relay_restrictions='{{.}}'{{ end }}
{{ with getenv "SMTPD_SASL_AUTH_ENABLE" }}postconf smtpd_sasl_auth_enable='{{.}}'{{ end }}
{{ with getenv "SMTPD_SASL_PATH" }}postconf smtpd_sasl_path='{{.}}'{{ end }}
{{ with getenv "SMTPD_SASL_TYPE" }}postconf smtpd_sasl_type='{{.}}'{{ end }}
{{ with getenv "SMTPD_TLS_AUTH_ONLY" }}postconf smtpd_tls_auth_only='{{.}}'{{ end }}
{{ with getenv "SMTPD_TLS_CERT_FILE" }}postconf smtpd_tls_cert_file='{{.}}'{{ end }}
{{ with getenv "SMTPD_TLS_KEY_FILE" }}postconf smtpd_tls_key_file='{{.}}'{{ end }}
{{ with getenv "SMTPD_TLS_SECURITY_LEVEL" }}postconf smtpd_tls_security_level='{{.}}'{{ end }}
{{ with getenv "SMTPD_TLS_SESSION_CACHE_DATABASE" }}postconf smtpd_tls_session_cache_database='{{.}}'{{ end }}
{{ with getenv "SMTPUTF8_ENABLE" }}postconf smtputf8_enable='{{.}}'{{ end }}
{{ with getenv "VIRTUAL_ALIAS_MAPS" }}postconf virtual_alias_maps='{{.}}'{{ end }}
{{ with getenv "VIRTUAL_MAILBOX_DOMAINS" }}postconf virtual_mailbox_domains='{{.}}'{{ end }}
{{ with getenv "VIRTUAL_MAILBOX_MAPS" }}postconf virtual_mailbox_maps='{{.}}'{{ end }}
{{ with getenv "VIRTUAL_TRANSPORT" }}postconf virtual_transport='{{.}}'{{ end }}
postconf -M spamfilter/unix | grep -q spamfilter || {
postconf -M spamfilter/unix="spamfilter unix - n n - - pipe"
}
postconf -F spamfilter/unix/private=- \
spamfilter/unix/unprivileged=n \
spamfilter/unix/chroot=n \
spamfilter/unix/wakeup=- \
spamfilter/unix/process_limit=- \
spamfilter/unix/command='pipe flags=Rq user=vmail argv=/usr/local/bin/spamfilter -oi -f ${sender} ${recipient}'
# run postmap for all lookup tables
postmap_all