mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-30 15:44:56 +02:00
feat: Add MTA-STS support for outbound mail (#3592)
* feat: add support for MTA-STS for outgoing mails * Hook-up mta-sts-daemon into basic process handling test * fix: Call python script directly The python3 shebang will run it, which will now meet the expectations of the process testing via pgrep. fail2ban has the same approach. --------- Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
71e1102749
commit
e3331b0f44
14 changed files with 101 additions and 4 deletions
|
@ -68,7 +68,7 @@ function _install_packages() {
|
|||
)
|
||||
|
||||
POSTFIX_PACKAGES=(
|
||||
pflogsumm postgrey postfix-ldap
|
||||
pflogsumm postgrey postfix-ldap postfix-mta-sts-resolver
|
||||
postfix-pcre postfix-policyd-spf-python postsrsd
|
||||
)
|
||||
|
||||
|
|
|
@ -120,6 +120,11 @@ function _register_functions() {
|
|||
_register_setup_function '_setup_apply_fixes_after_configuration'
|
||||
_register_setup_function '_environment_variables_export'
|
||||
|
||||
if [[ ${ENABLE_MTA_STS} -eq 1 ]]; then
|
||||
_register_setup_function '_setup_mta_sts'
|
||||
_register_start_daemon '_start_daemon_mta_sts_daemon'
|
||||
fi
|
||||
|
||||
# ? >> Daemons
|
||||
|
||||
_register_start_daemon '_start_daemon_cron'
|
||||
|
|
|
@ -38,6 +38,7 @@ function _start_daemon_opendkim { _default_start_daemon 'opendkim' ;
|
|||
function _start_daemon_opendmarc { _default_start_daemon 'opendmarc' ; }
|
||||
function _start_daemon_postgrey { _default_start_daemon 'postgrey' ; }
|
||||
function _start_daemon_postsrsd { _default_start_daemon 'postsrsd' ; }
|
||||
function _start_daemon_mta_sts_daemon { _default_start_daemon 'mta-sts-daemon' ; }
|
||||
function _start_daemon_rspamd { _default_start_daemon 'rspamd' ; }
|
||||
function _start_daemon_rspamd_redis { _default_start_daemon 'rspamd-redis' ; }
|
||||
function _start_daemon_rsyslog { _default_start_daemon 'rsyslog' ; }
|
||||
|
|
|
@ -24,6 +24,7 @@ function _setup_save_states() {
|
|||
[[ ${ENABLE_FAIL2BAN} -eq 1 ]] && SERVICEDIRS+=('lib/fail2ban')
|
||||
[[ ${ENABLE_FETCHMAIL} -eq 1 ]] && SERVICEDIRS+=('lib/fetchmail')
|
||||
[[ ${ENABLE_GETMAIL} -eq 1 ]] && SERVICEDIRS+=('lib/getmail')
|
||||
[[ ${ENABLE_MTA_STS} -eq 1 ]] && SERVICEDIRS+=('lib/mta-sts')
|
||||
[[ ${ENABLE_POSTGREY} -eq 1 ]] && SERVICEDIRS+=('lib/postgrey')
|
||||
[[ ${ENABLE_RSPAMD} -eq 1 ]] && SERVICEDIRS+=('lib/rspamd')
|
||||
[[ ${ENABLE_RSPAMD_REDIS} -eq 1 ]] && SERVICEDIRS+=('lib/redis')
|
||||
|
@ -84,6 +85,7 @@ function _setup_save_states() {
|
|||
[[ ${ENABLE_AMAVIS} -eq 1 ]] && chown -R amavis:amavis "${STATEDIR}/lib-amavis"
|
||||
[[ ${ENABLE_CLAMAV} -eq 1 ]] && chown -R clamav:clamav "${STATEDIR}/lib-clamav"
|
||||
[[ ${ENABLE_FETCHMAIL} -eq 1 ]] && chown -R fetchmail:nogroup "${STATEDIR}/lib-fetchmail"
|
||||
[[ ${ENABLE_MTA_STS} -eq 1 ]] && chown -R _mta-sts:_mta-sts "${STATEDIR}/lib-mta-sts"
|
||||
[[ ${ENABLE_POSTGREY} -eq 1 ]] && chown -R postgrey:postgrey "${STATEDIR}/lib-postgrey"
|
||||
[[ ${ENABLE_RSPAMD} -eq 1 ]] && chown -R _rspamd:_rspamd "${STATEDIR}/lib-rspamd"
|
||||
[[ ${ENABLE_RSPAMD_REDIS} -eq 1 ]] && chown -R redis:redis "${STATEDIR}/lib-redis"
|
||||
|
|
7
target/scripts/startup/setup.d/mta-sts.sh
Normal file
7
target/scripts/startup/setup.d/mta-sts.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
function _setup_mta_sts() {
|
||||
_log 'trace' 'Adding MTA-STS lookup to the Postfix TLS policy map'
|
||||
_add_to_or_update_postfix_main smtp_tls_policy_maps 'socketmap:unix:/var/run/mta-sts/daemon.sock:postfix'
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue