procmail
[Top] [All Lists]

Re: How to match on empty body?

1996-12-10 02:20:17
David W. Tamkin writes on 9 December 1996 at 15:39:40
: * !^FROM_DAEMON

You want to be sure that the body doesn't match ^FROM_DAEMON?

: * !^Precedence: ?(bulk|list|junk)

You want to be sure there is no low Precedence: header in the body?  Besides,
you already ruled those out by rejecting matches to ^FROM_DAEMON.

"I did not know that", but checking the man pages I see that "you are
correct sir!".  Just blew away over a half-dozen superfluous
^Precedence: checks.

: * ^^[        ]*$

Not good, Dan.  That will match on an empty first line even if there is

as I found out this morning... :-(

 * B ?? ^^( | |$)*^^

I missed the "special cases" section of ??, I think I understand the
regexp after another read through the man page.

You could combine those two into one recipe: even if there are endless runs
[...]
   :0f
   | formail -rt -I "Precedence: junk" -A "X-Loop: ${UNIQUE_NAME}" ;\
   echo "Hi!" ;\

I like it...just changed a few more to do the same.

Thanks for the help,
   Dan
------------------- message is author's opinion only ------------------
J. Daniel Smith <DanS(_at_)bristol(_dot_)com>        
http://www.bristol.com/~DanS
Bristol Technology B.V.                   +31 33 450 50 50, ...51 (FAX)
Amersfoort, the Netherlands               {info,jobs}(_at_)bristol(_dot_)com

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