mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
Report sender (#965)
* added REPORT_SENDER env variable to the container. * integration test for REPORT_SENDER * added tests for default REPORT_SENDER
This commit is contained in:
parent
c1118af66d
commit
60656aec49
8 changed files with 35 additions and 3 deletions
|
@ -1596,6 +1596,16 @@ load 'test_helper/bats-assert/load'
|
|||
sleep 10
|
||||
run docker exec mail grep "Subject: Postfix Summary for " /var/mail/localhost.localdomain/user1/new/ -R
|
||||
assert_success
|
||||
# check sender is the one specified in REPORT_SENDER
|
||||
run docker exec mail grep "From: report1@mail.my-domain.com" /var/mail/localhost.localdomain/user1/new/ -R
|
||||
assert_success
|
||||
# check sender is not the default one.
|
||||
run docker exec mail grep "From: mailserver-report@mail.my-domain.com" /var/mail/localhost.localdomain/user1/new/ -R
|
||||
assert_failure
|
||||
|
||||
# checking default sender is correctly set when env variable not defined
|
||||
run docker exec mail_with_ldap grep "mailserver-report@mail.my-domain.com" /etc/logrotate.d/maillog
|
||||
assert_success
|
||||
# checking default logrotation setup
|
||||
run docker exec mail_with_ldap grep "daily" /etc/logrotate.d/maillog
|
||||
assert_success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue