On Wed, 16 Oct 2013, Martin Gregorie wrote:
On Wed, 2013-10-16 at 11:47 -0400, Bowie Bailey wrote:
I'm not quite sure what you were intending to match.
On more mature reflection, neither am I! I should have said:
/^\s{0,80}\S{0,20}\s{0,80}$/
...which matches /^$/, or any message having a blank line.
Body lines are space-collapsed, so how about this:
body __SINGLE_WORD /^\s?\S{1,20}\s?$/
You'd probably also want to meta it with __BODY_TEXT_LINE to avoid hitting
on a long message that has a single-word line somewhere within it (like
this message, for example).
You also have to allow for the subject, which is included in body rules. I
assume you don't want a single-word-body rule to fire on a multi-word
message body having a single-word subject.
20 might be a bit conservative, too. :)
Giving:
body __SINGLE_WORD_LINE /^\s?\S{1,40}\s?$/
tflags __SINGLE_WORD_LINE multiple maxhits=2
header __SINGLE_WORD_SUBJ Subject =~ /^\s*\S{1,40}\s*$/
meta SINGLE_WORD_BODY __BODY_TEXT_LINE < 3 && (__SINGLE_WORD_LINE = 2 ||
(__SINGLE_WORD_LINE > 0 && !__SINGLE_WORD_SUBJ))
(__BODY_TEXT_LINE counts a nonempty subject because the subject is
included in body text.)
Untested, of course.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
[email protected] FALaholic #11174 pgpk -a [email protected]
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Where We Want You To Go Today 09/13/07: Microsoft patents in-OS
adware architecture that incorporates monitoring and analysis of
user actions and interrupting the user to display apparently
relevant advertisements (U.S. Patent #20070214042)
-----------------------------------------------------------------------
503 days since the first successful private support mission to ISS (SpaceX)