Mailing List Archive

Detecting missing headers
I've noted that those annoying bodyless spams also lack a To: header. Now,
while someone might send you a spam with only a subject line, it is unlikely
that a real mailer will send you a message without a To: line, AND without a
body. And for that matter, with a blank subject. Be kinda useless,
wouldn't it?

So how do I detect that the To header is missing? The SA rules for header
matching say that the tests have to match the header capitalization exactly,
so that Cc won't match a misformatted CC. This implies to me that To is
going to have a hard time matching a field that isn't there so that I can
check the text and see if it is empty.

Any suggestions?

Loren