feature: provide initial Rspamd support (#2902)

This commit is contained in:
Georg Lauterbach 2023-01-05 08:39:00 +01:00 committed by GitHub
parent a00cdcdee9
commit 26ac48f34a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 118 additions and 0 deletions

View file

@ -35,6 +35,8 @@ function _start_daemon_postsrsd { _default_start_daemon 'postsrsd' ;
function _start_daemon_postfix { _default_start_daemon 'postfix' ; }
function _start_daemon_rsyslog { _default_start_daemon 'rsyslog' ; }
function _start_daemon_update_check { _default_start_daemon 'update-check' ; }
function _start_daemon_rspamd { _default_start_daemon 'rspamd' ; }
function _start_daemon_redis { _default_start_daemon 'redis' ; }
function _start_daemon_saslauthd
{

View file

@ -33,6 +33,8 @@ function _misc_save_states
[[ ${ENABLE_FAIL2BAN} -eq 1 ]] && FILES+=('lib/fail2ban')
[[ ${ENABLE_FETCHMAIL} -eq 1 ]] && FILES+=('lib/fetchmail')
[[ ${ENABLE_POSTGREY} -eq 1 ]] && FILES+=('lib/postgrey')
[[ ${ENABLE_RSPAMD} -ne 1 ]] && FILES+=('lib/rspamd')
# [[ ${ENABLE_RSPAMD} -ne 1 ]] && FILES+=('lib/redis')
[[ ${ENABLE_SPAMASSASSIN} -eq 1 ]] && FILES+=('lib/spamassassin')
[[ ${SMTP_ONLY} -ne 1 ]] && FILES+=('lib/dovecot')

View file

@ -89,6 +89,27 @@ function _setup_amavis
fi
}
function _setup_rspamd
{
_log 'warn' 'Rspamd support is under active development, expect breaking changes at any time'
if [[ ${ENABLE_AMAVIS} -eq 1 ]] || [[ ${ENABLE_SPAMASSASSIN} -eq 1 ]]
then
_shutdown 'You cannot run Amavis/SpamAssassin and Rspamd at the same time'
fi
if [[ ${ENABLE_CLAMAV} -eq 1 ]]
then
_log 'debug' 'Rspamd will use ClamAV'
mv /etc/rspamd/local.d/disabled/antivirus.conf /etc/rspamd/local.d/antivirus.conf
else
_log 'debug' 'Rspamd will not use ClamAV (which has not been enabled)'
fi
_log 'warn' 'Only running with default configuration'
_log 'warn' 'You will need to adjust the Postfix configuration yourself to use Rspamd as of now'
}
function _setup_dmarc_hostname
{
_log 'debug' 'Setting up DMARC'