Allow user provided configuration of amavis
This commit is contained in:
parent
d926dc8828
commit
dc7611d9f0
|
@ -397,6 +397,12 @@ fi
|
||||||
if ! [ "$DISABLE_CLAMAV" = 1 ]; then
|
if ! [ "$DISABLE_CLAMAV" = 1 ]; then
|
||||||
/etc/init.d/clamav-daemon start
|
/etc/init.d/clamav-daemon start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Copy user provided configuration files if provided
|
||||||
|
if [ -f /tmp/docker-mailserver/amavis.cf ]; then
|
||||||
|
cp /tmp/docker-mailserver/amavis.cf /etc/amavis/conf.d/50-user
|
||||||
|
fi
|
||||||
|
|
||||||
if ! [ "$DISABLE_AMAVIS" = 1 ]; then
|
if ! [ "$DISABLE_AMAVIS" = 1 ]; then
|
||||||
/etc/init.d/amavis start
|
/etc/init.d/amavis start
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Place your configuration directives here. They will override those in
|
||||||
|
# earlier files.
|
||||||
|
#
|
||||||
|
# See /usr/share/doc/amavisd-new/ for documentation and examples of
|
||||||
|
# the directives you can use in this file
|
||||||
|
#
|
||||||
|
|
||||||
|
# Test Verification
|
||||||
|
|
||||||
|
#------------ Do not modify anything below this line -------------
|
||||||
|
1; # ensure a defined return
|
|
@ -660,3 +660,13 @@
|
||||||
run docker exec mail_pop3 /bin/sh -c "postconf | grep '^mynetworks =' | egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}/32'"
|
run docker exec mail_pop3 /bin/sh -c "postconf | grep '^mynetworks =' | egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}/32'"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# amavis
|
||||||
|
#
|
||||||
|
|
||||||
|
@test "checking amavis: config overrides" {
|
||||||
|
run docker exec mail /bin/sh -c "grep 'Test Verification' /etc/amavis/conf.d/50-user | wc -l"
|
||||||
|
[ "$status" -eq 0 ]
|
||||||
|
[ "$output" -eq 1 ]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue