[Mailman-Users] Duplicate detection: a plea

Mark Sapiro mark at msapiro.net
Sat Dec 6 21:26:06 CET 2008

Dan Mahoney, System Admin wrote:
>We moved over from our main domain name, foo.com, to lists.foo.com, so 
>what happens is this:
>A user posts to list at foo.com -- the mailer forwards it to 
>list at lists.foo.com.  People reply to the list and hit reply-all, which 
>directs replies to the LIST (listname at lists.foo.com) but also to the 
>original recipient (list at foo.com).  Bam, duplicates.

How about just rewriting the list at foo.com address in the To:/Cc: header
to the new address when you forward the mail. 


>I also tried sending this to the -developers list.  No response.  But 
>maybe that's the wrong place since I'm not developing, or submitting a 
>patch.  Just saying I need a simple feature and could pay something for it 
>if need be.  Not something amazing, but enough for a nice dinner and 
>drinks (or if you're local to silicon valley, I'll buy).

I saw your post on mailman-developers. It's still in my inbox. I think
that's probably the more appropriate list, but clearly it didn't
generate any interest.

>Can mailman please have this functionality natively?

What you're asking is that Mailman be modified to solve a problem which
at its core is a problem that you created outside of Mailman. It is
not clear to me that there are many or even any Mailman installations
other than yours that would benefit from this solution.

However, since it's a slow Saturday, see the attached DuplicatePost.py
handler. This is a custom handler which can be installed following the
instructions in the FAQ at <http://wiki.list.org/x/l4A9>.

You will also need to add two settings to mm_cfg.py I suggest


but you can set them anyway you want. If HOLD_DUPLICATE_MESSAGES is
Yes, the duplicate will be held for moderator approval, if No, it will
be discarded. MESSAGE_ID_EXPIRES_AFTER is the length of time to
remember seen Message-IDs.

You must set both of these in mm_cfg.py before enabling the
DuplicatePost handler. The handler should come early in the pipeline.
It should be before Replybot and can even be first.

You can enable it as first in the pipeline by putting

GLOBAL_PIPELINE.insert(0, 'DuplicatePost')

in mm_cfg.py, but I strongly suggest you use the config_list method to
set it for one test list and test it before enabling it for all lists.

The order in which to do things is

1) update mm_cfg.py with the two required settings
2) copy DuplicatePost.py to Mailman/Handlers
3) restart Mailman
4) run bin/config_list to add the updated pipeline to the test list
5) test
6) if satisfied
    7) put above GLOBAL_PIPELINE insertion in mm_cfg.py
    8) restart mailman
    9) buy me dinner :)

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list