In SpamAssassin version 3.0.2 running on Perl version 5.8.4 I have tried to 
apply the patch suggested in
http://bugzilla.spamassassin.org/show_bug.cgi?id=4191
but it does not work as expected:
> The fix is trival.  Apply the following patch to lib/SpamAssassin/Util.pm:
> 
> --- Util.pm.orig        Mon Mar 14 10:38:59 2005
> +++ Util.pm     Mon Mar 14 10:39:12 2005
> @@ -788,7 +788,7 @@
>    $uri =~ s#^[a-z]+:/{0,2}##gsi;       # drop the protocol
>    $uri =~ s,^[^/]*\@,,gs;              # username/passwd
>    $uri =~ s,[/\?\&].*$,,gs;            # path/cgi params
> -  $uri =~ s,:\d+$,,gs;                 # port
> +  $uri =~ s,:\d*$,,gs;                 # port
> 
>    return if $uri =~ /\%/;         # skip undecoded URIs.
>    # we'll see the decoded version as well

I copied that from my browser to a file and ran
patch -p0 < /root/Util.pm.patch in
/usr/share/perl5/Mail/SpamAssassin.
Error:
patching file Util.pm
Hunk #1 FAILED at 788.
1 out of 1 hunk FAILED -- saving rejects to file Util.pm.rej

# cat Util.pm.rej 
***************
*** 788,794 ****
    $uri =~ s#^[a-z]+:/{0,2}##gsi;       # drop the protocol
    $uri =~ s,^[^/]*\@,,gs;              # username/passwd
    $uri =~ s,[/\?\&].*$,,gs;            # path/cgi params
-   $uri =~ s,:\d+$,,gs;                 # port
  
    return if $uri =~ /\%/;         # skip undecoded URIs.
    # we'll see the decoded version as well
--- 788,794 ----
    $uri =~ s#^[a-z]+:/{0,2}##gsi;       # drop the protocol
    $uri =~ s,^[^/]*\@,,gs;              # username/passwd
    $uri =~ s,[/\?\&].*$,,gs;            # path/cgi params
+   $uri =~ s,:\d*$,,gs;                 # port
  
    return if $uri =~ /\%/;         # skip undecoded URIs.
    # we'll see the decoded version as well

How exactly should i apply the patch?

Reply via email to