NYCPHP Meetup

NYPHP.org

[nycphp-talk] email quota hander in PHP

Hans Zaunere hans at nyphp.com
Thu Aug 26 23:33:22 EDT 2004


> Anybody here want to try and talk me out of writing a PHP script to
help me
> trim down over-quota mailboxes on my server?  Somehow I pick up the
> impression from some people that PHP is just not meant for this kind
of
> thing, and that I'd be better off going with python or perl.  Since
I'm much
> more familiar with PHP than most anything else, that seems a lot more
> convenient.
> 
> The background is that I've been looking for some ways to manage email
> quotas per user on my server, something that's a little more flexible
than
> procmail's "bounce anything over-quota" methods.  Not having found
anything
> existing, I've started to hack something together in PHP that would
get
> called daily by cron and then implement a certain policy on over-quota
mbox
> files  (basically, delete oldest messages one-by-one until mbox size
is
> acceptable, but never delete anything less than x days old).  I've
also got
> access to something in Python which I could (extensively) modify --
but I
> don't look forward to that.
> 
> Anybody in NYPHP-land want to issue a word of warning before I go this
way?

I think using PHP for this would be fine.  CLI PHP works great and I use
it constantly.  Depending on your MTA, you could even check the quota
"just-in-time", that is when mail is delivered, but before it's written
to the mbox (Postfix comes to mind)

H




More information about the talk mailing list