On 6/3/2011 10:45 AM, Glenn Sieb wrote:
> 
> I have a list where, as a rule, we don't allow CCs to other
> people/lists. So we set max_num_recipients to 2.
[...]
> Now, my question would be.. *why* would a *blank* CC: line trip this
> flag? It just strikes me as kind of odd.


We get the values of the To: and Cc: headers. In this case that returns
the list ['listn...@lists.mysite.tld', ''], i.e.,
'listn...@lists.mysite.tld' from the To: header and '' from the CC:
header. We parse that with Python's email.Utils.getaddresses() function
which returns a list of (real name, address) tuples, in this case [('',
'listn...@lists.mysite.tld'), ('', '')]. The length of this list is two,
so we think the message has two recipients. We don't notice that one of
the addresses is null.

If you consider this to be a bug, you can report it at
<https://bugs.launchpad.net/mailman/+filebug>, and I'll fix it.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to