mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-06-27 11:19:15 +02:00
setup: improve Amavis setup routine (#3079)
* improve Amavis setup routine see https://github.com/docker-mailserver/docker-mailserver/pull/3046#issuecomment-1423718811
This commit is contained in:
parent
f5d325bdc1
commit
40e10d755d
3 changed files with 55 additions and 10 deletions
|
@ -73,14 +73,14 @@ function _setup_amavis
|
|||
if [[ ${ENABLE_AMAVIS} -eq 1 ]]
|
||||
then
|
||||
_log 'debug' 'Setting up Amavis'
|
||||
|
||||
cat /etc/dms/postfix/master.d/postfix-amavis.cf >>/etc/postfix/master.cf
|
||||
postconf 'content_filter = smtp-amavis:[127.0.0.1]:10024'
|
||||
|
||||
sed -i \
|
||||
"s|^#\$myhostname = \"mail.example.com\";|\$myhostname = \"${HOSTNAME}\";|" \
|
||||
/etc/amavis/conf.d/05-node_id
|
||||
else
|
||||
_log 'debug' "Removing Amavis from Postfix's configuration"
|
||||
sed -i 's|content_filter =.*|content_filter =|' /etc/postfix/main.cf
|
||||
|
||||
_log 'debug' 'Disabling Amavis cron job'
|
||||
mv /etc/cron.d/amavisd-new /etc/cron.d/amavisd-new.disabled
|
||||
chmod 0 /etc/cron.d/amavisd-new.disabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue