mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
parent
b2922935ff
commit
2e4e65b705
8
Makefile
8
Makefile
|
@ -51,6 +51,13 @@ run:
|
||||||
-e OVERRIDE_HOSTNAME=mail.my-domain.com \
|
-e OVERRIDE_HOSTNAME=mail.my-domain.com \
|
||||||
-t $(NAME)
|
-t $(NAME)
|
||||||
sleep 15
|
sleep 15
|
||||||
|
docker run -d --name mail_smtponly_without_config \
|
||||||
|
-e SMTP_ONLY=1 \
|
||||||
|
-e ENABLE_LDAP=1 \
|
||||||
|
-e PERMIT_DOCKER=network \
|
||||||
|
-e OVERRIDE_HOSTNAME=mail.mydomain.com \
|
||||||
|
-t $(NAME)
|
||||||
|
sleep 15
|
||||||
docker run -d --name mail_override_hostname \
|
docker run -d --name mail_override_hostname \
|
||||||
-v "`pwd`/test/config":/tmp/docker-mailserver \
|
-v "`pwd`/test/config":/tmp/docker-mailserver \
|
||||||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||||
|
@ -177,6 +184,7 @@ clean:
|
||||||
mail \
|
mail \
|
||||||
mail_pop3 \
|
mail_pop3 \
|
||||||
mail_smtponly \
|
mail_smtponly \
|
||||||
|
mail_smtponly_without_config \
|
||||||
mail_fail2ban \
|
mail_fail2ban \
|
||||||
mail_fetchmail \
|
mail_fetchmail \
|
||||||
fail-auth-mailer \
|
fail-auth-mailer \
|
||||||
|
|
|
@ -734,6 +734,9 @@ function _setup_dkim() {
|
||||||
chmod -R 0700 /etc/opendkim/keys/
|
chmod -R 0700 /etc/opendkim/keys/
|
||||||
else
|
else
|
||||||
notify 'warn' "No DKIM key provided. Check the documentation to find how to get your keys."
|
notify 'warn' "No DKIM key provided. Check the documentation to find how to get your keys."
|
||||||
|
|
||||||
|
local _f_keytable="/etc/opendkim/KeyTable"
|
||||||
|
[ ! -f "$_f_keytable" ] && touch "$_f_keytable"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -472,6 +472,12 @@ load 'test_helper/bats-assert/load'
|
||||||
assert_output 2
|
assert_output 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "checking opendkim: /etc/opendkim/KeyTable dummy file generated without keys provided" {
|
||||||
|
run docker exec mail_smtponly_without_config /bin/bash -c "cat /etc/opendkim/KeyTable"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@test "checking opendkim: /etc/opendkim/keys/ should contain 2 entries" {
|
@test "checking opendkim: /etc/opendkim/keys/ should contain 2 entries" {
|
||||||
run docker exec mail /bin/sh -c "ls -l /etc/opendkim/keys/ | grep '^d' | wc -l"
|
run docker exec mail /bin/sh -c "ls -l /etc/opendkim/keys/ | grep '^d' | wc -l"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
Loading…
Reference in a new issue