View previous topic :: View next topic |
Author |
Message |
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Wed Aug 23, 2006 1:42 pm Post subject: Changing where Postfix logs information |
|
|
Hi... very simple question but can't seem to find the answer - I want Postfix to log all it's messages to /var/log/maillog and not /var/log/messages. How do I do this?
If it matters, I have syslog-ng installed.
Phil. |
|
Back to top |
|
|
Non_E Apprentice
Joined: 17 Jan 2006 Posts: 160 Location: Czech Republic
|
Posted: Wed Aug 23, 2006 6:46 pm Post subject: Re: Changing where Postfix logs information |
|
|
phil_r wrote: | Hi... very simple question but can't seem to find the answer - I want Postfix to log all it's messages to /var/log/maillog and not /var/log/messages. How do I do this?
If it matters, I have syslog-ng installed.
Phil. |
See /etc/postfix/main.cf. See if there is line containing phrase syslog_facility. If it is set to something else then mail, delete the line or change it to mail. Default syslog facility is mail and needn't be set explicitly in the config.
Now you are sure postfix uses the mail facility and we may proceed to syslog configuration. Open /etc/syslog-ng/syslog-ng.conf. I do not know your configuration therefore study appropriate man pages (man syslog-ng.conf) or try adding something like this (adapted from my conf): Code: |
destination mail { file("/var/log/mail.log"); };
filter f_mail { facility(mail); };
log { source(src); filter(f_mail); destination(mail); };
|
My configuration requires source(src) which is set like this: Code: |
source src { unix-stream("/dev/log"); internal(); }; |
Your configuration probably uses another name for this. Adapt my configuration for your needs. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Wed Aug 23, 2006 8:22 pm Post subject: |
|
|
That got it, thanks Non_E and for the link Kashani...
Phil. |
|
Back to top |
|
|
|