• 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

maillog rotation urgent help

A

atomicmak

Guest
i would want that my maillog

/usr/local/psa/var/log/maillog should be precessed and rotate everyday for 15days.

can any expert help me solving and doing this ?

this is somhow urgent for me.
due to maillog heavy size my mailqueue getting chock for 2000mails and my clients get delay for 30 minutes to get local emails.

please help.
 
The conf files for rotating logs should be found in /etc/logrotate.d

On my system, the maillog rotation schedule is found in the syslog file.
 
even in my system if found under syslog but i dont know how to trick that.

can anyone tell me the trick or script to do so ?

thanks in advance
 
===================================
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
===================================
now if we see it actually maillog only being generates in

/usr/local/psa/var/log/maillog
 
The syslog script says that your maillog is being rotated daily. But if I understand your reply, you maillog is actually in "/usr/local/psa/var/log/maillog" and not in "/var/log/maillog"

If that is the case, make a copy of your syslog file so that you can revert back to just in case, then edit the syslog file and change the maillog path.
 
thanks
i've changed things as you suggested and will look at the rotation by tomorrow.

will update you tomorrow.

thanks a lot
 
my log dosent rotated even i restarted syslog service yesterday after making changes to syslog file.

how would i turn that usr/local/psa/var/log/maillog rotating daily ?
 
i have checked and found the log is not being rotating in

/usr/local/psa/var/log/

please help.
 
Sorry I have not been able to find any solution to your problem. I have thoroughly searched this forum and Google but nothing addresses this problem that I could find.

I believe the file that rotates the maillogs for you is the "statistics" cron job ( file is located at /usr/local/psa/admin/bin ) that runs each day. The reason I believe this, is because Plesk would need to process the maillogs to update statistics which should include mail traffic through your sites. However, I could not read the contents of the "statistics" script as it is compiled and not just a script.

I will keep looking but I'm afraid I am just about out of ideas.
 
For the maillogs as in /usr/local/psa/var/log
go to /etc/psa/logrotate.conf
and update:
/usr/local/psa/var/log/maillog.processed {
missingok
rotate 14
size 10M
compress
nocreate
}

in our case we keep 14 days off log... plesk 8.4.
 
Back
Top