Merge pull request #145 from 00angus/master_rename-main

Changed the name of the postfix config we load at runtime
This commit is contained in:
Thomas VIAL 2016-04-21 12:23:15 +02:00
commit 43925aa44c
4 changed files with 9 additions and 8 deletions

View File

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

View File

@ -230,13 +230,13 @@ case $DMS_SSL in
esac
if [ -f /tmp/postfix/main.cf ]; then
if [ -f /tmp/postfix/runtime.main.cf ]; then
while read line; do
postconf -e "$line"
done < /tmp/postfix/main.cf
echo "Loaded '/tmp/postfix/main.cf'"
done < /tmp/postfix/runtime.main.cf
echo "Loaded '/tmp/postfix/runtime.main.cf'"
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
if [ ! -z "$SASL_PASSWORD" ]; then

View File

@ -245,10 +245,10 @@
[ "${lines[1]}" = "otherdomain.tld" ]
}
@test "checking postfix: main.cf overrides" {
run docker exec mail grep -q 'max_idle = 600s' /tmp/postfix/main.cf
@test "checking postfix: runtime.main.cf overrides" {
run docker exec mail grep -q 'max_idle = 600s' /tmp/postfix/runtime.main.cf
[ "$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 ]
}