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!

Posted in Technik, Uncategorized | Tagged , , , , | Leave a comment

Optimizing Fetchmail: Creating a dedicated Log File to avoid Syslog overload.

Recently, I took a peek into the syslog, and to my surprise, it was brimming with messages from Fetchmail. It detailed the who, what, where, why, and how of every email being seen, loaded, and deleted. Intriguing, no doubt, but I wasn’t keen on cluttering up my syslog with this information.

Therefore, Fetchmail needed its own log, and here’s how I went about it: In /etc/fetchmailrc, I added the following lines to the beginning ot the file:

set no syslog
set logfile /var/log/fetchmail.log

Now, Fetchmail had its exclusive log file. However, it wasn’t enough; I wanted this log to rotate as well. So, I created a file called /etc/logrotate.d/fetchmail and populated it with the following:

/var/log/fetchmail.log {
    weekly
    create 0644 fetchmail adm
    rotate 4
    compress
    delaycompress
}

Done! It might not seem overly complex, but I encountered some challenges before achieving the setup I desired. Hence, I decided to document it for future reference.

Posted in Technik | Tagged , , | Leave a comment

Postfix log nur in mail.log nicht syslog

This post is also available in English.

Wo ich hier schon mal fetchmail aus dem syslog verbannt habe,
ist jetzt postfix dran.

Ich verstehe sowieso nicht warum syslog
(unter meinem Debian  rsyslogd) so eingestellt ist,
das postfixfoo sowohl in mail.log als auch in syslog geschrieben werden.

Also nichts wie das korrigieren:

Dazu einfach in /etc/syslog.conf bzw. /etc/rsyslog.conf folgende Zeile suchen:

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

und ändern in

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

voila noch schnell syslog neustarten und fertig :)

Posted in Technik, Uncategorized | Tagged , , , , , | 1 Comment

fetchmail – eigene Logdatei – zumüllen des syslogs verhindern

This post is also availiable in english.

Neulich werfe ich einen Blick in den Syslog
siehe da, alles voll mit Meldungen von Fetchmail.
Wann wie wo warum wieviele Emails gesehen geladen gelöscht wurden.
Alles ja ganz interessant,
aber bitte nicht in meinem Syslog.

Also musste fetchmail seinen eigenen Log bekommen und zwar so:
in /etc/fetchmailrc folgende Zeilen anfügen (an den Anfang)

set no syslog
set logfile /var/log/fetchmail.log

So jetzt hat fetchmail schon mal seine eigene Logdatei, die soll aber jetzt auch noch rotiert werden. Also noch die Datei /etc/logrotate.d/fetchmail anlegen und mit folgendem befüllen

/var/log/fetchmail.log {

weekly
create 0644 fetchmail adm
rotate 4
compress

delaycompress
}

fertig :)

Eigentlich nicht so komplex aber ich hatte trotzdem einige Mühe bis es so war wie ichs wollte deshalb hab ichs mal festgehalten.

Posted in Technik, Uncategorized | Tagged , , , , | 3 Comments

Komm wir gründen einen Verein vs. Regeln und Gesetzte

Als ich den Artikel: Komm wir Gründen einen Verein schrieb, war ich voller Hochmut,
ich dachte das Schwierigste sei geschafft und der Rest reine Formsache.
Naja Pustekuchen ;)
Den die Tage kam eine Antwort vom Vereinsregister, auf unseren Antrag auf Eintragung.
Gut es waren nur 4 Punkte die Kritisiert wurden,
find ich nicht schlecht fürs erste Mal, aber 4 Punkte sind 4 Punkte die behoben werden müssen.
Naja ich bin ja mal gespannt,
jetzt heißt es allerdings erstmal

  • Änderungen ausarbeiten
  • Mitgliederversammlung einberufen
  • Abstimmen
  • Einreichen

Und dann kommt das hoffen obs geklappt hat :)

Posted in Allgemein, out of my life, Uncategorized | Tagged , , , , , | Leave a comment