Public bug reported:

We use max_num_recipients as a vague spam detector and came to the
conclusion that when counting, extra addresses are counted if an address
contains [square brackets]. Example:

test at lists.example.net, jefke [jefke2 at foo.example.net],
jefke3 at example.net, jefke4 at example.net

in the To: or Cc: field will be counted as 6 adresses. I reckon this is
interpreted as an array and flattened or something.

(Yes, []'s are illegal in mail adresses but we receive messages like
that anyway).

Proposed solution: 's/\]/\\]/g' 's/\[/\\[/g'

** Affects: mailman
Importance: Undecided
Status: New

--
parts of recipients adresses between square brackets in are interpreted as seperate addresses
https://bugs.launchpad.net/bugs/680447
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.

Search Discussions

  • Mark Sapiro at Dec 4, 2010 at 7:49 pm
    There's not much Mailman can easily do about this. The issue is in the
    Python email library. email.utils.getaddresses() is used by Mailman to
    get a list of addresses and the length of that list is used as the
    number of recipients. getaddresses() treats the brackets as a kind of
    delimiter. Thus, email.utils.getaddresses(['jefke
    [jefke2 at foo.example.net]']) returns this list of (name, address) tuples
    [('', 'jefke'), ('', ''), ('', 'jefke2 at foo.example.net'), ('', '')] of
    length 4 instead of the list [('jefke', 'jefke2 at foo.example.net')] of
    length 1 that you expect.

    Escaping the brackets as you suggest changes the result only in that a
    '\' is appended to the jefke2 at foo.example.net address returned in the
    third tuple.

    ** Changed in: mailman
    Importance: Undecided => Low

    ** Changed in: mailman
    Status: New => Won't Fix

    ** Changed in: mailman
    Assignee: (unassigned) => Mark Sapiro (msapiro)

    --
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
    https://bugs.launchpad.net/bugs/680447

    Title:
    parts of recipients adresses between square brackets in are interpreted as seperate addresses

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-coders @
categoriespython
postedNov 23, '10 at 11:17a
activeDec 4, '10 at 7:49p
posts2
users2
websitelist.org

2 users in discussion

Yalu: 1 post Mark Sapiro: 1 post

People

Translate

site design / logo © 2022 Grokbase