On Sunday 15 October 2006 21:38, jdow took the opportunity to say:
> From: "Magnus Holmgren" <[EMAIL PROTECTED]>
>
> On Sunday 15 October 2006 16:55, Magnus Holmgren took the opportunity to 
say:
> > Indeed, when I did "spamassassin -D bayes < testmessage" the debug output
> > reported learning from a different "@sa_generated" message ID
> > than "sa-learn -D bayes --forget" said it was trying to forget (but
> > didn't find). AFAICT from reading the source, get_msg() in
> > Mail::SpamAssassin::Bayes is used in both cases. So why does it make up
> > different IDs?
>
> Apparently, when sa-learn reads a message from stdin, for some reason the
> entire header, and possibly even the empty line separating it from the
> body, disappears. Or at least $msg->get_header("Date") and
> $msg->get_header("Received") in get_msgid() in Bayes.pm return undef or ''.
> When I give sa-learn a filename it works. Also, learning via the TELL spamd
> method works, as does spamassassin -r with filename as well as stdin.
>
> jdow:
> First, if you have fed a message through SpamAssassin and it has
> encapsulated the spam as an attachment the resultant message will
> have a different message id. 

I will do no such thing. I want my mail intact.

> I am not sure which message ID gets 
> reported at the place you are looking. (It appears you are messing
> with the source. That's not a good idea until you are sure what the
> program is doing. But I'm sure you know that already.)

The only thing I've done to the source is add a debug printout.

> You do not give adequate information about how you are running salearn

testmessage is of course a single plain message. What I'm saying is that

$ sa-learn --spam < testmessage

and

$ sa-learn --spam testmessage

give different results. I forgot to mention the version, 3.1.4 (Debian Etch). 
3.0.3 (Debian Sarge) doesn't exhibit this behaviour, but there seems to be 
some other fishiness going on. I'll investigate further.

-- 
Magnus Holmgren        [EMAIL PROTECTED]
                       (No Cc of list mail needed, thanks)

Attachment: pgpymZSS4UfHQ.pgp
Description: PGP signature

Reply via email to