<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: why won't procmail do what I want it to?</title>
      <link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to/</link>
      <description>Comments on Ask MetaFilter post why won't procmail do what I want it to?</description>
	  	  <pubDate>Fri, 13 Jan 2006 07:23:14 -0800</pubDate>
      <lastBuildDate>Fri, 13 Jan 2006 07:23:14 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: why won&apos;t procmail do what I want it to?</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to</link>	
  	<description>I have a few questions about procmail, specifically the INCLUDERC command and a few other functions. 1. I use procmail (v3.22), along with elm (v2.5), for email. My recipe works basically fine, but I want to make it easier to update and maintain when I want to whitelist someone or blacklist a term, so I want to use separate recipe files to split out the different functions. So, using INCLUDERC, I built a few of these files but procmail seems to just skip them, at least as far as I can tell by having VERBOSE set to on. What are some common things I might be doing that would cause this? I&apos;ve checked the filenames, file permissions and file paths and I&apos;m sort of stumped.&lt;br&gt;
&lt;br&gt;
2. I have a domain that is the same as my name. Way back when I used to put a lot of custom mailto links on my website. These are all now spam cannons and mail to these addresses can safely be ported to /dev/null. I&apos;ve read that you can create OR queries in procmail just by doing something like this&lt;br&gt;
&lt;br&gt;
&lt;code&gt;:0 H&lt;br&gt;
	* ^To.*crazynutpostcardlady&lt;br&gt;
	* ^To.*barthrulz&lt;br&gt;
	{&lt;br&gt;
		:0 fhw&lt;br&gt;
		| formail -A &quot;Suspected_Spam: To... bad address&quot; # a relic from the rest of my script&lt;br&gt;
	:0:&lt;br&gt;
	/dev/null	&lt;br&gt;
	}&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
but when I do it, procmail reads the first address and then goes on to the next condition. If I break them out separately, as I do in &lt;a href=&quot;http://jessamyn.com/tempo/.procmailrc&quot;&gt;my procmail script&lt;/a&gt;, it&apos;s fine, but a bitch to update. I&apos;ve been reading FAQs all day but I feel that there is clearly something I&apos;m missing about how procmail operates. I&apos;m comfy in a unix shell but otherwise don&apos;t have a lot of coding background so regexps are sort of new for me.&lt;br&gt;
&lt;br&gt;
I may migrate to spam assassin or something else at some point, but for now I&apos;m just looking for help with either of these two puzzles so please, no general mail filtering advice unless it helps me make this recipe better. Thanks for helping me with procmail.</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.30743</guid>
  	<pubDate>Fri, 13 Jan 2006 06:50:38 -0800</pubDate>
  	<dc:creator>jessamyn</dc:creator>
	
	<category>procmail</category>
	
	<category>email</category>
	
	<category>elm</category>
	
	<category>mailfiltering</category>
	
</item>
<item>
  	<title>By: ursus_comiter</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483280</link>	
  	<description>Multiple conditions in a recipe should work as  AND rather than  OR.  &lt;br&gt;
&lt;br&gt;
To get OR conditions, you could plop everything on one line like so:&lt;br&gt;
&lt;br&gt;
 &lt;i&gt;* ^To.*(crazynutpostcardlady|barthrulz)&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
But that sounds really tedious.&lt;br&gt;
&lt;br&gt;
A better solution is to use &lt;a href=&quot;http://www.uwasa.fi/~ts/info/proctips.html#scoring&quot;&gt;scoring&lt;/a&gt; to create a set of conditions that will each be checked in turn, providing a total score at the end to determine a match.&lt;br&gt;
&lt;br&gt;
&lt;i&gt;:0 H&lt;br&gt;
* 1^0 ^To.*crazynutpostcardlady&lt;br&gt;
* 1^0 ^To.*barthrulz&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
That will score each line that&apos;s a match as 1.  Procmail will then consider the total and if it&apos;s 1 or higher consider it a match for the rule.  &lt;br&gt;
&lt;br&gt;
I&apos;m not sure what your issue with INCLUDERC is.  Could I see your .procmailrc headers and your INCLUDERC statements?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483280</guid>
  	<pubDate>Fri, 13 Jan 2006 07:23:14 -0800</pubDate>
  	<dc:creator>ursus_comiter</dc:creator>
