Skip to content

Commit

Permalink
fix: supervisor-app.conf - Correct the log location for postgrey (#…
Browse files Browse the repository at this point in the history
…3724)

* fix: `supervisor-app.conf` - Correct `postgrey` log location

Looks like this should have been like every other service and reference a log file(s) based on program name in the supervisor log directory.

* tests: Adjust log location for `postgrey_enabled.bats`
  • Loading branch information
polarathene committed Dec 29, 2023
1 parent 8392e3c commit 0889b0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file. The format
- `VERSION` is no longer included in the image ([#3711](https://github.com/docker-mailserver/docker-mailserver/pull/3711))
- Update-check: fix 'read' exit status ([#3688](https://github.com/docker-mailserver/docker-mailserver/pull/3688))
- `ENABLE_QUOTAS=0` no longer tries to remove non-existent config ([#3715](https://github.com/docker-mailserver/docker-mailserver/pull/3715))
- The `postgrey` service now writes logs to the supervisor directory like all other services. Previously this was `/var/log/mail/mail.log` ([#3724](https://github.com/docker-mailserver/docker-mailserver/pull/3724))
- **Rspamd:**
- Switch to official arm64 packages to avoid segfaults ([#3686](https://github.com/docker-mailserver/docker-mailserver/pull/3686))
- **CI / Automation:**
Expand Down
4 changes: 2 additions & 2 deletions target/supervisor/conf.d/supervisor-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ startsecs=0
stopwaitsecs=55
autostart=false
autorestart=true
stdout_logfile=/var/log/mail/mail.log
stderr_logfile=/var/log/mail/mail.log
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
command=/usr/sbin/postgrey --inet=127.0.0.1:10023 --syslog-facility=mail --delay="%(ENV_POSTGREY_DELAY)s" --max-age="%(ENV_POSTGREY_MAX_AGE)s" --auto-whitelist-clients="%(ENV_POSTGREY_AUTO_WHITELIST_CLIENTS)s" --greylist-text="%(ENV_POSTGREY_TEXT)s"

[program:amavis]
Expand Down
2 changes: 1 addition & 1 deletion test/tests/parallel/set1/spam_virus/postgrey_enabled.bats
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function _should_have_log_entry() {
# Allow some extra time for logs to update to avoids a false-positive failure:
_run_until_success_or_timeout 10 _exec_in_container grep \
"${ACTION}, ${REASON}," \
/var/log/mail/mail.log
/var/log/supervisor/postgrey.log

# Log entry matched should be for the expected triplet:
assert_output --partial "${TRIPLET}"
Expand Down

0 comments on commit 0889b0f

Please sign in to comment.