I would do one of two things instead:
1) Set up a .qmail-something file with all the addresses you want to send
to (don't know about performance here, but I wouldn't think it would be too
bad), and send the email to that address. It will forward a copy to
everyone in that .qmail file. Using a custom SQL query, it would be trivial
to export it into a single entry per line, and drop it into a .qmail file.
2) Set up and use ezmlm and use a closed mailing list to do it. This may
be overkill for what you're trying to do, if you don't use it very often.
Either way, you send one email and let qmail take care of the rest of the
work, rather than having to wait for 1000+ messages to be delivered from
your outbox, or direct SMTP connection.
-D
----- Original Message -----
From: "Manuel Lemos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 13, 2000 5:00 PM
Subject: Performance degradation when queuing a message to thousands of
recipients
Hello,
Once in a while I havce to send out a message to thousands of users from a
variable set. So, I make a custom database query to extract the recipients
list. Then I establish a SMTP connection to a qmail server.
My problem is that along the time the number of recipients has been growing
to many thousands but the time that queueing takes does not grow linearly
with the number of recipients but rather grows exponentially.
I am taking advantage of the PIPELINING SMTP extension to reduce the
overhead
of waiting for the response from the STMP server. I take care of not pipe
more than 100 recipients at a time before waiting for the server response
to all to not exceed the TCP window size to avoid SMTP dialogue deadlock.
Once I decide to make my connection code to output the dialogue between the
SMTP client and the server and I noticed that periodically the dialogue
hangs
for a little while and then it proceeds. Response hang periods do not happen
right after queing the current batch of 100 piped recipients.
Does anybody know how to explain this? Is there a cure? Would spliting
the queueing in many different messages help? If so, how many recipients
are recommended per batch?
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--