Skip to content

Commit 19740b5

Browse files
committed
Let amavis bounce emails with banned content
iRedMail's questionable default behavior is to discard these messages silently.
1 parent 764c855 commit 19740b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ RUN sed -i '/\/var\/vmail\/backup/d' /var/spool/cron/crontabs/root
101101
# Use one DKIM key for all domains
102102
RUN sed -i s/^dkim_key\(\"$DOMAIN\"/dkim_key\(\"*\"/ /etc/amavis/conf.d/50-user
103103

104+
# Bounce banned emails instead of discarding them
105+
RUN sed -i "s/=> 'DISCARD'],/=> 'BOUNCE'],/" /etc/amavis/conf.d/50-user
106+
104107
# Amend config files for runsv compatibility
105108
RUN sed -i '/^Foreground /c Foreground true' /etc/clamav/clamd.conf \
106109
&& sed -i '/init.d/c pkill -sighup clamd' /etc/logrotate.d/clamav-daemon \

0 commit comments

Comments
 (0)