procmail
[Top] [All Lists]

Re: (blocking mail with) no subject

2000-11-11 14:03:51

On Sat, 11 Nov 2000 12:31:08 -0600 (CST), David W. Tamkin said:

 That's four interpretations of your question.  Each of the solutions is easy,
 but we need more details.  So here are all four.
 
 1. This will catch mail with no subject line, mail with an empty subject
 header, and mail with only whitespace in the subject:
 
   :0: # brackets enclose caret, space, tab
   * ! ^Subject:.*[^  ]
   subjectisemptyorblankormissing
 
 2. This will catch mail with an empty subject header, but mail with no sub-
 ject line and mail with anything (except one lone space) after "Subject:"
 will sail past:
 
   :0:
   * ^Subject: ?$
   subjectisempty
 
 3. This will catch mail with empty or blank subjects, but mail without any
 subject header line will get past it:
 
   :0: # brackets enclose space and tab
   * ^Subject:[       ]*$
   subjectisemptyorblank
 
 4. This will catch mail with an empty subject or no subject line at all, but
 a message with a subject consisting only of whitespace will slip through
 (unless the whitespace is a single space after the colon and nothing more,
 which I'm treating as equivalent to emptiness).
 
   :0:
   * ! ^Subject:.*(.+ |[^ ])
   subjectisemptyormissing

This information is useful to me also, because the one rule I had in my
procmailrc was not catching anything (I was using #3 only).

Thanks, just what I needed.

--
Andrew

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