• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

difference between maillog and maillog.processed and changing log rotation settings

Garerth_Westwood

New Pleskian
Hi All,

I've got a couple of questions if anyone can help.

1/ What is the difference between maillog and maillog.processed? I want to keep a permanent record of all mail inbound and outbound even if delivery is deferred by the gray listing. I'm not sure which one is the best to keep.

2/ I would like to change the way that the mail logs get log rotated. I am struggling to work out exactly what happens at the moment but I would like to rotate the log out every day regardless of size. I think currently that the maillog.processed is rotated daily if it is over a specific size. Could someone point me in the right direction to make this change?

Thanks in advance,

Gareth
 
Hi Garerth_Westwood,

the logrotation is configured with different config - files and depends on your own settings. Depending on your system you will find these configuratoin files on Debian/Ubuntu at: /etc/logrotate.d/

The *.processed - files are the latest files which have been rotated, before they will be renamed again the next time, logrotation will be done, depending on your settings, but as well, this is a personal setting... you can change these settings in the config - files mentioned above. You might consider using a separate folder ( i.e. /var/log/old_logs/NAME_OF_THE_SERVICE/ ), where you could store the rotated logs and set the "olddir" in the config - files ( possible additional line: olddir /var/log/old_logs/NAME_OF_THE_SERVICE ).

Please use the manual pages for logrotation ( "man logrotate" ) or search with Google for examples and possible settings for logrotation - files.
 
Thanks for the reply UFHH01,

My install is on centos and to the best of my knowlage is a stock install. I found the /etc/logrotate.d folder but there is no config for any of the mail services / maillog however after checking through each of the files in /etc/logrotate.d I have found that /var/log/maillog is included in the syslog config file. I have added "daily" to this config and will see if this does what I want.

I already have a cronjob that takes a copy of the file and dumps it in a separate directory although it looks like the olddir option may do that automatically for me straight from logrotate.

I'll do a bit more digging but I think that has answered my question, thanks.
 
Back
Top