[ mailman-Bugs-1014750 ] need to sort by domain before submitting to MTA

SourceForge.net noreply at sourceforge.net
Wed Sep 22 16:59:41 CEST 2004


Bugs item #1014750, was opened at 2004-08-23 17:39
Message generated for change (Comment added) made by jaredmauch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1014750&group_id=103

Category: mail delivery
Group: 2.1 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: jared mauch (jaredmauch)
Assigned to: Nobody/Anonymous (nobody)
Summary: need to sort by domain before submitting to MTA

Initial Comment:
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..

----------------------------------------------------------------------

>Comment By: jared mauch (jaredmauch)
Date: 2004-09-22 10:59

Message:
Logged In: YES 
user_id=131445

that should be recips not r.sort fyi

----------------------------------------------------------------------

Comment By: jared mauch (jaredmauch)
Date: 2004-09-22 10:44

Message:
Logged In: YES 
user_id=131445

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)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1014750&group_id=103


More information about the Mailman-coders mailing list