procmail
[Top] [All Lists]

Re: (blocking mail with) no subject

2000-11-11 19:29:28
From: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>

Does that include mail with no subject line at all?
Does it include mail with whitespace characters in the subject header's
 contents but no visible characters?

That's four interpretations of your question.  Each of the solutions is easy,
but we need more details.  So here are all four.



The pedagogy was nicely done, and your thanks were well deserved.

There's one other thing that I see often, though, and we want the code
to handle it, I'd think:  Headers that have otherwise-empty (or
whitespaced-only) "<>" signs.

This tends to happen with To: or From: more than Subject, I think,
though I 've seen it with all (almost always in spam).  Since your
code was meant to be instructive beyond merely being only about
the "Subject:" header, I'd want to add that possibility to the discussion
and proposed solution.


1. This will catch mail with no subject line, mail with an empty subject
header, and mail with only whitespace [or angle-brackets] in the subject:

   :0: # brackets enclose caret, space, tab
   * ! ^Subject:.*[^    <>]
   subjectisemptyorblankormissing

Is that correct, David?

-- 
dman+noacks(_at_)notnetcom(_dot_)com
_______________________________________________
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>