need to sort by domain before submitting to MTA

Bug #266119 reported by Jared Mauch
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Medium
Unassigned

Bug Description

I have a number of (large) lists that have a number of
users at the same domain, but are submitted to the MTA
in chunks of 10 to insure the list performs reasonably.

The users at the same domain end up in different queue
files of my MTA, and spark a large number of SMTP
connections to their SMTP servers that could be
minimized if the <user>@<domain> that is passed to the
MTA is sorted by domain. Then I could have one SMTP
transaction with them that delivers 10 messages.

I'm no python expert, but figure sorting of this type
should be fairly simple, and will reduce the amount my
SMTP server abuses these other SMTP servers, which will
be a good thing(tm), as well as save bandwidth..

[http://sourceforge.net/tracker/index.php?func=detail&aid=1014750&group_id=103&atid=100103]

Revision history for this message
Jared Mauch (jared-0) wrote :

SMTPDirect.py

def domsort(uida, uidb):
        ## sort by domain
        ## usage foo.sort(domsort)
        i = uida.rfind('@')
        if i >= 0:
            doma = uida[i+1:]

        i = uidb.rfind('@')
        if i >= 0:
            domb = uidb[i+1:]

        return cmp(doma, domb)

                }
    # Need to sort by domain name. if we split to chunks it
is possible
    # some well-known domains will be interspersed as we sort by
    # userid by default instead of by domain. (jared mauch)
    r.sort(domsort)

Revision history for this message
Jared Mauch (jared-0) wrote :

that should be recips not r.sort fyi

Revision history for this message
Jared Mauch (jared-0) wrote :

I have been using this patch for recent years to solve the problem against distribution. This speeds up delivery when using sendmail as the MTA significantly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.