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've checked the filenames, file permissions and file paths and I'm sort of stumped.
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've read that you can create OR queries in procmail just by doing something like this
:0 H
* ^To.*crazynutpostcardlady
* ^To.*barthrulz
{
:0 fhw
| formail -A "Suspected_Spam: To... bad address" # a relic from the rest of my script
:0:
/dev/null
}
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
my procmail script, it's fine, but a bitch to update. I've been reading FAQs all day but I feel that there is clearly something I'm missing about how procmail operates. I'm comfy in a unix shell but otherwise don't have a lot of coding background so regexps are sort of new for me.
I may migrate to spam assassin or something else at some point, but for now I'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.
To get OR conditions, you could plop everything on one line like so:
* ^To.*(crazynutpostcardlady|barthrulz)
But that sounds really tedious.
A better solution is to use scoring to create a set of conditions that will each be checked in turn, providing a total score at the end to determine a match.
:0 H
* 1^0 ^To.*crazynutpostcardlady
* 1^0 ^To.*barthrulz
That will score each line that's a match as 1. Procmail will then consider the total and if it's 1 or higher consider it a match for the rule.
I'm not sure what your issue with INCLUDERC is. Could I see your .procmailrc headers and your INCLUDERC statements?
posted by ursus_comiter at 7:23 AM on January 13, 2006