Re: [PHP] limit mail() function

2008-04-09 Thread Jordi Moles
hi, thanks for all your opinions and suggestions, i'll have a look at all of them to see if i can implement a restricted system for mail() functions. I'll report back in a few days to let you know if i've come up with something that really works. Thanks for all. En/na Andrew Ballard ha esc

Re: [PHP] limit mail() function

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 3:51 PM, Greg Bowser <[EMAIL PROTECTED]> wrote: > >postfix has rate-limitation facilities you can use for this > > I'm aware of several configuration directives that limit rate, none of > which directly limit the send rate local users. Perhaps some kludgly > or elusive t

Re: [PHP] limit mail() function

2008-04-08 Thread Greg Bowser
>Pardon me, but that's one kludgy idea Hence my use of the term hackish. But really, is isn't all that kludgy. An software solution that implements this natively would have to keep track of the stats somehow; undoubtely via some sort of stats file. So the real difference is that two processes are

Re: [PHP] limit mail() function

2008-04-08 Thread Per Jessen
Greg Bowser wrote: > I'm not sure how, or if there is a way to do this in postfix. The > mail() function calls the sendmail binary, so one sort of hackish way > might be to move this binary and write a wrapper script that keeps > track of per-user rate limits, and then invokes the real sendmail >

Re: [PHP] limit mail() function

2008-04-08 Thread Greg Bowser
As far as I know, there's no way you can do this via PHP. PHP doesn't "know" about users on the system. Generally, PHP is run as an apache module, and thus the scripts are run as the user apache is running as. So to start with, you'd probably need to be running a Fast CGI + SuExec setup or somet

Re: [PHP] limit mail() function

2008-04-08 Thread Per Jessen
Jordi Moles wrote: > I've got a server with apache2 and postfix and php5 providing hosting > to some clients. I've got this big problem about clients sending spam > massively, either consciously or because they website have been > hacked. The main way to spam is by using the "mail()" function. > S