need to sort by domain before submitting to MTA

Bug #266119 reported by Jared Mauch on 2004-08-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman

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..


Jared Mauch (jared-0) wrote :

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)

Jared Mauch (jared-0) wrote :

that should be recips not r.sort fyi

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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers