procmail
[Top] [All Lists]

Re: Matching A Missing Subject: Field

1997-06-07 05:47:00
On Fri, 6 Jun 1997, David W. Tamkin wrote:
--
The complete absence of a subject field can be found this way:

 * ! ^Subject:

The absence or emptiness of a subject field can be found this way:

 * !^Subject:.*[^     ]

where the brackets enclose caret, space, tab (meaning "any character except
newline, space, or tab").  Thus, there would have to be a visible printing
character in the subject's contents to match that expression (and, because
it is negated, fail the condition).

It depends on how you want to treat the case of an empty or blank subject.

Thanks! It works great and I believe it will fit my need just fine.

I would also like to be able to match keywords in the body. My limited
experience so far has been egrep'ing the headers with procmail.  How would
I go about egrep'ing the body? 

Below is my idea. I'm also looking for a way to match on multiple 
commands on separate lines for muliple operations, i.e.: retrieving 2 or 
3 documents instead of one.

:0B
* ^join[        ]list\>
$LIST


Regards,

Dave/Webmaster

           Join www.cauce.org | Join Joke-L
  Hit SPAMMERS Where It Hurts | Listserv <listserv(_at_)ddave(_dot_)com>

"God grant me the serenity to accept the things I cannot change, 
the courage to change the things I can, and the wisdom to hide 
the bodies of the SPAMMERS that I killed."

<Prev in Thread] Current Thread [Next in Thread>