procmail
[Top] [All Lists]

Re: Recipe for killing messages with no subject

2004-07-20 08:25:01
Bob George wrote:

Dallman Ross wrote:
   * ! ^Subject:.*[^    ]

This will only match on SINGLE LINE headers with no subject, correct?

Incorrect. Within the head (but not within the body), procmail unfolds continued header lines, and it treats any newline where a header is continued (in contrast to one where it is terminated) as if it were a space for matching to regexps.

Although somewhat uncommon, a header CAN span multiple lines. I've
received legitimate (list) mails with Subject: headers that span two
lines, with some that (oddly) have no text after the Subject: on the
1st, but some one the 2nd.

Sometimes messages just look that way because of the way your mail client displays them, but yes, they can also really be like that, so long as the continuation line starts with a space or a tab. Either way, Dallman's suggested code will work.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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