• 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 empty after delete

whnunlife

New Pleskian
So last night I was tracking down a issue with spam coming from my box. In the process, I did the following in a terminal:

path: /usr/local/psa/var/log

rm maillog
touch maillog

Now, before I deleted it, it was full of all these entries from spammers and so on, but after deleting and touching it, the file is empty.

I verified file permissions before I deleted it, and have restarted postfix. But the file is always empt. Anyway to fix this issue?
 
Try running

# restorecon /usr/local/psa/var/log/maillog

if you use SELinux. This will restore security context.
 
Just ran the command, and the file after 10 - 20 minutes is still empty.

Damm, I shouldn't of deleted it last night :(
 
Don't worry. Just remove the log file. With any luck it will be recreated with acceptable permissions.
 
Back
Top