[ mailman-Patches-573505 ] usenet threading improvements

SourceForge.net noreply at sourceforge.net
Wed Oct 22 19:54:58 EDT 2003


Patches item #573505, was opened at 2002-06-25 07:59
Message generated for change (Comment added) made by mundaun
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=573505&group_id=103

Category: mail delivery
Group: Mailman 2.0.x
Status: Open
Resolution: None
Priority: 1
Submitted By: Mark Weaver (mdw21)
Assigned to: Nobody/Anonymous (nobody)
Summary: usenet threading improvements

Initial Comment:
Basically message-id munging for all messages.

Might be 
better as an option?  This helps with threading in usenet gating, as 
what happens is this:

someone sends a mail with message-
id foo at bar.com
gating replaces the message-id with 
mailman.123.456.list at list.com
list member replies via mail, 
"in-reply-to" header is set to the foo at bar.com
now when the 
message is gated it can't thread because in-reply-to: (which is 
translated into references:) is wrong.

Solution is to munge 
all message-ids.  Doesn't really do any harm AFAICT.

----------------------------------------------------------------------

Comment By: Michael Stucki (mundaun)
Date: 2003-10-23 01:54

Message:
Logged In: YES 
user_id=751974

Hello, 
 
we had exactly the same problem. However we run mailman 
2.1.2 where things seem to have changed, so I am now writing 
down the required steps for more recent releases... 
 
I had to copy the munging code from 
Mailman/Queue/NewsRunner.py to 
Mailman/Handlers/CookHeaders.py: 
 
block 1: 
=== 
# Matches our Mailman crafted Message-IDs.  See 
Utils.unique_message_id() 
mcre = re.compile(r""" 
    <mailman.                                     # match the prefix 
    \d+.                                          # serial number 
    \d+.                                          # time in seconds since epoch 
    \d+.                                          # pid 
    (?P<listname>[^@]+)                           # list's internal_name() 
    @                                             # localpart at dom.ain 
    (?P<hostname>[^>]+)                           # list's host_name 
    >                                             # trailer 
    """, re.VERBOSE) 
=== 
 
block 2: 
=== 
    hackmsgid = 1 
    if msgid: 
        mo = mcre.search(msgid) 
        if mo: 
            lname, hname = mo.group('listname', 'hostname') 
            if lname == mlist.internal_name() and hname == 
mlist.host_name: 
                hackmsgid = 0 
    if hackmsgid: 
        del msg['message-id'] 
        msg['Message-ID'] = Utils.unique_message_id(mlist) 
 
=== 
 
After that, my biggest problem was that I applied the changes 
but mailman didn't follow them. I finally recognised that I had to 
restart the qrunner daemon (which wasn't there in older 
releases). 
 
Hope this helps 
- michael 

----------------------------------------------------------------------

Comment By: Nicolas Marchildon (elecnix)
Date: 2003-01-16 06:11

Message:
Logged In: YES 
user_id=106549

I solved the problem by adding the munging code to
DeliverToList, in HandlerAPI.py, right before the message is
sent in the delivery pipeline, and removed it from
ToUsenet.py and CookHeaders.py. This way, the Message-ID
header is calculated only once, and used for all the steps
of the pipeline.

Nicolas Marchildon

----------------------------------------------------------------------

Comment By: Nicolas Marchildon (elecnix)
Date: 2003-01-16 05:21

Message:
Logged In: YES 
user_id=106549

The submitted patch does not do what it should to. The calls
to time.time() will not return the same thing as in
ToUsenet.py. I don't know much about the internals of
Mailman, and not much either about Python, so I don't really
know where to store the "correct" message ID so that it is
generated once, and used in both places.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=573505&group_id=103



More information about the Mailman-coders mailing list