Take a look at Mail::BulkMail, that'll combine messages going to different local parts at the same domain into one send and thus significantly cut down on the number of deliveries that need to be made. Also, consider installing a caching DNS server to reduce the number of external DNS requests that need to be made.
| [reply] [d/l] |
Am I correct that the problem is the number of copies of the same email stacking up on the mail server, waiting to be sent? Obviously, slowing the rate you send emails at won't fix this, unless none of them have problems and the mail server sends faster than it receives. What you need is an intermediary utility that collects all emails and queues them only as fast as the mail server can handle sends. Perhaps you can add each email body to a database table along with the set of addresses it needs to go to (many to one relationship in second table?), then have an intermediary utility perform all the sends at some rate determined by how much the mail server can handle. This way you don't have the mail server clogged with thousands of copies of the same email while you wait for it to be sent, and you don't have multiple emails stacking on top of one another when different people want to send at the same time. | [reply] |
1000 emails is not a lot of mail. Certainly not enough to saturate a network unless each of the emails is huge. Is the smtp server you are relaying through local or somewhere remote over a slow connection?
Scott
| [reply] |
I think that some of the servers respond to large (for some value of "large") numbers of e-mails being sent through them, by deliberately slowing down the rate at which the messages are sent. The theory is that for a legitimate run of a few dozen or a few hundred, it isn't going to make that much difference - the delay isn't going to do any harm. To a spammer, it will make the connection almost useless. You may be running into a situation like this.
| [reply] |
Thanks for your replies
We are using an internal DNS and mail server (merak mail server). I am currently looping through a database and sending the emails. During the sending phase the network becomes very sluggish! Perhaps I need to adjust my wait() function and loop iterations to reach the potential of our mail server and ethernet capacity. | [reply] |