Merge pull request #1273 from erik-wramner/issue_1271_take_2

Set REPORT_RECIPIENT to postmaster when 0
This commit is contained in:
Erik Wramner 2019-09-24 21:37:13 +02:00 committed by GitHub
commit 5dca9bd469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -451,14 +451,14 @@ function _setup_default_vars() {
# set PFLOGSUMM_TRIGGER here for backwards compatibility
# when REPORT_RECIPIENT is on the old method should be used
if [ "$REPORT_RECIPIENT" != "0" ]; then
DEFAULT_VARS["PFLOGSUMM_TRIGGER"]="${PFLOGSUMM_TRIGGER:="logrotate"}"
else
if [ "$REPORT_RECIPIENT" == "0" ]; then
DEFAULT_VARS["PFLOGSUMM_TRIGGER"]="${PFLOGSUMM_TRIGGER:="none"}"
else
DEFAULT_VARS["PFLOGSUMM_TRIGGER"]="${PFLOGSUMM_TRIGGER:="logrotate"}"
fi
# Expand address to simplify the rest of the script
if [ "$REPORT_RECIPIENT" == "1" ]; then
if [ "$REPORT_RECIPIENT" == "0" ] || [ "$REPORT_RECIPIENT" == "1" ]; then
REPORT_RECIPIENT="$POSTMASTER_ADDRESS"
DEFAULT_VARS["REPORT_RECIPIENT"]="${REPORT_RECIPIENT}"
fi