Development Question: Interfacing Perl with Sendmail 
Author Message
 Development Question: Interfacing Perl with Sendmail

Hi:

I am currently developing a mass mailling tool in Perl which runs on a Linux
system with sendmail.  I am concerned about monitoring and potentially
controlling the network and CPU utilization of sendmail as I don't want to
overload the server's resources and would like to have some sort of feedback
mechanism to enable the Perl code to throttle back if necessary.  My
questions are therefore:

1. Does sendmail have some internal mechanisms for monitoring network and
CPU utilization?  If so, where can I get more info about this?

2. When sending emails from PERL, as I see it I have two options: invoke the
"sendmail" binary directly, or use an SMTP perl client to send the mail to
the localhost.  I am wondering if these two methods differ in the way they
impact sendmail's resource monitoring facilities, how it manages its queues
etc.  Is there a preferred method?

3. Are there any ideas on how best to send a large number of emails, without
overloading network or CPU resources?

Thanks in advance,
Keith



Sat, 15 Jan 2005 23:26:39 GMT  
 Development Question: Interfacing Perl with Sendmail

Quote:

> I am currently developing a mass mailling tool in Perl which runs on a Linux
> system with sendmail.  I am concerned about monitoring and potentially
> controlling the network and CPU utilization of sendmail as I don't want to
> overload the server's resources and would like to have some sort of feedback
> mechanism to enable the Perl code to throttle back if necessary.  My
> questions are therefore:

> 1. Does sendmail have some internal mechanisms for monitoring network and
> CPU utilization?  If so, where can I get more info about this?

> 2. When sending emails from PERL, as I see it I have two options: invoke the
> "sendmail" binary directly, or use an SMTP perl client to send the mail to
> the localhost.  I am wondering if these two methods differ in the way they
> impact sendmail's resource monitoring facilities, how it manages its queues
> etc.  Is there a preferred method?

> 3. Are there any ideas on how best to send a large number of emails, without
> overloading network or CPU resources?

Take a look at bulk_mailer program and sympa list manager.

In short make you perl script submit messages via multiple parrallel SMTP
sessions, send specific number of messages per single session e.g. max 50
sessions at any momemt, 30 messages per session. In pre 8.12 sendmail use ONEX
SMTP command (it is sendmail specific).

--

366A 5DD7 7707 379C 9251   32AE C948 0BD2 7D99 688A   expires: 2003-01-25
I may disagree with the following *random epigram* :
"And remember: Evil will always prevail, because Good is dumb."
                -- Spaceballs



Sun, 16 Jan 2005 01:01:00 GMT  
 Development Question: Interfacing Perl with Sendmail

Quote:


> > I am currently developing a mass mailling tool in Perl which runs on
> > a Linux system with sendmail.  I am concerned about monitoring and
> > potentially controlling the network and CPU utilization of sendmail
> > as I don't want to overload the server's resources and would like to
> > have some sort of feedback mechanism to enable the Perl code to
> > throttle back if necessary.
[snip]
> In short make you perl script submit messages via multiple parrallel
> SMTP sessions, send specific number of messages per single session
> e.g. max 50 sessions at any momemt, 30 messages per session. In pre
> 8.12 sendmail use ONEX SMTP command (it is sendmail specific).

Actually, max *one* session, and as many messages as you have *all* sent
via that one session, will likely be better.

--

pack 'u', pack 'H*', 'ab5cf4021bafd28972030972b00a218eb9720000';



Sun, 16 Jan 2005 15:06:50 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Development Question: Interfacing Perl with Sendmail

2. question about speeding perl development

3. Sendmail question, and LWP question

4. Newbie question about SendMail (I think that is what my question is about :)

5. perl user interface interface to tar?

6. Question about development environment on NT from unix perler

7. Perl/C/TCL interface question

8. Off Topic Perl Email Question: Sending mail to AOL and Outlook Express with SENDMAIL

9. sendmail/perl questions

10. Question about Sendmail, Perl, and CGI

11. Sendmail/Perl question

12. Perl to DB2 interface question

 

 
Powered by phpBB® Forum Software