diff --git a/.github/workflows/docs-preview-deploy.yml b/.github/workflows/docs-preview-deploy.yml
index 3b6f3c67..dbe57752 100644
--- a/.github/workflows/docs-preview-deploy.yml
+++ b/.github/workflows/docs-preview-deploy.yml
@@ -45,7 +45,7 @@ jobs:
# but presently does not work correctly via split workflow. It is useful in a split workflow as the 1st stage
# no longer indicates if the entire workflow/deployment was successful.
- name: 'Commit Status: Set Workflow Status as Pending'
- uses: myrotvorets/set-commit-status-action@v2.0.0
+ uses: myrotvorets/set-commit-status-action@v2.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
@@ -105,7 +105,7 @@ jobs:
Built with commit: ${{ env.PR_HEADSHA }}
- name: 'Commit Status: Update deployment status'
- uses: myrotvorets/set-commit-status-action@v2.0.0
+ uses: myrotvorets/set-commit-status-action@v2.0.1
# Always run this step regardless of job failing early:
if: ${{ always() }}
env:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b05b5d1..009e2355 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -60,6 +60,11 @@ The most noteworthy change of this release is the update of the container's base
- `undef` was previously supported as an opt-out with `SA_SPAM_SUBJECT`. This is no longer valid, the equivalent opt-out value is now an empty value (_or rather the omission of this ENV being configured_).
- The feature to include [`_SCORE_` tag](https://spamassassin.apache.org/full/4.0.x/doc/Mail_SpamAssassin_Conf.html#rewrite_header-subject-from-to-STRING) in your value to be replaced by the associated spam score is no longer available.
+### Added
+
+- **Environment Variables:**
+ - `LOGROTATE_COUNT` defines the number of files kept by logrotate ([#3907](https://github.com/docker-mailserver/docker-mailserver/pull/3907))
+
### Updates
- **Environment Variables:**
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 1e252291..c387a654 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -291,28 +291,21 @@ Thanks goes to these wonderful people ✨
pyy
-
-
-
-
- dennis95stumm
-
- |
arneke
- |
-
+
akmet
- |
+
+
@@ -347,15 +340,15 @@ Thanks goes to these wonderful people ✨
lukecyca
- |
-
+
jsonn
- |
+
+
@@ -363,13 +356,6 @@ Thanks goes to these wonderful people ✨
jamebus
|
-
-
-
-
- dashohoxha
-
- |
@@ -377,6 +363,13 @@ Thanks goes to these wonderful people ✨
mathuin
|
+
+
+
+
+ dashohoxha
+
+ |
@@ -390,15 +383,15 @@ Thanks goes to these wonderful people ✨
weo
- |
-
+
Zehir
- |
+
+
@@ -433,15 +426,15 @@ Thanks goes to these wonderful people ✨
VanVan
- |
-
+
mjung
- |
+
+
@@ -476,15 +469,15 @@ Thanks goes to these wonderful people ✨
Starbix
- |
-
+
citec
- |
+
+
@@ -519,15 +512,15 @@ Thanks goes to these wonderful people ✨
MakerMatrix
- |
-
+
pbek
- |
+
+
@@ -562,15 +555,15 @@ Thanks goes to these wonderful people ✨
bobbravo2
- |
-
+
r-pufky
- |
+
+
@@ -605,15 +598,15 @@ Thanks goes to these wonderful people ✨
j-marz
- |
-
+
lokipo
- |
+
+
@@ -648,15 +641,15 @@ Thanks goes to these wonderful people ✨
yogo1212
- |
-
+
willtho89
- |
+
+
@@ -691,15 +684,15 @@ Thanks goes to these wonderful people ✨
andrewlow
- |
-
+
aminvakil
- |
+
+
@@ -734,15 +727,15 @@ Thanks goes to these wonderful people ✨
DuncanvR
- |
-
+
emazzotta
- |
+
+
@@ -777,34 +770,20 @@ Thanks goes to these wonderful people ✨
jedateach
- |
-
+
millaguie
- |
+
+
-
-
+
+
- eltociear
-
- |
-
-
-
-
- H4R0
-
- |
-
-
-
-
- jamesfryer
+ fl42
|
@@ -815,10 +794,31 @@ Thanks goes to these wonderful people ✨
|
-
-
+
+
- fl42
+ eltociear
+
+ |
+
+
+
+
+ jamesfryer
+
+ |
+
+
+
+
+ H4R0
+
+ |
+
+
+
+
+ nilshoell
|
@@ -872,13 +872,6 @@ Thanks goes to these wonderful people ✨
TechnicLab
-
-
-
-
- ShiriNmi1520
-
- |
@@ -893,21 +886,13 @@ Thanks goes to these wonderful people ✨
Thiritin
|
-
-
-
-
- 42wim
-
- |
tweibert
- |
-
+
@@ -921,7 +906,8 @@ Thanks goes to these wonderful people ✨
VictorKoenders
- |
+
+
@@ -949,15 +935,22 @@ Thanks goes to these wonderful people ✨
vilisas
- |
-
+
-
-
+
+
- nilshoell
+ 42wim
|
+
+
+
+
+ ShiriNmi1520
+
+ |
+
@@ -992,15 +985,15 @@ Thanks goes to these wonderful people ✨
mrPjer
- |
-
+
p3dda
- |
+
+
@@ -1035,6 +1028,13 @@ Thanks goes to these wonderful people ✨
remoe
+ |
+
+
+
+
+ robbertkl
+
|
@@ -1717,14 +1717,21 @@ Thanks goes to these wonderful people ✨
crash7
|
+
+
+
+
+ fkefer
+
+ |
+
thechubbypanda
- |
-
+
@@ -1759,15 +1766,15 @@ Thanks goes to these wonderful people ✨
linhandev
- |
+
+
luke-
- |
-
+
@@ -1802,15 +1809,15 @@ Thanks goes to these wonderful people ✨
dragetd
- |
+
+
michaeljensen
- |
-
+
@@ -1845,15 +1852,15 @@ Thanks goes to these wonderful people ✨
mpldr
- |
+
+
naveensrinivasan
- |
-
+
@@ -1868,13 +1875,6 @@ Thanks goes to these wonderful people ✨
radicand
|
-
-
-
-
- fkefer
-
- |
@@ -1968,21 +1968,28 @@ Thanks goes to these wonderful people ✨
Jeidnx
|
+
+
+
+
+ jessp01
+
+ |
JiLleON
- |
+
+
jirislav
- |
-
+
diff --git a/docs/content/config/environment.md b/docs/content/config/environment.md
index a0916aa3..83fcdfa6 100644
--- a/docs/content/config/environment.md
+++ b/docs/content/config/environment.md
@@ -545,6 +545,12 @@ Changes the interval in which log files are rotated.
This variable can also determine the interval for Postfix's log summary reports, see [`PFLOGSUMM_TRIGGER`](#pflogsumm_trigger).
+##### LOGROTATE_COUNT
+
+Defines how many files are kept by logrotate.
+
+- **4** => Number of files
+
#### SpamAssassin
##### ENABLE_SPAMASSASSIN
diff --git a/mailserver.env b/mailserver.env
index 44a9a484..0d00de0a 100644
--- a/mailserver.env
+++ b/mailserver.env
@@ -346,6 +346,9 @@ REPORT_SENDER=
# Note: This variable can also determine the interval for Postfix's log summary reports, see [`PFLOGSUMM_TRIGGER`](#pflogsumm_trigger).
LOGROTATE_INTERVAL=weekly
+# Defines how many log files are kept by logrorate
+LOGROTATE_COUNT=4
+
# If enabled, employs `reject_unknown_client_hostname` to sender restrictions in Postfix's configuration.
#
diff --git a/target/scripts/startup/setup.d/log.sh b/target/scripts/startup/setup.d/log.sh
index cf282966..06aa679d 100644
--- a/target/scripts/startup/setup.d/log.sh
+++ b/target/scripts/startup/setup.d/log.sh
@@ -19,13 +19,19 @@ function _setup_logrotate() {
_dms_panic__invalid_value 'LOGROTATE_INTERVAL' 'Setup -> Logrotate'
fi
+ if [[ ${LOGROTATE_COUNT} =~ ^[0-9]+$ ]]; then
+ _log 'trace' "Logrotate count set to ${LOGROTATE_COUNT}"
+ else
+ _dms_panic__invalid_value 'LOGROTATE_COUNT' 'Setup -> Logrotate'
+ fi
+
cat >/etc/logrotate.d/maillog << EOF
/var/log/mail/mail.log
{
compress
copytruncate
delaycompress
- rotate 4
+ rotate ${LOGROTATE_COUNT}
${LOGROTATE_INTERVAL}
}
EOF
diff --git a/target/scripts/startup/setup.d/security/rspamd.sh b/target/scripts/startup/setup.d/security/rspamd.sh
index 98f83de6..6b54addd 100644
--- a/target/scripts/startup/setup.d/security/rspamd.sh
+++ b/target/scripts/startup/setup.d/security/rspamd.sh
@@ -109,7 +109,7 @@ function __rspamd__setup_logfile() {
compress
copytruncate
delaycompress
- rotate 4
+ rotate ${LOGROTATE_COUNT}
${LOGROTATE_INTERVAL}
}
EOF
diff --git a/target/scripts/startup/variables-stack.sh b/target/scripts/startup/variables-stack.sh
index eb5bf149..a3be72b8 100644
--- a/target/scripts/startup/variables-stack.sh
+++ b/target/scripts/startup/variables-stack.sh
@@ -145,6 +145,7 @@ function __environment_variables_general_setup() {
VARS[GETMAIL_POLL]="${GETMAIL_POLL:=5}"
VARS[LOG_LEVEL]="${LOG_LEVEL:=info}"
VARS[LOGROTATE_INTERVAL]="${LOGROTATE_INTERVAL:=weekly}"
+ VARS[LOGROTATE_COUNT]="${LOGROTATE_COUNT:=4}"
VARS[LOGWATCH_INTERVAL]="${LOGWATCH_INTERVAL:=none}"
VARS[LOGWATCH_RECIPIENT]="${LOGWATCH_RECIPIENT:=${REPORT_RECIPIENT}}"
VARS[LOGWATCH_SENDER]="${LOGWATCH_SENDER:=${REPORT_SENDER}}"
|