Merge pull request #69 from bilak/master

Fixed crash of opendmarc
This commit is contained in:
Thomas VIAL 2016-01-29 18:55:14 +01:00
commit afffb8d151
3 changed files with 7 additions and 3 deletions

View file

@ -5,4 +5,4 @@ Syslog true
UMask 0002 UMask 0002
UserID opendmarc:opendmarc UserID opendmarc:opendmarc
IgnoreHosts /etc/opendmarc/ignore.hosts IgnoreHosts /etc/opendmarc/ignore.hosts
HistoryFile /var/run/opendmarc/opendmarc.dat HistoryFile /var/run/opendmarc/opendmarc.dat

View file

@ -100,10 +100,10 @@ chmod -R 0700 /etc/opendkim/keys/
# DMARC # DMARC
# if ther is no AuthservID create it # if ther is no AuthservID create it
if [ `cat /etc/opendmarc.conf | grep -w AuthservID | wc -l` -eq 0 ]; then if [ `cat /etc/opendmarc.conf | grep -w AuthservID | wc -l` -eq 0 ]; then
echo "AuthservID $hostname" >> /etc/opendmarc.conf echo "AuthservID $(hostname)" >> /etc/opendmarc.conf
fi fi
if [ `cat /etc/opendmarc.conf | grep -w TrustedAuthservIDs | wc -l` -eq 0 ]; then if [ `cat /etc/opendmarc.conf | grep -w TrustedAuthservIDs | wc -l` -eq 0 ]; then
echo "TrustedAuthservIDs $hostname" >> /etc/opendmarc.conf echo "TrustedAuthservIDs $(hostname)" >> /etc/opendmarc.conf
fi fi
if [ ! -f "/etc/opendmarc/ignore.hosts" ]; then if [ ! -f "/etc/opendmarc/ignore.hosts" ]; then
mkdir -p /etc/opendmarc/ mkdir -p /etc/opendmarc/

View file

@ -69,5 +69,9 @@ assert_raises "docker exec mail_pop3 grep ': error:' /var/log/mail.log" 1
# Testing OpenDKIM # Testing OpenDKIM
assert "docker exec mail cat /etc/opendkim/KeyTable | wc -l | sed -e 's/^[ \t]*//'" "2" assert "docker exec mail cat /etc/opendkim/KeyTable | wc -l | sed -e 's/^[ \t]*//'" "2"
# Testing OpenDMARC
assert "docker exec mail cat /etc/opendmarc.conf | grep ^AuthservID | wc -l" "1"
assert "docker exec mail cat /etc/opendmarc.conf | grep ^TrustedAuthservID | wc -l" "1"
# Ending tests # Ending tests
assert_end assert_end