-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC Change default logrotate settings for /var/mail/maillog #1666
Comments
I like this. Streamlining logs is a good idea. Can you provide a PR? I'll review and merge it. |
What about changing the default value of |
I can't see any negative impacts to be honest, therefore I see nothing wrong with it |
Hm, I responded to the PR before I noticed the issue. I generally don't like to change defaults but I do agree that the rotations should be streamlined. As I recall the reason for keeping one file for mail.log is that it is processed by the reports. Keeping one file means that the previous day (or week or month) is available for the summary, but nothing more. If that is changed we need to double-check that the reports still produce the expected results. When we are looking at this I have often wondered if mail.info really is useful. I certainly never use it. Perhaps it can be removed? |
Let's continue here for now ;-) Maybe @aendeavor can mark the PR as draft. I haven't found a way to do so.
Initially I wanted to set it also to rotate 4 times. But I found it odd, when setting daily, to keep 4 days (why 4 and not the last week 7?) Same goes for weekly. Why 4 weeks and not keep the whole month (5)? That was the intention behind that. Another thing that came to my mind: Why does On variable to manage them all equally would be best imho. |
It was before my time, but I think the original idea was that mail.log is used for the pflogsumm report on rotation. The other logs are just kept for manual analysis. That is most likely why they are treated differently. The pflogsumm uses /var/log/mail/mail.log.1 and that should be the most recently rotated file, so I think it is safe to change the rotate setting to keep additional copies. Your suggestion is perhaps as good as any. Not sure if we need to parameterize it, most installations are probably happy with the defaults. |
What's the current status here? |
For now, I only would change the rotate amount from 1 to 4 for If you agree, I will change the PR accordingly. |
I very much agree:) Tell me in the PR when you're ready and I'll merge it. |
Done with #1667 |
Change default logrotate settings for /var/mail/maillog See also: #1666
Change default logrotate settings for /var/mail/maillog
Description
At the moment, the log files
are rotated weekly, four times (see
/etc/logrotate.d/rsyslog
)On the other hand,
/var/log/mail/mail.log
is rotated daily by default and only once. So there are only two days back in the logs.To keep it uniform and avoid confusion about "missing" logs, I propose changing that also to an interval of 4.
So someone can set
LOGROTATE_INTERVAL
to weekly and got the same amount of logs formail.log
as for the othermail.*
logs.Even better would be, to change the default value of
LOGROTATE_INTERVAL
to weekly also.Possible impacts
Changing default settings is always tricky. The only impact I see, is the increased usage of disk space for the additional logs.
The text was updated successfully, but these errors were encountered: