0

I am aware of how to set spamassasin to penalize (score) a mail containing a .ZIP file, which goes like this:

mimeheader MY_CNF_ZIP   Content-Type =~ /^application\/zip/
score      MY_CNF_ZIP   1.5

But I am not sure how to write a rule for empty subject (recently more and more spams with empty subject are received...)

Shall this be correct?:

header MY_CNF_EMPTYSUB    Subject =~ /^$/
score  MY_CNF_EMPTYSUB    1.5

Thanks

crysman
  • 167
  • 1
  • 11

1 Answers1

2

Yes this should work like a charm :)

For information, there is a MISSING_SUBJECT rule on SA which check if Subject header field is present are not. But not if present and empty ...

Nic0
  • 102
  • 5
  • The distinction is not very meaningful anyway. Also, I don't actually see a lot of spam with empty subject lines. Perhaps you are using a client which displays *invalid* subjects as empty? There's plenty of that in my inbox (mainly Cyrillic subjects without any encoding specified, so just a bunch of non-ASCII bytes.) – tripleee Dec 19 '16 at 11:25
  • 1
    @tripleee: Might be. In any event, I can see it working now examining some spam e-mail headers and they, indeed have got MY_CNF_EMPTYSUB score. Thank you, folks – crysman Dec 23 '16 at 17:37