Postfix logging: how to redirect to a separate file

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Postfix logging: how to redirect to a separate file

Postby wirawan0 » Tue Jan 26, 2010 16:57

I am using sabayon 5.0 /GNOME and syslog-ng for logging facility. I see that all messages/errors from postfix was directed to /var/log/messages. How can I change this to, say, /var/log/mail/errors?

Thanks
Wirawan
wirawan0
Baby Hen
 
Posts: 12
Joined: Sat Jan 02, 2010 17:38

Re: Postfix logging: how to redirect to a separate file

Postby _cnfss_ » Tue Jan 26, 2010 20:23

wirawan0 wrote:I am using sabayon 5.0 /GNOME and syslog-ng for logging facility. I see that all messages/errors from postfix was directed to /var/log/messages. How can I change this to, say, /var/log/mail/errors?

Thanks
Wirawan


You can make a link:

cd /var/log
cp messages /home ---> if you already had some messages
rm messages
ln -T /var/log/mail/errors messages -->you already must have created the file "error" in /var/log/mail

(Maybe you shoul do these as root)

Mmm, I'm not in Linux now, so check the correct writing of the commands (man rm, man ln, etc)...

(You can make all of these by GUI with Nautilus ;) )
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
"Sólo dos cosas son infinitas, el universo y la estupidez humana, y no estoy seguro acerca de la primera."
- Albert Einstein
_cnfss_
Growing Hen
 
Posts: 158
Joined: Wed Jan 20, 2010 17:09

Re: Postfix logging: how to redirect to a separate file

Postby wirawan0 » Thu Jan 28, 2010 19:02

Hmm.. I am not sure if your suggestion is valid. /var/log/messages should not be played around like that. I think either we have to modify the configuration in postfix config file (eg /etc/postfix/main.cf) or something in syslog can distinguish the postfix log and redirect it to a separate file.
wirawan0
Baby Hen
 
Posts: 12
Joined: Sat Jan 02, 2010 17:38


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 2 guests

cron