Re: mail() limit? Use aliases table

From: Date: Sun, 08 Apr 2001 19:15:23 +0000
Subject: Re: mail() limit? Use aliases table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47655@lists.php.net to get a copy of this message
If you have access to /etc/aliases, this makes your code much easier If you are worrying about script performance, you can help alleviate the time it takes your php script to run, pulling out all the email addresses and inserting them into mail() by having another maintenance script that pulls out all the email addresses and writes them to a file. Then, in your alias table, make an entry that is the list name site-users :include: path/to/file we wrote ---^^^ Name of list --------------^^^ Required directive for sendmail And finally, the path to the file we wrote. Then, all you are passing on the bcc: line is the mail list address Which you don't want in the to: line, or cc:line, because you don't want everyone knowing the list name and using it as a spam address. See Sendmail docs regarding Alias files for further information. But this lets sendmail do all the work of parsing email addresses and delivering as efficiently as possible BTW, the format for an alias file is: addr1, addr2, addr3 OR addr1 addr2 addr3 OR, any combination addr1, addr2 addr3, addr4, addr5 Using aliases to lists is much much quicker than writing all the addresses using code in your script. You script only has one email address to put in Bcc: as far as it is concerned. If you have a list that people are signing up for, then you rewrite your list file each time someone signs up, instead of rewriting your list every time you send a mailing to your users. I use this method. If someone has an argument against this, please let me know, especially if it is a security concern, because I didn't find any problems when I came up with it. Lindsay Adams PS- you don¹t even have to worry about doing 'makemap hash /etc/aliases < /etc/aliases' each time the list is updated, and the list can be anywhere (makemap command depends on how your sendmail is configured) On 4/8/01 11:49 AM, "Manuel Lemos" <mlemos@acm.org> wrote: > Hello Christian, > > On 07-Apr-01 07:29:27, you wrote: > >> On Friday 06 April 2001 22:47, you wrote: >>> Hi, >>> Does anyone know if and what the limit is of bcc that can be used in >>> the mail() function? Hundreds, thousands? > >> If you wonder about approaching such a limit you'll be better off with a >> real mailinglist manager (mailman, listar, ezmlm, ...) > > Mailing list managers do not work differently. > > What should be avoided for large number of recipients is using SMTP. It > degrades queueing exponentially with the number of recipients. Just send the > message directly to the local queue. Just using sendmail (or some wrapper) > might do. > > > Regards, > Manuel Lemos > > Web Programming Components using PHP Classes. > Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org > -- > E-mail: mlemos@acm.org > URL: http://www.mlemos.e-na.net/ > PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp > -- >

« previous php.general (#47655) next »