1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-08 23:06:49 +02:00

Adjust envrionment variables - more sensible defaults (#2428)

The new setup will now set env variables on one place and on one place
only. The old setup used two separate places wich is not DRY and
confusing.

Some default values changed:

1. PFLOGSUMM_TRIGGER: logrotate => none
2. REPORT_SENDER: mailserver-report@HOSTNAME => mailserver-report@DOMAIN
3. REPORT_RECIPIENT: "0" => POSTMASTER_ADDRESS

One env variable was renamed: REPORT_INTERVAL => LOGROTATE_INTERVAL

I believe these defaults to be more sensible, especially the REPORT_RECIPIENT
address. The PFLOGSUMM_TRIGGER value was changed to `none` because otherwise
people would start getting daily Postfix log summary reports automatically.
Now, this is opt-in, and reports are sent only when enabled properly.

Some of the variables changed were marked as deprecated. I removed the note,
as the variables now bear some (sane) defaults again for other variables
(i.e.) REPORT_RECIPIENT is now default for other recipient addresses.

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
This commit is contained in:
Georg Lauterbach
2022-03-02 22:22:17 +01:00
committed by GitHub
parent 57c52d7b5b
commit e6af5a118f
6 changed files with 62 additions and 95 deletions

View File

@ -217,24 +217,28 @@ LOGWATCH_RECIPIENT=
# => Specify the sender address
LOGWATCH_SENDER=
# Enables a report being sent (created by pflogsumm) on a regular basis. (deprecated)
# **0** => Report emails are disabled
# 1 => Using POSTMASTER_ADDRESS as the recipient
# Defines who receives reports if they are enabled.
# **empty** => ${POSTMASTER_ADDRESS}
# => Specify the recipient address
REPORT_RECIPIENT=0
REPORT_RECIPIENT=
# Change the sending address for mail report (deprecated)
# **empty** => mailserver-report@hostname
# => Specify the report sender (From) address
# Defines who sends reports if they are enabled.
# **empty** => mailserver-report@${DOMAINNAME}
# => Specify the sender address
REPORT_SENDER=
# Changes the interval in which a report is being sent. (deprecated)
# **daily** => Send a daily report
# weekly => Send a report every week
# Changes the interval in which a report is being sent.
# **weekly** => Send a report every week
# daily => Send a daily report
# monthly => Send a report every month
#
# Note: This Variable actually controls logrotate inside the container and rotates the log depending on this setting. The main log output is still available in its entirety via `docker logs mail` (Or your respective container name). If you want to control logrotation for the docker generated logfile see: [Docker Logging Drivers](https://docs.docker.com/config/containers/logging/configure/)
REPORT_INTERVAL=daily
# Note: This Variable actually controls logrotate inside the container
# and rotates the log depending on this setting. The main log output is
# still available in its entirety via `docker logs mail` (Or your
# respective container name). If you want to control logrotation for
# the Docker-generated logfile see:
# https://docs.docker.com/config/containers/logging/configure/
LOGROTATE_INTERVAL=weekly
# Choose TCP/IP protocols for postfix to use
# **all** => All possible protocols.
@ -269,7 +273,7 @@ SPAMASSASSIN_SPAM_TO_INBOX=1
# Note: only has an effect if `ENABLE_SPAMASSASSIN=1`
ENABLE_SPAMASSASSIN_KAM=0
# this setting needs `SPAMASSASSIN_SPAM_TO_INBOX=1`
# spam messages will be moved in the Junk folder (SPAMASSASSIN_SPAM_TO_INBOX=1 required)
MOVE_SPAM_TO_JUNK=1
# add spam info headers if at, or above that level: