Deliver root mail (#952)

* Configure delivery of root's mail to postmaster
* Tests for delivery of root mail
* add missing email template
This commit is contained in:
Paul Adams 2018-04-23 19:35:33 +01:00 committed by Johan Smits
parent 39954da78e
commit ea848eb86f
6 changed files with 26 additions and 7 deletions

View file

@ -656,7 +656,7 @@ function _setup_spoof_protection () {
sed -i 's|smtpd_sender_restrictions =|smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch,|' /etc/postfix/main.cf
[ "$ENABLE_LDAP" = 1 ] \
&& postconf -e "smtpd_sender_login_maps=ldap:/etc/postfix/ldap-users.cf ldap:/etc/postfix/ldap-aliases.cf ldap:/etc/postfix/ldap-groups.cf" \
|| postconf -e "smtpd_sender_login_maps=texthash:/etc/postfix/virtual, texthash:/etc/aliases, pcre:/etc/postfix/maps/sender_login_maps.pcre"
|| postconf -e "smtpd_sender_login_maps=texthash:/etc/postfix/virtual, hash:/etc/aliases, pcre:/etc/postfix/maps/sender_login_maps.pcre"
}
function _setup_postfix_access_control() {
@ -754,6 +754,10 @@ function _setup_postfix_aliases() {
s/$/ pcre:\/etc\/postfix\/regexp/
}' /etc/postfix/main.cf
fi
notify 'inf' "Configuring root alias"
echo "root: ${POSTMASTER_ADDRESS}" > /etc/aliases
postalias /etc/aliases
}
function _setup_SRS() {