Dave's Brain

Browse - computer tips - postfix log

Date: 2007oct29

Q.  Is there a way to get Postfix's copious logging in a separate file?

A.  Yes, first you instruct Postfix to use an alternate Syslog facility.
Then direct that facility to a new file.

In /etc/postfix/main.cf set:

	syslog_facility = local0

In /etc/syslog.conf add "local0.none" to /var/log/messages to stop
local0 messages going there:

	*.info;mail.none;authpriv.none;auth.none;cron.none;local0.none  /var/log/messages

Also in /etc/syslog.conf add this line:


	local0.*                                                -/var/log/postfix

Finally, restart postfix and syslog and check /var/log/postfix

Add a comment

Sign in to add a comment
Copyright © 2008, dave - Code on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License.