From 1bfc6d944aee49e58954ca9fa9c98441cab7debe Mon Sep 17 00:00:00 2001 From: Casper Date: Fri, 18 Mar 2022 19:41:02 +0100 Subject: [PATCH] Use FQDN as REPORT_SENDER default value. (#2487) --- target/scripts/start-mailserver.sh | 2 +- test/mail_with_ldap.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/scripts/start-mailserver.sh b/target/scripts/start-mailserver.sh index 2e845e58..340e40c1 100755 --- a/target/scripts/start-mailserver.sh +++ b/target/scripts/start-mailserver.sh @@ -18,7 +18,7 @@ _obtain_hostname_and_domainname # These variables must be defined first; They are used as default values for other variables. VARS[POSTMASTER_ADDRESS]="${POSTMASTER_ADDRESS:=postmaster@${DOMAINNAME}}" VARS[REPORT_RECIPIENT]="${REPORT_RECIPIENT:=${POSTMASTER_ADDRESS}}" -VARS[REPORT_SENDER]="${REPORT_SENDER:=mailserver-report@${DOMAINNAME}}" +VARS[REPORT_SENDER]="${REPORT_SENDER:=mailserver-report@${HOSTNAME}}" VARS[AMAVIS_LOGLEVEL]="${AMAVIS_LOGLEVEL:=0}" VARS[CLAMAV_MESSAGE_SIZE_LIMIT]="${CLAMAV_MESSAGE_SIZE_LIMIT:=25M}" # 25 MB diff --git a/test/mail_with_ldap.bats b/test/mail_with_ldap.bats index e7fc390a..cb6a962c 100644 --- a/test/mail_with_ldap.bats +++ b/test/mail_with_ldap.bats @@ -230,7 +230,7 @@ function teardown_file() { @test "checking pflogsum delivery" { # checking default sender is correctly set when env variable not defined - run docker exec mail_with_ldap grep "mailserver-report@${DOMAIN}" /etc/logrotate.d/maillog + run docker exec mail_with_ldap grep "mailserver-report@${FQDN_MAIL}" /etc/logrotate.d/maillog assert_success # checking default logrotation setup