Am 13.08.2011 09:48, schrieb Steve Fatula:
> This seems to have been discussed before, but, I have a small twist. On a 
> system I am working on, there are many users. These users can send mail via 
> some email client or webmail, and, via command line programs (sendmail) or 
> PHP, mailing list program, etc. I need to be able to limit outbound emails 
> sent in any of the methods to say 100 per hour for a given user. The limit 
> would be by user name, so, the SASL user name might be steve, and, if mail is 
> sent by sendmail via command line, it would also be steve.
> 
> So, a policy server can't work since it doesn't deal with command line type 
> locally submitted email. 

you can use mini-sendmail instead of sendmail bin
http://www.acme.com/software/mini_sendmail/
normally the sender of your apache is something like www-data etc, which
you can limit then, but youre right , if you have many php sites doing
this , a typical rate limit policy server might not help in this case

A milter MIGHT work since it can be smtpd or non smtpd, not sure, have
not found one yet that might do the trick.
> 
> Failing that, or some other simple solution, the simplest thing I can think 
> of would be to simply watch the log file via a program and by parsing it as 
> it gets written to, and keeping a count. If the limit is reached, can set 
> postfix setting to disable locally submitted mail for the user, and, can set 
> policy server to not accept mail from submission port. Should be pretty 
> efficient. 
> 
> Is there is an easier or more elegant way someone might be using?
>  
> Steve

i am not clear , what exact problem youre trying to solve, postfix on
modern hardware should be good enough for your needs, are you in trouble
with some big mailers use slow transports etc

anyway, if your server is a "all-in-wonder-machine", you might have to
look for different solutions depending on the used software, for local
users, sasl virtual users, sendmail php, maillist stuff and dont try to
find a match all solution, perhaps postfix multi instance might help etc
also mailman may have a rate limit solution allready implemented ( didnt
looked at this )
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria

Reply via email to