How to restore deleted Postfix log files in Ubuntu

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

 

 

 

 

postfix (en)

  • Hits: 2990
Add comment

Related Articles