</item>
<item>
  	<title>By: jessamyn</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483285</link>	
  	<description>I basically use INCLUDERC=$HOME/.virusrc  on its own line with the rest of the headers (the rest of the script is linked above in a somewhat shortened form) and then the recipe in question just looks &lt;a href=&quot;http://jessamyn.com/tempo/.virusrc&quot;&gt;like this&lt;/a&gt;.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483285</guid>
  	<pubDate>Fri, 13 Jan 2006 07:32:25 -0800</pubDate>
  	<dc:creator>jessamyn</dc:creator>
</item>
<item>
  	<title>By: ursus_comiter</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483292</link>	
  	<description>Could there be a problem with your $HOME definition?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483292</guid>
  	<pubDate>Fri, 13 Jan 2006 07:44:35 -0800</pubDate>
  	<dc:creator>ursus_comiter</dc:creator>
</item>
<item>
  	<title>By: ursus_comiter</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483300</link>	
  	<description>In other words, does the command &apos;echo $HOME&apos; show you your home directory as it should be listed?  Are you using $HOME successfully in any other parts of your .procmailrc?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483300</guid>
  	<pubDate>Fri, 13 Jan 2006 07:52:37 -0800</pubDate>
  	<dc:creator>ursus_comiter</dc:creator>
</item>
<item>
  	<title>By: nicwolff</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483376</link>	
  	<description>Alternatively, does it work if you hard-code the full paths in your INCLUDERC lines? As,&lt;br&gt;
&lt;br&gt;
INCLUDERC=/home/jessamyn/.virusrc&lt;br&gt;
&lt;br&gt;
or wherever.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483376</guid>
  	<pubDate>Fri, 13 Jan 2006 09:16:49 -0800</pubDate>
  	<dc:creator>nicwolff</dc:creator>
</item>
<item>
  	<title>By: andrew cooke</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483437</link>	
  	<description>for 2: i think you&apos;re trying to use the &amp;quot;de morgans law&amp;quot; trick to get OR from AND, but i&apos;m not sure.  see the explanation &lt;a href=&quot;the.mindstorm at gmail.com)&quot;&gt;here&lt;/a&gt; - scroll down to the subsection titled &amp;quot;DeMorgan&apos;s Laws&amp;quot;.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483437</guid>
  	<pubDate>Fri, 13 Jan 2006 10:06:35 -0800</pubDate>
  	<dc:creator>andrew cooke</dc:creator>
</item>
<item>
  	<title>By: andrew cooke</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483440</link>	
  	<description>rats.  &lt;a href=&quot;http://perlcode.org/tutorials/procmail/proctut/proctip2.pod&quot;&gt;http://perlcode.org/tutorials/procmail/proctut/proctip2.pod&lt;/a&gt; for my link above.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483440</guid>
  	<pubDate>Fri, 13 Jan 2006 10:07:29 -0800</pubDate>
  	<dc:creator>andrew cooke</dc:creator>
</item>
<item>
  	<title>By: jessamyn</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#483496</link>	
  	<description>$HOME seems to be working corerctly elsewhere. I&apos;ll try including the full path in INCLUDERC and see if it does any good. Thanks much for the tips, debugging this is a total pain in the ass.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-483496</guid>
  	<pubDate>Fri, 13 Jan 2006 11:16:22 -0800</pubDate>
  	<dc:creator>jessamyn</dc:creator>
</item>
<item>
  	<title>By: jessamyn</title>
  	<link>http://ask.metafilter.com/30743/why-wont-procmail-do-what-I-want-it-to#503384</link>	
  	<description>followup: I never did get it working quite right, but I figured out some more syntax problems that I was having based on the AND information that ursus_comiter included which solved the immediate problem. Thanks everyone for pitching in.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.30743-503384</guid>
  	<pubDate>Mon, 06 Feb 2006 13:43:29 -0800</pubDate>
  	<dc:creator>jessamyn</dc:creator>
</item>

    </channel>
</rss>
