Re: Re: SMTP vs mail()
| From: | Manuel Lemos | Date: | Tue, 15 Jan 2008 19:47:03 +0000 |
| Subject: | Re: Re: SMTP vs mail() | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267330@lists.php.net to get a copy of this message | ||
Hello,
on 01/15/2008 08:54 AM Stut said the following:
>>>>>> If you have your sendmail equivalent program properly configured,
>>>>>> no
>>>>>> SMTP connection is used when queueing messages using the sendmail
>>>>>> program.
>>>>> What about when you take into consideration this program could be
>>>>> sending 1000's of emails, say, 100 per SMTP connection?
>>>> That is even worse. Keep in mind that the SMTP server of sendmail or
>>>> equivalent MTA, ends up calling the sendmail program for each
>>>> individual
>>>> message that it receives.
>>> That would be the most brain-dead SMTP server on the planet...
>>>
>>> Are you talking Windows or something? :-)
>>
>> On the contrary, you may be surprised, but this is precisely inline with
>> Unix/Linux spirit. Small programs communicating through pipes that
>> execute individual tasks each and then exit. Unlike Windows, forking new
>> programs is not so expensive.
>>
>> Anyway, you may want to check these diagrams to learn the architecture
>> or sendmail and qmail and verify what I am saying:
>>
>> 1†�W-
>> :Ö8Ù<‰àþThttp://www.sendmail.org/~ca/email/sm-X/design-2005-05-05/main/node3.html#SECTION00310000000000000000ëÅá§°çÑBm˜Ø
>> ¥
>>
>>
>> http://www.nrg4u.com/qmail/the-big-qmail-picture-103-p1.gif
>
> I can't see anywhere in that where it says a new process is spawned for
> each message. Sendmail is a beast but it's not that bad. I'm sure you
> *could* configure it to do that, but you'd need to explicitly make that
> decision yourself.
>
> Where do you think it says that?
Check the source Luke! ;-)
Well the diagram shows that the the SMTP server calls the queue manager.
Admitedly it is not clear that it forks a new process to inject the
message in the queue, but you can analyze the source to check it out.
I have checked the sendmail SMTP server source once in the past. I
suppose it hasn't changed that much. Last time I analyzed it I could see
it reads each message from the TCP socket into a file passing it through
eventual mail filters (miltering) and in the end of each message it
forks the queue manager process to inject the message in the queue.
--
Regards,
Manuel Lemos
PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/