Google Answers Logo
View Question
 
Q: Speeding up piping mail to sendmail ( No Answer,   0 Comments )
Question  
Subject: Speeding up piping mail to sendmail
Category: Computers > Programming
Asked by: glmcrs-ga
List Price: $5.00
Posted: 08 Feb 2006 15:03 PST
Expires: 10 Mar 2006 15:03 PST
Question ID: 443303
In order to prevent any php processes on our web server from waiting
for sendmail hangups (name resolution issues, etc), we wrap sendmail
in a simple shell script and push it to the background and disown the
process so that any php script on our site can continue on processing
code and not have to wait for sendmail to return.

So, in php.ini we have the following setting:

sendmail_path = "/usr/local/bin/phpsendmail.sh -t -i"

and in phpsendmail.sh we have the following:

#!/bin/bash
cat /dev/stdin | /usr/bin/sendmail "$@" &




The problem we are encountering is that it seems to take quite a while
(in computer time) for a lengthy (50K) text email to actually get
piped into sendmail this way.  When a script pushes out 20 emails of
this size, we are seeing it take approximately 20-25 seconds. We have
some background processes that send need to send batched email from a
database table (for immediate delivery, not queued) and we would like
to speed the process up, while still using this concept of pushing
each sendmail process out to the background.  What can we do to speed
up the process of piping this information through the wrapper script
and into the sendmail process?
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy