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:
commit
43925aa44c
3
Makefile
3
Makefile
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue