You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/10/04 19:10:56 UTC

[Bug 3866] New: Empty rewrite_header doesn't remove rewrite_header setting

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

           Summary: Empty rewrite_header doesn't remove rewrite_header
                    setting
           Product: Spamassassin
           Version: 3.0.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Libraries
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: dws@ee.ethz.ch


Hi,

I have in the site the following configuration:

rewrite_header Subject ****SPAM****

My users are used to that behaviour and I don't want to change it. It should be 
however possible to the users to override that global setting. I did the 
following in my user_pref:

rewrite_header Subject

The result is that a space is prepended to the Subject. Note that the line has 
no space at the end after Subject.

The code in Conf.pm (line 560) could be as follows:

      # We only deal with From, Subject, and To ...
      if ($hdr =~ /^(?:From|Subject|To)$/) {
        if ($hdr ne 'Subject') {
          $string =~ tr/()/[]/;
        }
        
        if ($string =~ /^\s*$/) {
          delete $self->{rewrite_header}->{$hdr};
        }
        else {
          $self->{rewrite_header}->{$hdr} = $string;
        }
        return;
      }

Cheers
David



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