I changed the timezone in my system and decided to start over with the
mail log. Without stopping sendmail, I removed /var/log/maillog. Then
I stopped it and started it. I did not see a new maillog being created.
I then restarted syslogd. And also restarted sendmail. Still no
maillog. I tried touching maillog and set the same permissions as the
old file, which I renamed. No messages written to maillog this way. I looked at /var/log/messages to see if maybe mail messages were being
logged there---I saw some, but they were still in the previous timezone,
so they were not new. I'm puzzled. How wrong was what I did?
On Tue, 05 Nov 2024 19:21:38 -0300, Wolfgang Agnes wrote:
I changed the timezone in my system and decided to start over with the
mail log. Without stopping sendmail, I removed /var/log/maillog. Then
I stopped it and started it. I did not see a new maillog being created.
I then restarted syslogd. And also restarted sendmail. Still no
maillog. I tried touching maillog and set the same permissions as the
old file, which I renamed. No messages written to maillog this way. I
looked at /var/log/messages to see if maybe mail messages were being
logged there---I saw some, but they were still in the previous timezone,
so they were not new. I'm puzzled. How wrong was what I did?
Best way to recreate any longfile is illustrated by this example for
maillog:
rm -f /var/log/maillog
newsyslog -C /var/log/maillog
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 43:21:01 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,857,853 |