9

I have log entries like:

Apr  8 10:25:31 monitor postfix/smtpd[3131]: connect from localhost[127.0.0.1]
Apr  8 10:25:31 monitor postfix/smtpd[3131]: lost connection after CONNECT from localhost[127.0.0.1]
Apr  8 10:25:31 monitor postfix/smtpd[3131]: disconnect from localhost[127.0.0.1]

every minute or so on a central rsyslogd log monitoring box from all local/remote nodes (Debian Squeeze, Rsyslog 4.6.4, Postfix 2.7.1 both from repos), I've tried to disable info messages in /etc/rsyslog.conf by commenting out the line:

#mail.info                      -/var/log/mail.info

and also adding a line

*.*;auth,authpriv.none,cron.none,mail.none -/var/log/syslog

which I thought would disable all mail logging from Postfix into /var/log/syslog, but it doesn't help. I have searched for other mail.info mail.debug entries and there are none, just one entry like:

mail.*                          -/var/log/mail.log

which I've commented out too, but then I think that shouldn't cause logging to /var/log/syslog anyway, no?

migrated from stackoverflow.com Apr 30 '11 at 6:05

This question came from our site for professional and enthusiast programmers.

12

You are using the wrong syntax, you have to use ";" as a delimiter.

This worked for me:

*.*;mail.none;mail.error;auth,authpriv.none             -/var/log/syslog

You need to restart rsyslog after the changes. Reloading isn't enough.

  • 2
    In ubuntu 14 the file to edit is /etc/rsyslog.d/50-default.conf – not a patch Jun 3 '14 at 15:06
  • It seems that /etc/init.d/rsyslog restart doesn't restart the service properly in Ubuntu 14.04. You would need to do: service rsyslog restart instead. – lepe Sep 26 '14 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy