[MlMt] Reply to all

Joachim Tingvold joachim at tingvold.com
Wed Aug 29 16:34:43 UTC 2012


On 29 Aug 2012, at 11:01, Benny Kjær Nielsen wrote:
> I'm guessing the message also has a “Reply-To” header. I don't 
> think MailMate has any way to know that the sender of the message is 
> not subscribed to the list. You are welcome to provide the headers of 
> an example message.
>
> Ideally, the mailing list software should add a “Reply-To” header 
> with both the mailing list address and the senders address (whenever 
> the sender is not subscribed) although I'm not sure that works in all 
> email clients.

Hi,

I figured out a way to do this with Mailman. I have no clue if I'm 
breaking any RFC by doing this, but I think it conforms with most of 
them (f.ex. only one Reply-To is added, but with multiple addresses).

The goal was, as Benny describes, to get Mailman to use the list as only 
Reply-To when the sender is a member of the list, and the sender, in 
addition to the list, as Reply-To when the sender is not a member of the 
list.

This has been tested, and confirmed working running Mailman 2.1.13-5 on 
Debian Squeeze.

Edit /usr/lib/mailman/Mailman/Handlers/CookHeaders.py;

Before:
	if mlist.reply_goes_to_list == 1:

Add the following:
# Add From: to Reply-To: if From: is not a member of the list
         if not mlist.isMember(msgdata['original_sender']):
                 # Not a member; adding sender to Reply-To
                 add(parseaddr(msgdata['original_sender']))

Write changes, and restart Mailman.

Produces the following, if the sender is a member of the list:
	Reply-To: Some list <list at domain.com>

Produces the following, if the sender is not a member of the list:
	Reply-To: user at somedomain.com, Some list <list at domain.com>


-- 
Joachim


More information about the mailmate mailing list