-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 25 Apr 2002 3:30 am, Clark C . Evans wrote: > Hello. I'd like a rule that gives high values > to "unsubscribe" remarks in the body of the email > if the bulk header is not present. This rule > should catch the "bulk" of my spam as mosts lists > have the bulk header appropriately set. Basically > make the rule high enough so that in combination > with the keywords "money" "price" "offer" would > tag it as spam.
You'd have to do this with an eval. Try adding the following to EvalTests.pm: sub bulk_and_unsubscribe { my ($self, $body) = @_; my $precedence = $self->get('Precedence'); chomp($precedence); return 0 unless $precedence =~ /bulk|list/; return grep(/To unsubscribe/i, @{$body}) ? 1 : 0; } (you may wish to adjust the regexp there - this was designed for ezmlm lists) Then add a rule: body BULK_AND_UNSUBSCRIBE eval:bulk_and_unsubscribe() describe BULK_AND_UNSUBSCRIBE Email contains both Precendence: bulk and an "unsubscribe" message score BULK_AND_UNSUBSCRIBE -2 (describe needs to be on one line). Let me know how well it works (and any adjustments you make to the regexp) and I'll add it to the ruleset. - -- Matt. <:->get a SMart net</:-> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8x9/C5tFry5Ir+lARAmnfAJwPb9WE2j+Nk96y6mh/Ley14a22FgCffdsq J5TezVnB4mdtmFymHqTk3LE= =5lpL -----END PGP SIGNATURE----- _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk