procmail
[Top] [All Lists]

Re: (blocking mail with) no subject

2000-11-12 14:11:24
Dallman Ross wrote,

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

Thank you.

| 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.

Well, we were talking about subject lines, and I would not consider a subject
of "<>" empty.

| This tends to happen with To: or From: more than Subject, I think ...

Right, or Message-Id:, because "<>" is filling in for something that normally
would be in angle brackets.

|    :0: # brackets enclose caret, space, tab, [left chevron, right chevron]
|    * ! ^Subject:.*[^  <>]
|    subjectisemptyorblankormissing
| 
| Is that correct, David?

Depends on what you want, Dallman.  If you want specifically to treat "<>"
(but not "<><>" or "<<>>") the same as emptiness, 

   :0
   * ^Subject:.*[^      ]
   * ! ^Subject:[       ]*<>[   ]*$
   { } # has legit subject, so let later recipes handle it
   :0E: otherwise
   subjectisemptyormissingorblankexceptformaybeoneemptypairofanglebrackets

On the other hand, perhaps you want to accept only subjects that actually
say something instead of just drawing it, by testing for at least one digit
or letter of the alphabet:

  :0:
  * ! ^Subject:.*[a-z0-9]
  subjectismissingormeaningless

_______________________________________________
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>