1
# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
1
# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
3
3
# This program is free software; you can redistribute it and/or
4
4
# modify it under the terms of the GNU General Public License
355
355
# the Sender header at all. Brad Knowles points out that MTAs tend to
356
356
# wipe existing Return-Path headers, and old MTAs may still honor
357
357
# Errors-To while new ones will at worst ignore the header.
359
# With some MUAs (eg. Outlook 2003) rewriting the Sender header with our
360
# envelope sender causes more problems than it solves, because some will
361
# include the Sender address in a reply-to-all, which is not only
362
# confusing to subscribers, but can actually disable/unsubscribe them from
363
# lists, depending on how often they accidentally reply to it. Also, when
364
# forwarding mail inline, the sender is replaced with the string "Full
365
# Name (on behalf bounce@addr.ess)", essentially losing the original
368
# The drawback of not touching the Sender: header is that some MTAs might
369
# still send bounces to it, so by not trapping it, we can miss bounces.
370
# (Or worse, MTAs might send bounces to the From: address if they can't
371
# find a Sender: header.) So instead of completely disabling the sender
372
# rewriting, we offer an option to disable it.
359
373
del msg['errors-to']
360
msg['Sender'] = envsender
361
374
msg['Errors-To'] = envsender
375
if mlist.include_sender_header:
377
msg['Sender'] = envsender
362
378
# Get the plain, flattened text of the message, sans unixfrom
363
379
# using our as_string() method to not mangle From_ and not fold
364
380
# sub-part headers possibly breaking signatures.