>> What I was interested in was using perl to drive qmail-remote, not a
>> discussion of poll vs select, although that would be handy.

I whipped up a little message blasting module in perl:

  http://wx.iecc.com/Qspam.pm

It's only 136 lines.

You tell it how many subprocesses you want it to manage, then call its
sending routine repeatedly with envelope to and from and a file
containing the message.  For each message, it calls qmail-remote, then
if that didn't work qmail-queue, using as many subprocesses as you
told it to use.

Rather than mess around with vast tangles of pipes and selects, it
uses temp files and tracks subprocesses by pid.  In the typical case
that /tmp is a RAM filesystem, I suspect that the performance will be
about the same, and the code is a lot simpler.


-- 
John R. Levine, IECC, POB 727, Trumansburg NY 14886 +1 607 387 6869
[EMAIL PROTECTED], Village Trustee and Sewer Commissioner, http://iecc.com/johnl, 
Member, Provisional board, Coalition Against Unsolicited Commercial E-mail

Reply via email to