Changed the name of the postfix config we load at runtime, from

main.cf to runtime.main.cf.
That should clarify the use of that file, i.e. for runtime changes
to postfix config.
This commit is contained in:
angus 2016-04-21 00:20:03 +02:00
parent c278a4a46a
commit b9becc08d6
4 changed files with 9 additions and 8 deletions

View File

@ -9,7 +9,7 @@ build:
run: run:
# Copy test files # Copy test files
cp -a test/accounts-db/ postfix/ cp -a test/accounts-db/ postfix/
cp test/main.cf postfix/ cp test/runtime.main.cf postfix/
cp test/virtual postfix/ cp test/virtual postfix/
# Run containers # Run containers
docker run -d --name mail \ docker run -d --name mail \
@ -63,5 +63,6 @@ tests:
clean: clean:
# Get default files back # Get default files back
git checkout postfix/accounts-db postfix/main.cf postfix/virtual git checkout postfix/accounts-db postfix/main.cf postfix/virtual
rm -f postfix/runtime.main.cf
# Remove running test containers # Remove running test containers
docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban

View File

@ -230,13 +230,13 @@ case $DMS_SSL in
esac esac
if [ -f /tmp/postfix/main.cf ]; then if [ -f /tmp/postfix/runtime.main.cf ]; then
while read line; do while read line; do
postconf -e "$line" postconf -e "$line"
done < /tmp/postfix/main.cf done < /tmp/postfix/runtime.main.cf
echo "Loaded '/tmp/postfix/main.cf'" echo "Loaded '/tmp/postfix/runtime.main.cf'"
else else
echo "'/tmp/postfix/main.cf' not provided. No extra postfix settings loaded." echo "'/tmp/postfix/runtime.main.cf' not provided. No extra postfix settings loaded."
fi fi
if [ ! -z "$SASL_PASSWORD" ]; then if [ ! -z "$SASL_PASSWORD" ]; then

View File

@ -245,10 +245,10 @@
[ "${lines[1]}" = "otherdomain.tld" ] [ "${lines[1]}" = "otherdomain.tld" ]
} }
@test "checking postfix: main.cf overrides" { @test "checking postfix: runtime.main.cf overrides" {
run docker exec mail grep -q 'max_idle = 600s' /tmp/postfix/main.cf run docker exec mail grep -q 'max_idle = 600s' /tmp/postfix/runtime.main.cf
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
run docker exec mail grep -q 'readme_directory = /tmp' /tmp/postfix/main.cf run docker exec mail grep -q 'readme_directory = /tmp' /tmp/postfix/runtime.main.cf
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }