diff options
author | Mark Sapiro <msapiro@value.net> | 2014-04-15 12:59:48 -0700 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2014-04-15 12:59:48 -0700 |
commit | 0d9b1cce5e97fe4095fe2cb72465129437d83b5a (patch) | |
tree | 91ac47389801b2c5c5bb67bbae8a5f45f4f05b0b /Mailman/Handlers/CookHeaders.py | |
parent | 192caa4943eb87e466229736eccefd4381042fd7 (diff) | |
parent | f00ecb3432578156b7f9df2ae33ad5f840e20de6 (diff) | |
download | mailman2-0d9b1cce5e97fe4095fe2cb72465129437d83b5a.tar.gz mailman2-0d9b1cce5e97fe4095fe2cb72465129437d83b5a.tar.xz mailman2-0d9b1cce5e97fe4095fe2cb72465129437d83b5a.zip |
Added and modified various options regarding DMARC. See the NEWS file.
Diffstat (limited to '')
-rwxr-xr-x | Mailman/Handlers/CookHeaders.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index 110302ea..83f278b4 100755 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -65,8 +65,8 @@ def uheader(mlist, s, header_name=None, continuation_ws='\t', maxlinelen=None): return Header(s, charset, maxlinelen, header_name, continuation_ws) def change_header(name, value, mlist, msg, msgdata, delete=True, repl=True): - if (mm_cfg.ALLOW_FROM_IS_LIST and - mlist.from_is_list == 2 and + if ((msgdata.get('from_is_list') == 2 or + (msgdata.get('from_is_list') == 0 and mlist.from_is_list == 2)) and not msgdata.get('_fasttrack') ): msgdata.setdefault('add_header', {})[name] = value @@ -119,7 +119,7 @@ def process(mlist, msg, msgdata): change_header('Precedence', 'list', mlist, msg, msgdata, repl=False) # Do we change the from so the list takes ownership of the email - if mm_cfg.ALLOW_FROM_IS_LIST and mlist.from_is_list and not fasttrack: + if (msgdata.get('from_is_list') or mlist.from_is_list) and not fasttrack: realname, email = parseaddr(msg['from']) if not realname: if mlist.isMember(email): @@ -200,8 +200,8 @@ def process(mlist, msg, msgdata): # is already in From and Reply-To in this case and similarly for # a 'from is list' list. if mlist.personalize == 2 and mlist.reply_goes_to_list <> 1 \ - and not mlist.anonymous_list and not (mlist.from_is_list and - mm_cfg.ALLOW_FROM_IS_LIST): + and not mlist.anonymous_list and not (mlist.from_is_list or + msgdata.get('from_is_list')): # Watch out for existing Cc headers, merge, and remove dups. Note # that RFC 2822 says only zero or one Cc header is allowed. new = [] |