Embed presentation
Download to read offline
![--- 2.1.16CookHeaders.py 2014-06-21 17:09:21.713302870 -0700
+++ newCookHeaders.py 2014-06-21 17:13:04.553299051 -0700
@@ -129,7 +129,9 @@
rt = msg['from']
change_header('Reply-To', rt, mlist, msg, msgdata)
change_header('From',
- formataddr(('%s via %s' % (realname, mlist.real_name),
+ formataddr(('%s <%s> via %s' % (realname,
+ email,
+ mlist.real_name),
mlist.GetListEmail())),
mlist, msg, msgdata)
if mlist.from_is_list != 2:](https://image.slidesharecdn.com/2-140917145648-phpapp01/75/2-1-16-cookheaders-patch-1-2048.jpg)

This document shows a code diff between two versions of a Python file called CookHeaders.py. The diff shows that in the new version, when setting the From header, it now includes the user's email address inside angle brackets after their name, and it also includes the mailing list email as well. This change was made to properly identify who a message is from when it comes via a mailing list.
![--- 2.1.16CookHeaders.py 2014-06-21 17:09:21.713302870 -0700
+++ newCookHeaders.py 2014-06-21 17:13:04.553299051 -0700
@@ -129,7 +129,9 @@
rt = msg['from']
change_header('Reply-To', rt, mlist, msg, msgdata)
change_header('From',
- formataddr(('%s via %s' % (realname, mlist.real_name),
+ formataddr(('%s <%s> via %s' % (realname,
+ email,
+ mlist.real_name),
mlist.GetListEmail())),
mlist, msg, msgdata)
if mlist.from_is_list != 2:](https://image.slidesharecdn.com/2-140917145648-phpapp01/75/2-1-16-cookheaders-patch-1-2048.jpg)