On Thu, Jul 24, 2003 at 11:55:56AM -0400, Matt Kettler wrote:
> At 01:51 PM 7/24/2003 +0200, Cahya Wirawan wrote:
> >I think it is because white space in "jenny hewit" 
> ><[EMAIL PROTECTED]>.
> >if it is: "jennyhewit"<[EMAIL PROTECTED]> , it will match.
> >Look on the last code:
> >  if ($hdr_from =~ /^\s*\S+\s*$/ && $hdr_to =~ /^\s*\S+\s*$/){return 1;}
> >it doesn't allow space in the From or To header. But I don't know why it
> >should be like that, I don't really understand the logic. and why both From
> >and To should not be exact the same to match this rule.
> 
> If you look at the lines above it, all the whitespace is stripped out.. 
> There's even a comment describing it.
> 

here the code again:
  ....
  # BUG: From:addr and To:addr sometimes contain whitespace
  $addr_from =~ s/\s+//g;
  $addr_to =~ s/\s+//g;
  return 0 if (!length($addr_from) || !length($addr_to) ||
               $addr_from ne $addr_to);
 
  if ($hdr_from =~ /^\s*\S+\s*$/ && $hdr_to =~ /^\s*\S+\s*$/) {
    return 1;
  ....


no, it is not stripped out. only whitespace in $addr_from and $addr_to 
is stripped out but not in $hdr_from and in $hdr_to.

cahya.



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to