Re: [Exim] php & exim for newsletter bulk mail

Top Page
Delete this message
Reply to this message
Author: James Fassett
Date:  
To: Tim Jackson, exim-users
Subject: Re: [Exim] php & exim for newsletter bulk mail
----- Original Message -----
From: "Tim Jackson" <lists@???>
> Hi James, on Thu, 5 Jun 2003 11:10:57 -0700 you wrote:
>
> > Tim Jackson wrote:
> > > Create all the mails in PHP but instead of calling mail() or doing it
> > > via SMTP, create one big BSMTP file.
> <snip about syntactically valid addresses>
> > I like this solution (it is in fact what I was hoping for), however the
> > 'point of origin' thing is sticky.
> > There are 2 peices to the system
> >     1) mass mailer
> >     2) news letter

>
> It's not immediately obvious to me what each "piece" is and what the
> difference is here.



The mass mail is generated from a very old list of opt-in news letter
subscribers. This mass mail says 'remember us - we have a new newsletter -
click here to subscribe'.

News letters are sent to users who opt-in to the new newsletter, or confirm
their subscription after entering their address to a sign in page.

standard stuff, I'd guess. My problem was the numbers jumped from 'a few'
to 8,000.


> > I can verify addresses for the news letter, but not for the mass mailer.
>
> Ditto. However, if necessary, you can check the syntax at the point of
> generating your BSMTP file and throw away bad addresses (or notify someone
> about them). It'll slow it down a bit but it shouldn't be *too* bad. Or do
> a half-reasonable regex, as below:



I already check the syntax for the online subscription form using a regexp.
In fact I wouldn't mind invoking exim -bv at that stage.


> > Any chance a regular expression would do the job, or do you mean I need
> > to verify the validity beyond string verification?
>
> A fully RFC-compliant regex is very long, but in reality for your purposes
> you can probably come up with something fairly simple. Anyway, this is
> only a problem if you are using BSMTP to do multiple confirmation
> mailouts, for reasons discussed below.



I am familiar with the rfc compliant regex (Abagail's one from the Perl
group is well done), and it is good news that I only need a regex strength
validation on the email address.


> > Although I like the idea, I am concerned about the 'failing part-way
> > through' clause. Checking 10,000 addresses by evoking exim from flash
> > on each is as slow as passing each email to exim one at a time.
>
> Is there no way to devise a system where at the point that addresses get
> added to your database (or whatever) they are syntax checked? Either way,
> you're hopefully sending out a confirmation with embedded token on signup,
> so if you only mail to confirmed addresses, you shouldn't have a problem
> (because the addresses will, inherently, be syntactically valid if you
> managed to send/receive a confirmation).



That is the newsletter portion (mailing to confirmed addresses). If I go
with BSMTP and php, I can't do a lot of verification that I'd like to do,
and there is a chance (however small) that 50% of the way through it fails
and I have _no_ notification of this fact.

Although I am sure there are certain times that this is acceptable, using
Perl to hand feed each message to the SMTP server will provide the greatest
flexability for me for the future.

Thank you again for your help.

BTW - I am using exim -odq to quickly queue the emails in exim. This is
almost as fast as batching using exim -bS, but avoids the 'could break 50%
of the way through' scaryness.

I extended Manual Lemos' MIME email class (the sendMail method) quite easily
and I am very happy with the results.

James.