On Sat, Jul 05, 2003 at 05:28:41PM +0000, Pablo Fischer wrote:
> Hi;
> 
> >     cd ~
> >     mkdir -p perl5mod/Mail
> >     save Sendmail.pm to ~/perl5mod/Mail
> >     export PERL5LIB=/home/unmada/perl5mod
> >
> > You probably want to put that last line in your .profile so it gets
> > reset every time you log in.

> But, If I just wanna to have ONE module in my working dir? and the other 
> modules in their correct places (like /usr/lib/perl/modules/blabla).

Not a problem.  It will all Just Work.


> > > >   $i = 100;
> > >
> > > number of mails..
> >
> > Correct; the assumption is that each mail will contain 10 mail adds.
> Well I know how to do this, however, I have 100 mail adds, so I need to send 
> 100 copies (1 copy to each mail), but I think how to do this: Implement in 
> the itereation a way to count each line of the line, so, when its 0, it will 
> read line 1, when its 1, it will read line 2.. but thanks :-).

Well, I don't really get what you're saying, but I'll assume that you
do and that it works.  $i was simply a loop counter--it just means
that you're going to go through the loop 100 times.  Each iteration,
you can send as many mail adds as you want.

But whatever.



> > > Thanks! I was thinking in this option, but also Im looking for a second
> > > option, to know if In sendmail I could manage the threads (to send each
> > > mail, each 5 seconds).. I know this is a perl list, but.. does someone
> > > knows if I can?
> > > thanks!
> > >
> > > Pablo
> >
> > Well, do you really want to do that?  The whole point is to avoid
> > sending the messages too quickly.  If you parallelize it, then the
> > messages go out faster, and you may end up looking like a spammer.
> >
> > If you DO want to do it, here's how:
> >
> > First, you need Perl 5.8 with the threading option selected at compile
> > time.  To see if you do, type 'perl -v'.  If the first line looks
> > something like this:
> >
> >     This is perl, v5.8.0 built for i586-linux-thread-multi
> >
> Wait, wait.. I tried to say: mail queus, not thread in perl :-), sorry. So the 
> question is: How to manage the queus in sendmail: For example, I send 100 
> mails in a second to sendmail, but is there a form so that sendmail will take 
> mail 1, and send it now, mail 2 and send it in 3secs, mail 3 and send it in 6 
> secs, in other words how to send one mail in a specified interval (seconds)
> 
> Thanks!
> Pablo

Pablo, I think we're having a communication gap here.  Let me try one
more time.

The original code that I sent you essentially boiled down to this:

    while(more mails to send) {
               send next mail;
               sleep 1;
    }

That C<sleep 1> means to wait one second before sending the next
mail.  If you want it to be 3 seconds, then just say C<sleep 3>.  How
is this different from what you want sendmail to do for you? (*)  Don't
complicate things more than they need to be.

--Dks


(*) If your answer is 'because then sendmail is managing the queues
instead of perl', then you're on the wrong list.  Just run the script
in the background if you don't want it tying up a terminal window for
too long.  Or run it in cron.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to