<?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>Postgrey &#8211; FU-BAR</title>
	<atom:link href="/tag/postgrey/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Fucked Up Beyond All Recognition</description>
	<lastBuildDate>Sat, 07 Jan 2017 21:08:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>/wp-content/uploads/2020/07/cropped-eu-header-20200715-2-32x32.png</url>
	<title>Postgrey &#8211; FU-BAR</title>
	<link>/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Zabbix Postfix (and Postgrey) templates</title>
		<link>/2016/12/31/zabbix-postfix-template/</link>
		
		<dc:creator><![CDATA[Rui Seabra]]></dc:creator>
		<pubDate>Sat, 31 Dec 2016 11:57:46 +0000</pubDate>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Postgrey]]></category>
		<category><![CDATA[Zabbix]]></category>
		<guid isPermaLink="false">/?p=2557</guid>

					<description><![CDATA[Today&#8217;s Zabbix templates are for Postfix and Postgrey (but separated in case you don&#8217;t use both). Since I run a moderate volume set of email servers, I could probably have Zabbix request the data and parse the logs all the time, but why not do it in a way that could scale better? (yes, I &#8230; <p class="link-more"><a href="/2016/12/31/zabbix-postfix-template/" class="more-link">Continue reading<span class="screen-reader-text"> "Zabbix Postfix (and Postgrey) templates"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Today&#8217;s Zabbix templates are for <a href="https://github.com/rseabra/zabbix-templates/tree/master/postfix">Postfix and Postgrey </a>(but separated in case you don&#8217;t use both).</p>
<p>Since I run a moderate volume set of email servers, I could probably have Zabbix request the data and parse the logs all the time, but why not do it in a way that could scale better? (yes, I know I have 3 greps that could be replaced by a single awk call, I just noticed it and will improve it in the future).</p>
<p>I took as base a few other examples and improved a bit upon them resulting in the following:</p>
<ol>
<li>A <strong>cron job</strong> selects the last entries of <em>/var/log/maillog</em> since the previous run (uses <strong>logtail</strong> from package <strong>logcheck</strong> in <strong>EPEL</strong>)</li>
<li>Then <strong>pflogsumm</strong> is run on it as well as other queries gathering info not collected by pflogsumm (in my case, postgrey activity, rbl blocks, size of mail queue)</li>
<li>Then <strong>zabbix_send</strong> is used to send the data to the monitoring server</li>
</ol>
<p>The cron job gets the delta t you want to parse the logs, in my case it&#8217;s -1 as I&#8217;m going it per minute and that&#8217;s an argument to find &#8230; -mmin and you&#8217;d place it like this:</p>
<pre>* * * * * /usr/local/bin/pfstats.sh -1</pre>
<p>This setup will very likely require some adaptation to your particular environment, but I hope it&#8217;s useful to you.</p>
<p>Then you can make a screen combining the graphics from both templates as the following example:</p>
<p><a href="/wp-content/uploads/2016/12/example-screen.png"><img loading="lazy" class="aligncenter wp-image-2560 size-full" src="/wp-content/uploads/2016/12/example-screen.png" width="1257" height="739" /></a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
