{"id":28,"date":"2009-02-08T11:05:39","date_gmt":"2009-02-08T00:05:39","guid":{"rendered":"https:\/\/thedragon.kicks-ass.org\/blog\/?p=28"},"modified":"2009-02-17T22:07:48","modified_gmt":"2009-02-17T11:07:48","slug":"postgrey-and-spf","status":"publish","type":"post","link":"https:\/\/thedragon.kicks-ass.org\/?p=28","title":{"rendered":"Postgrey and SPF"},"content":{"rendered":"<p>Installed Postgrey and SPF at home, from etch backports<\/p>\n<p><code>apt-get install -t etch-backports postfix-policyd-spf-python python-spf<br \/>\nadd to main.cf<br \/>\n\"check_policy_service unix:private\/policy-spf,\u00c2\u00a0 check_policy_service inet:127.0.0.1:60000\" to smtpd_recipient_restrictions<br \/>\nadd to master.cf<br \/>\npolicy-spf  unix  -       n       n       -       -       spawn<br \/>\nuser=nobody argv=\/usr\/bin\/policyd-spf<\/code><\/p>\n<p>I&#8217;m also looking at plotting the postgrey results into an rrd database, not sure on the exact schema required for what i want to do, but here is a start<br \/>\n<code><br \/>\nrrdtool create postgreystats.rrd --step=86400 DS:failed:ABSOLUTE:86400:0:1000000 RRA:AVERAGE:0.5:1:1095 RRA:MAX:0.5:1:1095 RRA:AVERAGE:0.5:30:36<\/code><\/p>\n<p>#!\/bin\/bash<br \/>\n# Yesterday Only<br \/>\nYESTERDAY=&#8221;`date &#8211;date=yesterday | cut -b5-10`&#8221;<br \/>\nLASTNIGHT=&#8221;`date +&#8217;%s&#8217; &#8211;date=&#8217;today 00:00:00&#8217;`&#8221;<\/p>\n<p>echo -n &#8220;PostGrey: &#8221;<br \/>\nFAILED=`grep &#8220;$YESTERDAY&#8221; \/var\/log\/mail.log | postgreyreport | wc -l`<br \/>\necho &#8220;$FAILED&#8221;<\/p>\n<p>rrdtool update \/var\/spool\/postgreystats\/postgreystats.rrd $LASTNIGHT:$FAILED<\/p>\n<p>Create a graph with the following, but te number input is 23675 however graph shows 42?<code><br \/>\nrrdtool graph postgrey.png DEF:failMAX=\/var\/spool\/postgreystats\/postgreystats.rrd:failed:MAX LINE1:failMAX#FF0000:\"Postgrey failed to return\" --start -1d<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installed Postgrey and SPF at home, from etch backports apt-get install -t etch-backports postfix-policyd-spf-python python-spf add to main.cf &#8220;check_policy_service unix:private\/policy-spf,\u00c2\u00a0 check_policy_service inet:127.0.0.1:60000&#8221; to smtpd_recipient_restrictions add to master.cf policy-spf unix &#8211; n n &#8211; &#8211; spawn user=nobody argv=\/usr\/bin\/policyd-spf I&#8217;m also looking &hellip; <a href=\"https:\/\/thedragon.kicks-ass.org\/?p=28\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p20dKL-s","_links":{"self":[{"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=\/wp\/v2\/posts\/28"}],"collection":[{"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28"}],"version-history":[{"count":4,"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions\/46"}],"wp:attachment":[{"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thedragon.kicks-ass.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}