<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lemmingzshadow.net &#187; Logging</title>
	<atom:link href="http://lemmingzshadow.net/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://lemmingzshadow.net</link>
	<description>a webdevel&#039;s weblog</description>
	<lastBuildDate>Fri, 13 Aug 2010 09:10:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Postfix Logging auf Debian Etch</title>
		<link>http://lemmingzshadow.net/16/postfix-logging-auf-debian-etch/</link>
		<comments>http://lemmingzshadow.net/16/postfix-logging-auf-debian-etch/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 18:41:07 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=16</guid>
		<description><![CDATA[Kürzlich ist mir aufgefallen, dass der MTA Postfix nach der Default-Installation (via apt-get) auf einem Debian Etch System in verschiedene Dateien loggt. Es werden die Dateien mail.err, mail.info, mail.warn, mail.log und syslog benutzt. Das ist zwar etwas unübersichtlich aber erstmal nicht schlimm, würden nicht einige Informationen redundant gespeichert. Die Dateien mail.log, mail.info und syslog enthalten [...]]]></description>
			<content:encoded><![CDATA[<p>Kürzlich ist mir aufgefallen, dass der MTA Postfix nach der Default-Installation (via apt-get) auf einem Debian Etch System in verschiedene Dateien loggt. Es werden die Dateien <em>mail.err</em>, <em>mail.info</em>, <em>mail.warn</em>, <em>mail.log</em> und <em>syslog</em> benutzt. Das ist zwar etwas unübersichtlich aber erstmal nicht schlimm, würden nicht einige Informationen redundant gespeichert. Die Dateien <em>mail.log</em>, <em>mail.info</em> und <em>syslog</em> enthalten nahezu identische Logs bzgl. MTA und Mailserver.</p>
<p>Ich habe mein System nun so angepasst dass alle Logs von Postfix nur noch in der Datei <em>mail.log</em> gespeichert werden. Dazu müssen in der Datei <em>/etc/syslog.conf</em> einige kleinere Änderungen vorgenommen werden:<br />
<span id="more-16"></span><br />
Zunächst eine Zeile die etwa so aussieht:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">*.*;auth,authpriv.none   -/var/log/syslog</pre></td></tr></table></div>

<p>ändern in:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">*.*;auth,authpriv,mail.none    -/var/log/syslog</pre></td></tr></table></div>

<p>Mit dieser Änderung erreicht man, dass keine Mail-Logs mehr im syslog auftauchen.</p>
<p>Mit dieser Zeile werden alle Mail-Logs in der Datei <em>mail.log</em> gespeichert:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">mail.*      -/var/log/mail.log</pre></td></tr></table></div>

<p>Dann habe ich noch diese 3 Zeilen auskommentiert, damit keine Informationen mehr in die Dateien <em>mail.info</em>, <em>mail.err</em> und <em>mail.warn</em> geschrieben werden:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">#mail.info                      -/var/log/mail.info
#mail.warn                      -/var/log/mail.warn
#mail.err                       /var/log/mail.err</pre></td></tr></table></div>

<p>Abschließend muss der Syslog Deamon neu gestartet werden. Das geht mit folgendem Befehl:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">/etc/init.d/sysklogd restart</pre></td></tr></table></div>

<p>Nun werden die Logs von Postfix nur noch in der Datei <em>mail.log</em> gespeichert.<br />
Natürlich ist das nur eine von vielen Möglichkeiten das Logging zu konfigurieren, ich finde diese Lösung allerdings schön einfach und übersichtlich.</p>
]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/16/postfix-logging-auf-debian-etch/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
