At 12:05 AM 8/11/2004, Robert Menschel wrote:
20_head_tests.cf: header FROM_HAS_MIXED_NUMS3 From:addr =~ /^[a-z]+\d+[a-z]+\d+[a-z]+\w*\@/i
20_head_tests.cf: describe FROM_HAS_MIXED_NUMS3 From: contains numbers mixed in with letters
50_scores.cf: score FROM_HAS_MIXED_NUMS3 1.092 1.192 2.193 1.782


What does From:addr do?  How is this different from the normal From
header test?

It ignores the non-address description string parts of the header, and also only grabs the first address in it. (which is fine for a From: line)


ie: in the header From: Robert Menschel <[EMAIL PROTECTED]> it will only examine your address, [EMAIL PROTECTED], and will ignore your name, Robert Menschel.

It's implemented in PerMsgStatus.pm, and appears to be a new thing is SA 3.x

Some explaining coments from the code that implements this:

          # Get the email address out of the header
          # All of these should result in "[EMAIL PROTECTED]":
          #
          # [EMAIL PROTECTED]
          # [EMAIL PROTECTED] (Foo Blah)
          # [EMAIL PROTECTED], [EMAIL PROTECTED]
          # display: [EMAIL PROTECTED] (Foo Blah), [EMAIL PROTECTED] ;
          # Foo Blah <[EMAIL PROTECTED]>
          # "Foo Blah" <[EMAIL PROTECTED]>
          # "'Foo Blah'" <[EMAIL PROTECTED]>


There's also apparently a ":name" one as well, to get the non-address name part.


          # Get the real name out of the header
          # All of these should result in "Foo Blah":
          #
          # [EMAIL PROTECTED] (Foo Blah)
          # [EMAIL PROTECTED] (Foo Blah), [EMAIL PROTECTED]
          # display: [EMAIL PROTECTED] (Foo Blah), [EMAIL PROTECTED] ;
          # Foo Blah <[EMAIL PROTECTED]>
          # "Foo Blah" <[EMAIL PROTECTED]>
          # "'Foo Blah'" <[EMAIL PROTECTED]>





Reply via email to