[Mailman-Users] Mailman sending to Exchange 2010 Mail service.

Mark Sapiro mark at msapiro.net
Fri Nov 18 23:31:01 CET 2011


Collins, Alex wrote:
>
>RFC's and the non PC tampering of message headers aside:
>How can I use Mailman (or even sendmail) to remove the Message-ID so that Mailman will set its own Message-ID and we can actually send messages to more than one list.


You could just delete the Message-ID: from outgoing posts. Then the
outgoing MTA (sendmail ?) should add a unique Message-ID: when it
handles the message.

To do this, you could modify Mailman/Handlers/SMTPDirect.py by finding
the section of bulkdeliver that says

    msgtext = msg.as_string(mangle_from_=False)
    refused = {}
    recips = msgdata['recips']
    msgid = msg['message-id']
    try:
        # Send the message
        refused = conn.sendmail(envsender, recips, msgtext)

and change it to

    msgtext = msg.as_string(mangle_from_=False)
    refused = {}
    recips = msgdata['recips']
    del msg['message-id']
    msgid = 'n/a'
    try:
        # Send the message
        refused = conn.sendmail(envsender, recips, msgtext)

or if you want Mailman to actually generate a Message-ID:, change it to

    msgtext = msg.as_string(mangle_from_=False)
    refused = {}
    recips = msgdata['recips']
    del msg['message-id']
    msg['Message-ID'] = Utils.unique_message_id(mlist)
    msgid = msg['message-id']
    try:
        # Send the message
        refused = conn.sendmail(envsender, recips, msgtext)




-- 
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