http://bugzilla.spamassassin.org/show_bug.cgi?id=3113

           Summary: Pre-Existing X-Spam headers not removed
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P5
         Component: Libraries
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


2.70-r6565 does not do remove X-Spam headers before handling the message.

Reason is that delete_header does not affect the pristine headers, but those
are used by rewrite_header().

The appended patch is a simple fix.

*** /root/src/Mail-SpamAssassin-2.70/lib/Mail/SpamAssassin/PerMsgStatus.pm 
2004-02-11 09:55:02.000000000 +0100
--- PerMsgStatus.pm     2004-03-01 11:02:39.000000000 +0100
***************
*** 755,761 ****
    my ($self) = @_;
  
    # put the pristine headers into an array
!   my(@pristine_headers) = $self->{msg}->get_pristine_header() =~ /^([^:]+:[ ]
+(?:.*\n(?:\s+\S.*\n)*))/mig;
    my $addition = 'headers_ham';
  
    if($self->{is_spam}) {
--- 755,761 ----
    my ($self) = @_;
  
    # put the pristine headers into an array
!   my(@pristine_headers) = grep { !/^x-spam-/i } $self->{msg}
->get_pristine_header() =~ /^([^:]+:[ ]+(?:.*\n(?:\s+\S.*\n)*))/mig;
    my $addition = 'headers_ham';
  
    if($self->{is_spam}) {



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to