How to restore deleted Postfix log files in Ubuntu

If you accidentally deleted Postfix log files in Ubuntu (or any other system), you can restore them in the following way:

sudo touch /var/log/mail.log
sudo touch /var/log/mail.info
sudo touch /var/log/mail.warn
sudo touch /var/log/mail.err
sudo chmod a+w /var/log/mail*

After that restart syslog daemon:

sudo service rsyslog restart

And also, to check if logs are writing, you can restart postfix:

sudo /etc/init.d/postfix restart

 

 

 

 

Tags: postfix (en)

PrintEmail

Add comment


Security code
Refresh