<?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>King of the Potato People &#187; bash</title>
	<atom:link href="http://www.potato-people.com/blog/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.potato-people.com/blog</link>
	<description>Code, photos and ramblings of Rick Hodger</description>
	<lastBuildDate>Fri, 23 Jul 2010 10:03:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Postfix Mail Queue statistics via SNMP</title>
		<link>http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/</link>
		<comments>http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 16:30:21 +0000</pubDate>
		<dc:creator>rick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.potato-people.com/blog/?p=55</guid>
		<description><![CDATA[This post documents a small shell script designed to provide basic mail queue statistics via SNMP for Postfix. Requirements Postfix Net-SNMP Installation The code can be downloaded here. To install, place the script anywhere in your system and edit it to provide the correct path to the &#8220;qshape&#8221; perl script that comes with Postfix. Note: [...]]]></description>
			<content:encoded><![CDATA[<p>This post documents a small shell script designed to provide basic mail queue statistics via SNMP for Postfix.</p>
<p><strong>Requirements</strong></p>
<ul>
<li><a href="http://www.postfix.org/">Postfix</a></li>
<li><a href="http://www.net-snmp.org">Net-SNMP</a></li>
</ul>
<p><strong>Installation</strong></p>
<p>The code can be downloaded <a href="http://www.potato-people.com/code/misctools/snmpqshape.sh.gz">here</a>.</p>
<p>To install, place the script anywhere in your system and edit it to provide the correct path to the &#8220;qshape&#8221; perl script that comes with Postfix.</p>
<p><em>Note: Under openSUSE qshape.pl is part of the postfix-docs package and is not installed by default.</em></p>
<p>To configure net-snmp, edit your snmpd.conf line and add a line as follows:</p>
<p><code>pass [oid-of-choice] /bin/snmpqshape.sh [oid-of-choice]</code></p>
<p>For example, due to a quirk in a paticular SNMP monitoring package I use, I had to use an OID belonging to Motorola:</p>
<p><code>pass .1.3.6.1.4.1.17713.2 /bin/snmpqshape.sh .1.3.6.1.4.1.17713.2</code></p>
<p>Net-SNMP will return 3 OIDs on query:</p>
<p><code>.0 :: Incoming<br />
.1 :: Active<br />
.2 :: Deferred</code></p>
<p><strong>MRTG / RRDTool</strong></p>
<p>Since the setup of monitoring / statistics tools such as MRTG or RRDTool is site-specific, no provisions are made on this page to provide a complete usage example. A minimal example for RRDTool:<br />
<code>#! /bin/sh<br />
STR="`snmpwalk -OvQ -r 10 -t 5 -v 2c -c publicommunity hostname.site.com \<br />
.1.3.6.1.4.1.17713.2 | perl -ne 's/^/:/;s/\n//;print'`"<br />
rrdtool update /path/to/rr-database.rrd -t incoming:active:deferred N${STR}</code></p>
<p><strong>DISCLAIMER</strong><br />
This code is free to use and distribute, and the author offers no liability or warranty for it&#8217;s misuse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
