procmail
[Top] [All Lists]

Re: forward blank or empty subjects

2001-01-31 12:13:54
At 09:43 2001-01-31 -0200, João Paulo Andrade did say:

:0h
* ^Subject:[ ]*$
!patric_fernandes(_at_)localdomain(_dot_)com(_dot_)br

Note that the regexp you're using here could also catch NO SPACE as well - use:

* ^Subject: $

If you truly want to capture a SINGLE (brackets or parens should work fine too, but since you don't have OR conditions or character classes, they're superfluous).

* ^Subject:[ ]+$

One or more spaces.

* ^Subject:[ ]?$

Zero or one space (which looks appropriate to your next regexp).

:0 fw
* 1^0 ^Subject:([ ]$|$)
!patric_fernandes(_at_)localdomain(_dot_)com(_dot_)br

Please evaluate the reasoning behind your selection of flags on this rule. Check the procmail manpages for the function of the flags you are using.

And, as per Collins sound recommendation, turn on verbose logging and examine the logfile - you'll learn a lot just from that, especially from the error messages you're probably getting from the latter rule.


I think what you probably want is:

:0h
* ^Subject:[ ]?$
! patric_fernandes(_at_)localdomain(_dot_)com(_dot_)br

Which should catch messages which contain a Subject header which consists of either a single space, or none at all, then end of line.

Of course, perhaps you just want messages which have blank (but _existing_) Subjects, in which case, there may be more than one space, or there may be tabs in there. If so, use:

* ^Subject:[    ]*$

(brackets contain space and tab).


Didn't we go over this very same stuff just a little over a week ago?

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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