Why not just use simple alias files?

1) You have a file with all your addresses

file.asc:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
etc

2) You have the alias entry
my-mass-list:        :include:/path/to/file.asc

3) PHP sends one email to [EMAIL PROTECTED]
4) The mail server (if it's any good), expands all the addresses from
file.asc and does the mass mailing...

Problem sorted?  The alias file (included) can easily be managed with PHP.
With a little tweaking, you can even include a script directly via the alias
file by using a | (pipe).  The script can go as far as to even get the list
of email addresses from a MySQL DB or something... You can do the script in
just about anything you want... Sh, Perl, PHP, Python, Java... Doesn't
really make a difference.

A pipe will actually give you better security, as you can verify the email
before actually sending out 100,000 odd copies of it.  Here, you can sign
the message with a PGP key via PHP for example.  If the key's do not match,
the script doesn't send the email (And obviously, you remove the key from
the email before sending it out from the piped script)....

Anyways, that's how I would do it if I couldn't use mailman for whatever
reason.  IMHO, keeping as much of the mail on a mail server will drastically
improove the performance, because a mail server is made to
process/send/receive email, PHP is not ;-)

--
me



----- Original Message -----
From: "Jonathan Chum" <[EMAIL PROTECTED]>
To: "'Gil Disatnik'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, December 22, 2002 2:03 AM
Subject: RE: [PHP] Mass Mailing


> Yea, I'd like to see that. How many people are on your lists if you
> don't mind me asking?
>
> I also came across this evening, http://phpmailer.sourceforge.net and
> http://www.octeth.com/index.php uses this class on it's backend,
> claiming that it is able to send 500,00 on a AMD Duron 900 with 512MB
> RAM in 10 hours.
>
> The phpmailer class says that directly conneting to mail() is better
> than using SMTP as it puts more of an overhead. Though I was looking at
> Perl packages such BulkMail that uses SMTP was able to send out 100,000
> emails.
>
> Everyone says that PHP's mail() causes several Sendmail instances to
> fork off which is ineffcient.
>
> -----Original Message-----
> From: Gil Disatnik [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 21, 2002 6:46 PM
> To: Jonathan Chum
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Mass Mailing
>
> I have written a few useful php functions that put the email addresses
> on
> one file and the message on another file.
> I have a crontabbed script that runs every min looking for these files
> and
> then using qmail-inject to send them (sendmail is bad, replace it ;))
> It's very good for sending a few thousands emails every time as the php
> script execution finishes in a second and you don't have to deal with
> max
> execution time and everything.
>
> If you wish I could send you the scripts.
>
> At 05:10 PM 12/21/2002 -0500, you wrote:
> >An upcoming project I'm working and spec'ing out is a mass mailing
> >application. Initially, I was looking at Mailman which was written in
> Python
> >since it looks like it handles delivering emails efficiently without
> killing
> >the server. We have 1 client able to send 110,000 emails at 6.5K avg
> per
> >week on PIII 800 with 128 MB RAM using Mailman. The inteface however is
> very
> >bad and we'd like to develop other features like text ads, tracking,
> >templates, etc. This would require writing a wrapper around Mailman in
> PHP.
> >I was considering of writing the mass mailing application in PHP
> instead
> >though.
> >
> >If anyone has eperience writing such applications with this amount of
> >emails, I'd like to know what you've done.
> >
> >I'm thinking of coding the front end in PHP that will put the email
> into a
> >queue table that will force a command line PHP script listening on a
> >particular port to scan the database for this new task in queue. Once
> it
> >picks up the task, the timeout for this application to run will be set
> to
> >infinite. It'll establish a SMTP socket either to a really beefed up
> mailing
> >list server or the localhost SMTP server to begin blasting out these
> emails.
> >
> > From what I understand, it's better to blast emails via an open socket
> >connection to SMTP rather than looping through Sendmail. Is this the
> right
> >thing todo?
> >
> >I've also heard that PHP is not good for writing mailing lists
> application,
> >but Mailman is written in Python and it's able to send thousands of
> email
> >just fine. Any thoughts on this?
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> Regards
>
> Gil Disatnik
> UNIX system/security administrator.
>
> GibsonLP@EFnet
> http://www.disatnik.com
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> "Windows NT has detected mouse movement, you MUST restart
> your computer before the new settings will take effect, [ OK ]"
> --------------------------------------------------------------------
> Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
> system, written for a 4 bit processor by a 2 bit company which can
> not stand 1 bit of competition.
> -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to