With the locking (:0:) all seems to work now. I'm guessing it's because I have an IMAP connection open to the mailbox while I receive the new email and it get's processed. While we're talking about procmail... A second question: :0: * ^From.*jenny@axte84\.com * ^Subject.*MILLION OPT-IN EMAIL ADDRESSES Badspam This will do an AND between the two conditions ... Is there an easy way to OR between them? ... Or do I need to make a separate rule for each and every condition? And an even further note... What are the thoughts on some of these anti-spam tools that work with procmail? Any favorites? Thanks a lot guys, -Marc -----Original Message----- From: Theo Van Dinter [mailto:felicity@kluge.net] Sent: Friday, November 08, 2002 9:21 AM To: wlug@mail.wlug.org Subject: Re: [Wlug] Procmail Question On Fri, Nov 08, 2002 at 09:13:18AM -0500, Peter Gutowski wrote:
According to the man page the second ":" is optional, i.e.
:0:
but, as a sample of something known to work (from the SpamAssassin sample .procmailrc) it does use the above syntax. Here's the example:
So maybe the second ":" is not optional all the time?
Just so we're all clear, the second ":" tells procmail that is needs to lock the file before writing to avoid corrupted mailboxes. So it's a good idea if you're writing to a mailbox, but isn't actually required, especially if you're writing to /dev/null or something. I didn't see anything wrong offhand with the procmail rules shown. Can we see the header of an example mail which doesn't work with the original but works with the carbon copy method? (and by work, just to double check, we're talking about the message going into the "test" folder). -- Randomly Generated Tagline: "When it is not necessary to make a decision, it is necessary not to make a decision." - From www.slashdot.org
On Fri, Nov 08, 2002 at 09:48:14AM -0500, Marc Hughes wrote:
:0: * ^From.*jenny@axte84\.com * ^Subject.*MILLION OPT-IN EMAIL ADDRESSES Badspam
This will do an AND between the two conditions ... Is there an easy way to OR between them? ... Or do I need to make a separate rule for each
There's a way, although it's really not straightforward... One of my old procmail-only anti-spam rules looked for 8-bit chars in the body: :0BDfh * -1^1 . * 2^1 =[0-9A-F][0-9A-F] * 20^1 [��������������������������������] * 20^1 [��������������������������������] * 20^1 [��������������������������������] * 20^1 =[A-F][0-9A-F] | formail -A "X-Reject: Too many foreign charcters." (from http://www.vex.net/~wadialix/email/chinese/link.html) Which basically says that for any 8 bit char, add 20 "points" to the rule. If there's a quoted-printable char (=XX), add 2 points, and for anything else add -1 points. As long as the rule scores 1+ points (ie: it's positive), it matches. So an or for you would be: :0: * 1^1 ^From.*jenny@axte84\.com * 1^1 ^Subject.*MILLION OPT-IN EMAIL ADDRESSES Badspam I belive, haven't tested it. :) Look at the procmailsc man page for more info.
and every condition? And an even further note... What are the thoughts on some of these anti-spam tools that work with procmail? Any favorites?
SpamAssassin, hands down. :) http://www.spamassassin.org/ Sucessfully catches >98% of the spam I receive, currently at ~2100 a month (with ~5000 blocked at the SMTP level, grrr, stupid spammers!) I used to do a lot of procmail stuff, and now it's just SA. (warning: I'm a SA developer, so I'm a little biased. ;)) -- Randomly Generated Tagline: "It's always darkest before dawn. So if you're going to steal your neighbour's newspaper, that's the time to do it." - Zen Musings
On Fri, Nov 08, 2002 at 10:07:37AM -0500, Theo Van Dinter wrote:
:0: * 1^1 ^From.*jenny@axte84\.com * 1^1 ^Subject.*MILLION OPT-IN EMAIL ADDRESSES Badspam
Oops, slight update: :0: * 1^0 ^From.*jenny@axte84\.com * 1^0 ^Subject.*MILLION OPT-IN EMAIL ADDRESSES Badspam I believe they'd be functionally equivilent for you, but the first one keeps looking for matches after the first hit. The second one stops at 1 hit, so it's more efficient. :) There's a nice discussion about this stuff at: http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/1998-01/msg00335... :) -- Randomly Generated Tagline: "This is a beta release of Red Hat Linux. It is not intended for mission critical applications. It's not even intended for non-mission critical applications. Important data should not be entrusted to Wolverine, as it may eat it and make loud belching noises." - RedHat Beta release "Wolverine"
On Fri, Nov 08, 2002 at 09:48:14AM -0500, Marc Hughes wrote: HughesM> This will do an AND between the two conditions ... Is there an easy way HughesM> to OR between them? ... Or do I need to make a separate rule for each HughesM> and every condition? And an even further note... What are the thoughts HughesM> on some of these anti-spam tools that work with procmail? Any HughesM> favorites? They are just perl regexps, so you can use '|' * (^From.*jenny@axte84\.com)|(^Subject.*MILLION OPT-IN EMAIL ADDRESSES) Another useful feature is the 'E'lse tag, which executes only if the previous rule did NOT match: :0: * ^From: president@whitehouse.gov vip :0E: non-vip -- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886
participants (3)
-
Charles R. Anderson
-
Marc Hughes
-
Theo Van Dinter