[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: regexp help



On Friday, January 24, 2003 06:09, Dave W wrote:
> I'm using animail and spamassassin on my mail now, with -some- success
> on spam, but need help with animail's ~/.animail/filter file.  It can be
> filled with regexps for mail blocking, but I'm a regexp newbie and can't
> find how the heck to do an "and" in a regexp.  "or" is easy, but _is_
> there an "and" function for regexps?

What you actually want is (I think) commonly called the "alternate" operator.
Try something like:
^Subject:.*(term1|term2)

This certainly works for filtering with procmail.

Some systems also have a regexp manual page that may be of some use.

Also, if you find SpamAssassin is not filtering (nearly) all your spam, you
might consider checking that it is configured correctly and that your
threshold is set high enough.  I find SA does a great job on its own, and
only use mail filtering to place my mail in the appropriate folder.

HTH

-- 
Michael Wardle
Adacel Technologies




Reply to: