Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changing where Postfix logs information
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Wed Aug 23, 2006 1:42 pm    Post subject: Changing where Postfix logs information Reply with quote

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
View user's profile Send private message
Non_E
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 160
Location: Czech Republic

PostPosted: Wed Aug 23, 2006 6:46 pm    Post subject: Re: Changing where Postfix logs information Reply with quote

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
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Aug 23, 2006 7:01 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic.php?t=143356&highlight=

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
phil_r
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 265
Location: Omaha, NE, USA

PostPosted: Wed Aug 23, 2006 8:22 pm    Post subject: Reply with quote

That got it, thanks Non_E and for the link Kashani...

Phil.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum