spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Horne <john.ho...@plymouth.ac.uk>
Subject Re: Problem matching newline in body
Date Fri, 21 May 2010 14:23:26 GMT
On Fri, 2010-05-21 at 06:53 -0700, John Hardin wrote:
> On Fri, 21 May 2010, John Horne wrote:
> 
> > Hello,
> >
> > Can you tell it's Friday afternoon? What should be a simple problem
> > always seems to become a nightmare on Friday afternoons! :-)
> >
> > Using SA 3.3.1 I have the following simple rule:
> >
> >     body   LOCAL_JH     /userid:\s*\n/i
> >
> > which should look for 'userid:', any number of spaces and then a NL
> > character (that is, there is nothing following the spaces on the same
> > line).
> >
> > If I send a message containing:
> >
> >    some text<NL>
> >    userid: <NL>
> >    some more text
> 
> The "body" rule processing collapses that paragraph into a single string, 
>
Ah, okay that would make sense. It would also explain why the use of the
'm' modifier didn't seem to work either (it would be matching at the
very end of the message).

> 
> Try this:
> 
>     rawbody LOCAL_JH /userid:\s*$/i
> 
That failed as-is, but by including the 'm' modifier it works fine :-)

I (now) notice that in the Mail::SpamAssassin::Conf man page it states
for 'rawbody':

     ...but HTML tags and line breaks will still be present.
     Multiline expressions will need to be used to match strings that
     are broken by line breaks.


Many thanks,

John.

-- 
John Horne                   Tel: +44 (0)1752 587287
University of Plymouth, UK   Fax: +44 (0)1752 587001

Mime
View raw message