Qmail
[Top] [All Lists]

Re: Help?

To: qmail@list.cr.yp.to
Subject: Re: Help?
From: John Levine <johnl@iecc.com>
Date: 25 May 2007 03:37:32 -0000
Cc: nathan@yapta.com
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <8e3f377c0705241316u63e8ff8dxb12d6111f587ea9c@mail.gmail.com>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
Organization:
>"How high is too high?"
>400 or so concurrent emails being sent seems to trigger this behavior

Each copy of qmail-inject runs qmail-queue, and if you're using popen,
there's probably also a shell process waiting for them to finish.
That's 1200 processes, which is quite a lot.  Any chance you're
hitting a process limit?

If you want to inject that much mail into qmail, I'd suggest using the
approach my Qspam perl module does.  It puts the formatted message
into a file rather than a pipe, then calls qmail-remote directly to
try to deliver messages to remote addreses and only queues it with
qmail-queue if the remote delivery fails or the address is local.  It
doesn't need to use threads, just keeps track of the PIDs of the
qmail-remote and qmail-queue processes, and it's really fast since it
avoids the slow queue/dequeue process for most messages..  It's not
very complicated, shouldn't be hard to translate into python.

Regards,
John Levine, johnl@iecc.com, Primary Perpetrator of "The Internet for Dummies",
Information Superhighwayman wanna-be, http://www.johnlevine.com, ex-Mayor
"More Wiener schnitzel, please", said Tom, revealingly.

<Prev in Thread] Current Thread [Next in Thread>