Streamlining Postfix Logs: Only log to mail.log not to syslog

Have you ever wondered why your Postfix logs clutter both mail.log and syslog, making it harder to track and manage? Well, you’re not alone. In this quick guide, I’ll show you how to tidy things up and keep your postfix logs in mail.log only.

Unraveling the Mystery

First things first, let’s address the perplexing default setting in syslog (particularly under Debian’s rsyslogd) that makes Postfix entries flood both mail.log and syslog. It’s a head-scratcher, but fear not – we’re here to set things right.

To bring order to the chaos, follow these easy steps:

  1. Open either /etc/syslog.conf or /etc/rsyslog.conf, depending on your system configuration.
  2. Look for the following line:
   *.*;auth,authpriv.none -/var/log/syslog
  1. Modify it to:
   *.*;auth,authpriv.none;mail.none -/var/log/syslog
  1. Save the changes and, voila, you’re almost done!

Quick Restart

To ensure that your changes take effect promptly, restart syslog with a swift command.

sudo systemctl restart rsyslog

Enjoy the Simplicity

And there you have it – no more redundant Postfix logs cluttering up syslog. Now, your mail-related entries will neatly reside in mail.log, making it easier for you to monitor and troubleshoot without the unnecessary noise.

Streamlining your logs has never been this simple. Happy logging!

This entry was posted in Technik, Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *