fix: Avoid creating an unnecessary syslog socket for Postfix#3134
fix: Avoid creating an unnecessary syslog socket for Postfix#3134casperklein merged 7 commits intomasterfrom
Conversation
Test failures and issues from opting-out of syslog to a separate log fileThe bulk of the test failures was caused by Postfix logs being relocated to supervisor
I wouldn't be surprised if that impacts anything else not being caught by existing tests. Or potential for users to likewise monitor that file (or log output to terminal / docker logging driver). InvestigationLooking into
|
|
I was investigating this issue as well, but noticed weird behaviour in some of the test helpers. I'd be nice if you find a solution to this problem; I will tend to the helpers. |
|
What if we just set Postfi'x log file to |
As per concerns raised in investigation notes with Postgrey service logs by supervisor, I don't feel it's a good idea to have multiple writers to the same file. Technically I'd expect that wouldn't increase the existing processes writing since it'd just be Supervisor still (with rsyslog being the other involved that comes to mind). We could try it as a workaround / quick fix, at the risk of the log being updated concurrently by both processes at some point messing up the log or corrupting it. Something I didn't get around to yesterday is checking if without the Vector for log managementOne potential proper fix for the logging concern in this PR is to evaluate how viable overhauling our logging is handled. I was looking into The config and docs for Vector seems much more pleasant than rsyslog, the syntax is called VRL and it's built off rust 😛 Presently the output options (sinks) are lacking one for syslog style. There's a tracking issue related to that, and it seems that they've made progress late last year towards getting the There is some potential concerns though with Vector and log rotated file sources:
While Vector can output to a file based log as well, it does not manage log rotation itself. I see that we're using I'll need to give the above some more thought, but it might work well for us. |
|
Vector seems very interesting! Keep us posted here, I read through all of it and this is nice! As for now, we may want to apply "a quick fix" just proving |
|
See next post. |
|
Afaik the only "issue" we currently have is this line appearing in /var/log/syslog:
Just deleting Also, with logging to just one file we would lose rsyslog's feature to log by facility: |
Yep, I wasn't paying attention before, and only just realized that myself 😂
I also had another misunderstanding there with Facility I don't think would matter in this sense, as Postfix just uses the All good. I think there is benefit in bringing Vector in at a later point. But for now there's a quick and easy fix 👍 (only removing |
polarathene
left a comment
There was a problem hiding this comment.
Revision based on discussions above and here.
| lmtp unix - - n - - lmtp | ||
| anvil unix - - n - 1 anvil | ||
| scache unix - - n - 1 scache | ||
| postlog unix-dgram n - n - 1 postlogd |
Proper approach to resolve
|
When @casperklein's review is finished, I can merge this even if GH actions is till bugged. Just tell me :) |
I think it's finished, the concern was resolved 👍 |
|
docker-mailserver/test/tests/parallel/set3/scripts/setup_cli.bats Lines 34 to 38 in 9e2f964 Not sure what caused that failure. Re-ran test and it passes now 🤷♂️ |
|
@casperklein when you approve, please go ahead and merge this straight away :) |
Description
Details are covered here. This is a fix for Postfix change for
v12to no longer usechroot,as a part of that we're sending logs to(no longer the case, continue using syslog as it's better suited than/dev/stdoutinstead, which supervisor will maintain a log file of/dev/stdoutfor filtering / redirecting by facility and severity).Raised this PR as requested in linked issue.
Original message (no longer applicable)
I experienced some issues with the Postfix logs no longer being part of
/var/log/mail/mail.log(rsyslogis configured with amailfacility that writes logs with that metadata to this location), which is also what the console is tailing to stdout after startup completes.All Postfix logs now live in the supervisor
postfix.loginstead, which is problematic if the logs aren't replicated into/var/log/mail/mail.log.Type of change
Checklist: