Comment 4 for bug 557955

Revision history for this message
mundaun (mundaun) wrote :

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()
    @ # <email address hidden>
    (?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