Mailing List Archive

[Bug 3383] Folded message-id unrecognized
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From jbrunette@excel.net 2004-05-13 09:48 -------
Created an attachment (id=1954)
--> (http://bugzilla.spamassassin.org/attachment.cgi?id=1954&action=view)
message with folded message-id




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383

jm@jmason.org changed:

What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |3208
nThis| |
Target Milestone|3.1.0 |3.0.0



------- Additional Comments From jm@jmason.org 2004-05-13 10:16 -------
ick! moving to 3.0.0 queue



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383

spamassassin-contrib@msquadrat.de changed:

What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|spamassassin- |spamassassin-
|dev@incubator.apache.org |contrib@msquadrat.de



------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-05-13 16:05 -------
Takin bug (really ;)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383

spamassassin-contrib@msquadrat.de changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |spamassassin-
| |dev@incubator.apache.org
Severity|normal |minor
Status|NEW |ASSIGNED
Component|Libraries |spamc/spamd
OS/Version|other |All
Platform|Other |All





------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-05-13 18:00 -------
Created an attachment (id=1956)
--> (http://bugzilla.spamassassin.org/attachment.cgi?id=1956&action=view)
patch against spamd.raw

Here's the patch against spamd.raw. According to Theo's mail are we frozen, so
this needs to be +1'd.

This part of the code is getting pretty messy, duplicating stuff already done
better in Message.pm. I'll attach another patch for 3.1 which will do it more
nicely. But needs a new "feature" in Message.pm.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-05-14 04:45 -------
Created an attachment (id=1957)
--> (http://bugzilla.spamassassin.org/attachment.cgi?id=1957&action=view)
Alternative patch against spamd.raw and Message.pm

This is the announced alternative. The headers are preparsed by Message.pm, the
message object is first create with parsenow=0.

This adds a new "feature" to the Message.pm ctor: You can feed it a reference
to a function which has to behave like readline(). This has the advantage that
we don't have to store the message data twice in memory.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From felicity@kluge.net 2004-05-14 12:23 -------
Subject: Re: Folded message-id unrecognized

On Thu, May 13, 2004 at 06:00:36PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> Here's the patch against spamd.raw. According to Theo's mail are we frozen, so
> this needs to be +1'd.

Well, according to my mail we're in an enhancement freeze. We weren't
scheduled to go RTC until the 17th, which isn't going to happen since
we haven't finished work on all the tickets/issues yet.





------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From felicity@kluge.net 2004-05-14 12:36 -------
Subject: Re: Folded message-id unrecognized

On Fri, May 14, 2004 at 04:45:21AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> This is the announced alternative. The headers are preparsed by Message.pm, the
> message object is first create with parsenow=0.
>
> This adds a new "feature" to the Message.pm ctor: You can feed it a reference
> to a function which has to behave like readline(). This has the advantage that
> we don't have to store the message data twice in memory.

-1

There's really no point in doing this. The loop which grabs the
message-id sets up @msglines for later parsing. Then there's some debug
output, then the parsing.

So just put the length mismatch check, then the parse, then the logmsg() ...





------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-05-15 06:26 -------
Actually, I misread the entry "05/12: all tickets should be finished and
closed." in your mail as an overall freeze. I committed my first patch.

About your comment to my second patch, I don't really understand what you
mean. The points of these patch are:
1. Don't reinvent the wheel and do the header parsing in spamd.raw but use
Message.pm. That's trivial.
2. Don't store two copies of the mail in the memory. Currently the mail is
first completely read into @msglines which is then copied inside the
Message.pm ctor. At that point, two copies of the mail exist in memory while
we theoretically only need one if we could just feed the incoming stuff
directly line-per-line to the Message.pm. That's what the anonymous subroutine
is for. As that one also has to check for the size, I can't just feed the ctor
a reference to $client->getline().

If you don't like the second enhancement, I'll keep it out and just commit a
variation which does the alternate parsing via Message.pm.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383





------- Additional Comments From felicity@kluge.net 2004-05-16 01:53 -------
Subject: Re: Folded message-id unrecognized

On Sat, May 15, 2004 at 06:26:27AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> About your comment to my second patch, I don't really understand what you
> mean. The points of these patch are:
> 1. Don't reinvent the wheel and do the header parsing in spamd.raw but use
> Message.pm. That's trivial.

Right, we agree on that.

> 2. Don't store two copies of the mail in the memory. Currently the mail is
> first completely read into @msglines which is then copied inside the
> Message.pm ctor. At that point, two copies of the mail exist in memory while
> we theoretically only need one if we could just feed the incoming stuff
> directly line-per-line to the Message.pm. That's what the anonymous subroutine
> is for. As that one also has to check for the size, I can't just feed the ctor
> a reference to $client->getline().

Well, a few things here.

1) The current method is cleaner.

2) I don't think the patch works. It references non-global/non-local
variables in the anon-sub. Not only that, but the variables it wants to
use really have no way of being passed in without mucking up the Message
API, which I don't want to do.

3) We should do an 'undef @msglines' after the parse. The Message code
specifically wants to get a copy of the message for itself, since it'll
be messing with it during the parse.

4) Changing the M::SA::Message code in a non-trivial way is beyond this
ticket IMNSHO.


So what I was saying was we can easily put the parse before the use of
the message-id. I was also commenting that we could probably put the
expected!=actual test before the message-id output, so we don't have
to worry about calling $mail->finish(). We can also undef the msglines
array to free up some memory during processing.





------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 3383] Folded message-id unrecognized [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3383

spamassassin-contrib@msquadrat.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED



------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-05-16 03:16 -------
Ok, the bug itself is fixed, the discussion about the optimization was taken
to the mailinglist.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.