On Wednesday 09 October 2002 20:51 CET Theo Van Dinter wrote:
> On Wed, Oct 09, 2002 at 08:07:30PM +0200, Malte S. Stretz wrote:
> > No, it doesn't. At least not always ;-) SA first checks for the
> > existence of a X-Spam-Status header. If this one exists, it will remove
> > all X-Spam-* headers. As this mail contains only a X-Spam-Level, it
> > won't be removed. I've got currently no time to fix this, somebody has
> > to do it or should open a bug.
>
> Well, I've just looked at the code:  At the top of PerMsgStatus::check()
> there's a call for "$self->clean_spamassassin_headers();".  No checks
> around it for anything, just a call.  That routine is very simple
> and strips out the X-Spam-{Status, Level, etc.} headers, and replaces
> Content-Transfer-Encoding, Content-Type, and Return-Receipt-To if there's
> a X-Spam-Prev header for it.  The check then commences.

I just had a quick look at PerMsgStatus::rewrite_as_spam():
| if ($self->{msg}->get_header ("X-Spam-Status")) {
|     # the mail already has spamassassin markup. Remove it!
|     # bit messy this; we need to get the mail as a string,
|     # remove the spamassassin markup in it, then re-create
|     # a Mail object using a reference to the text
|     # array (why not a string, ghod only knows).
|[...]
|     # delete the SpamAssassin-added headers in the target message.
|     $self->{msg}->delete_header ("X-Spam-Status");
|     $self->{msg}->delete_header ("X-Spam-Flag");
|     $self->{msg}->delete_header ("X-Spam-Checker-Version");
|     $self->{msg}->delete_header ("X-Spam-Prev-Content-Type");
|     $self->{msg}->delete_header ("X-Spam-Prev-Content-Transfer-Encoding");
|     $self->{msg}->delete_header ("X-Spam-Report");
|     $self->{msg}->delete_header ("X-Spam-Level");
| }

Seems like the code is doubles now.

> I also just did a quick check by taking the message I'm responding to,
> added a "X-Spam-Level" header with 15 stars or so, then ran through
> spamc -- header was removed.  spamassassin -- header was removed.
>
> So unless I'm missing something obvious in the discussion, the behavior
> described doesn't happen in 2.42 at least.  I don't think the code has
> changed since 2.40, so 2.4x and later should be fine.  I haven't looked
> at anything earlier, so 2.2 and 2.3 may have a bug, but well -- that's
> what the new versions are for. ;)

Jep, seems like the bug was fixed between 2.20 and now. Next time I'll grep 
more thoroughly ;-)

Malte

-- 
--- Coding is art.
-- 




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to