Another approach to is to write the email directly into the queue. I've used this approach and it's very fast. After you write your email to the qmail queue, you write a value of 1 to a named pipe that qmail reads off of. This causes a qmail process (there are like 20 different ones and I forget which is which - check the docs) to wake up and drain the queue.
If you want anymore speed then that, you have to either install ram disks or seriously write your own mta. We installed ram disks =)
Shane
-----Original Message-----
From: Andrew Dunstan [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 08, 2000 9:52 PM
To: Modperl
Subject: Re: open(FH,'|qmail-inject') fails
Regarding cost of forking etc.:
Your mileage will undoubtedly vary, according to OS and MTA.
Last time I did work on this was about a year ago on Solaris
2.6, with sendmail and postfix. In both cases using Net::SMTP
was far faster. IIRC, with postfix there is no forking cost at all,
as its daemon does not fork on connect (it uses a select() loop
instead). Talking on the SMTP port is actually Wietse Venema's
recommended method for fastest injection into the postfix queue.
It also has the advantage over other methods that it is totally
MTA independent.
andrew