Re: [Exim] filehandles and such

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Dave C.
Data:  
Para: Dan Kappus
CC: exim-users
Asunto: Re: [Exim] filehandles and such
If the message is identical for all customers (eg, doesnt need to be
customized per-recipient), I'd arrange to spit a BSMTP session as
follows to `exim -bS` (anything in [] is a comment and not part of the
session)

The main thing being dont send a seperate message to each recipient,
send a few messages to many recipients.

(if few=total/100, many=100)

HELO MYHOST
MAIL FROM:<lord@???>
RCPT TO:<user1@???>
RCPT TO:<user2@???>
[repeat up to say about 100 per batch]
DATA
From: The dark lord ... <lord@???>
Bcc:
[The empty Bcc is to make sure one doesnt get added with all 100
recipients]

Princess ... Rebel Base ... etc..

.
QUIT


I also just like batch SMTP (and loathe the -t interface). It gives me
more direct control (and seperate control) over both the envelope and
the headers of a message.

This might be a personal nitpick, but I will note that we send out a
newsletter every month to our customers (around 8000 addresses), where
each individual message DOES have to be customized (the email is
actually just the newsletter headlines, with links to the actual
content that include a coded version of the recipients email address -
this is so our marketing department can tell what our customers are
interested in) I use grouped together BSMTP sessions to send this, and
I've never gotten any errors from exim about file handles or memory or
anything other than the usual nondelivery bounces from cancelled
addresses, etc..


On Fri, 3 Nov 2000, Dan Kappus wrote:

>
> My boss, the CEO wanted me to write to all our customers about something
> or another.
>
> So I wrote this simple perl script, something like this:
>
> ********************************************************
> #!/usr/bin/perl
>
> open (FILE, "path");
>
> while(<FILE>){
>
>      open (MAIL, "| /usr/sbin/exim -t");
>      print MAIL "To: $_";
>      print MAIL qq#From: "The Dark Lord of the Sidth" <lord@???>" \n#;
>      print MAIL "Subject: Your childish rebellion will be crushed\n\n";

>
>      print MAIL << yoda;

>
>
>     We have your precious Princess and will kill her unless one of you
>     reveals the location of the secret Rebel base. Do not underestimate
>     the Power of The Dark Side.

>
>     Sincerely,

>
>     He-With-Bad-Makeup

>
> yoda
>
>     close MAIL;

>
> }
> **********************************************************
>
>
>
> FILE is a file with several thousand email addresses.
>
> When I first ran this, everything was okay until about message
> 700, where it crapped out. Exim stated something about not
> being able to open enough file descriptors to send any more
> of these messages.
>
> What is the problem here? Is it with Exim (doubt it) or
> the operating system setup (Debian Linux, kernel 2.2 something) (possible)?
>
>
> What I ended up doing was making the script sleep for
> a second in between each message, which worked, but was a drag.
> What other solutions can people think of? Should I have written
> the messages into a batch for exim to process later?
>
>
> Thanks for the advice,
>
> Dan Kappus, system admin for some dot com something
>
>     
>     
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>


--