You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Mark R. London" <mr...@psfc.mit.edu> on 2005/12/25 14:47:34 UTC

Testing for short message?

Has anyone come up with a way to test for short messages?  I.e., I want to 
test for short messages that only include a single URL. Thanks for any help. - 
Mark



Re: Testing for short message?

Posted by Matt Kettler <mk...@comcast.net>.
At 08:47 AM 12/25/2005, Mark R. London wrote:
>Has anyone come up with a way to test for short messages?  I.e., I want to
>test for short messages that only include a single URL. Thanks for any 
>help. -
>Mark


You can test for message body-text length by doing a body rule such as this:

body    __SHORT_100     /.{100}/

which will match any message of at least 100 charachters of body text. Use 
it in negated form in a meta rule. Something like this:

body    __SHORT_100     /.{100}/
uri     __HAS_URI       /./

meta URI_SHORT_MSG      (__HAS_URI && ! __SHORT_100)
score URI_SHORT_MSG     0.01
describe URI_SHORT_MSG  Highly experimental untested rule

Note: please test this rule before assigning it any significant score.