View previous topic :: View next topic |
Author |
Message |
*nixVirgin n00b
Joined: 03 Nov 2003 Posts: 64 Location: The UK
|
Posted: Mon Jun 21, 2004 6:22 pm Post subject: no maillog file ? |
|
|
Hey - I am setting up a test box and postfix is running and mail seems to be flowing... although postfix is logging everything to the messages file...
can I change this to output to say maillog in /var/log ????
thanks _________________ "Ever notice how fast Windows Runs ?"
"Neither did I !!" |
|
Back to top |
|
|
xoomix Guru
Joined: 02 Jan 2003 Posts: 489
|
Posted: Mon Jun 21, 2004 6:32 pm Post subject: Idea ... |
|
|
Touch the file /var/log/maillog and stop and start your system logging tool (i.e sysklogd) -- it will read that file and log mail there -- if that does not work it has to be configured in either your /etc/postfix/main.cf or /etc/postfix/master.cf |
|
Back to top |
|
|
*nixVirgin n00b
Joined: 03 Nov 2003 Posts: 64 Location: The UK
|
Posted: Mon Jun 21, 2004 7:10 pm Post subject: |
|
|
thanks for the suggestions...
i did exactly what you suggested and also checked the main.cf and master.cf but cannot find no options to output to a desired file.
i restared syslog-ng and that ignored the maillog file and continued logging to messages.
any further help would be appreciated.
thanks _________________ "Ever notice how fast Windows Runs ?"
"Neither did I !!" |
|
Back to top |
|
|
*nixVirgin n00b
Joined: 03 Nov 2003 Posts: 64 Location: The UK
|
Posted: Mon Jun 21, 2004 7:25 pm Post subject: |
|
|
how silly do i feel...
always helps to check your syslog-ng.conf file... could have sworn i did that already...
ta all. _________________ "Ever notice how fast Windows Runs ?"
"Neither did I !!" |
|
Back to top |
|
|
Carik n00b
Joined: 01 Mar 2003 Posts: 7
|
Posted: Wed Jul 14, 2004 5:17 pm Post subject: |
|
|
I'm having the same problem, but I can't figure out what SHOULD be in /etc/syslog/syslog-ng.conf.
Could you post a copy of your working config, so I can see what I ought to be doing? I found a few sources that suggested adding
Code: | destination maillog { file("/var/log/maillog"); };
destination mail { file("/var/log/maillog"); };
|
and so on, but they either didn't have any effect or caused postfix to not log at all... |
|
Back to top |
|
|
*nixVirgin n00b
Joined: 03 Nov 2003 Posts: 64 Location: The UK
|
Posted: Thu Jul 15, 2004 11:36 am Post subject: |
|
|
hi...
hope you find this useful - let us know if you need anything else...
Code: |
options { long_hostnames(off); sync(0); };
#source where to read log
source src { unix-stream("/dev/log"); internal(); };
source kernsrc { file("/proc/kmsg"); };
#define destinations
destination authlog { file("/var/log/auth.log"); };
destination syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination mail { file("/var/log/mail.log"); };
destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };
destination newscrit { file("/var/log/news/news.crit"); };
destination newserr { file("/var/log/news/news.err"); };
destination newsnotice { file("/var/log/news/news.notice"); };
destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
destination console_all { file("/dev/tty12"); };
destination xconsole { pipe("/dev/xconsole"); };
#create filters
filter f_auth { facility(auth); };
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn)
and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); };
filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
filter f_failed { match("failed"); };
filter f_denied { match("denied"); };
#connect filter and destination
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(syslog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(kernsrc); filter(f_kern); destination(kern); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };
#default log
log { source(src); destination(console_all); };
|
_________________ "Ever notice how fast Windows Runs ?"
"Neither did I !!" |
|
Back to top |
|
|
Carik n00b
Joined: 01 Mar 2003 Posts: 7
|
Posted: Thu Jul 15, 2004 12:02 pm Post subject: |
|
|
Thanks!
It looks like what was missing from my earlier attempts were the "filter" and "log" sections... none of the HOWTO sections I found were much help in figuring out what needed to be there.
Since almost nothing goes to the logs except mail (IMAPd, postfix, and spamassassin), this makes my messages log a LOT cleaner. Though that'll change, I expect, once I get a few more things up and running.
Anyway, thanks again... |
|
Back to top |
|
|
dstutz97 Tux's lil' helper
Joined: 14 Apr 2003 Posts: 80
|
Posted: Tue Jul 27, 2004 2:55 pm Post subject: |
|
|
Thanks....that's a great config. |
|
Back to top |
|
|
|