I collected some more Tips & Tricks to tweak OS X Leopard (also see my previous article). In my eyes, these modifications are all 100% necessary for a great daily Mac experience. I was a Windows guy and I’m running Debian/Ubuntu Linux for the last 7 years for server purposes. But now, for daily work I really start to get used to my MacBook Pro running OS X Leopard 10.5.6. I still hate Apple for lately focusing on its schicky-micky customers with all their shiny glossy expensive housewife gadgets. But I love OS X. It just needs some tiny little tweaks…
In this tutorial I’d like to describe how to create an extensive sendmail wrapper for a web server to monitor all sent emails and throttle daily sent email volume by the senders original UID (user id). This is useful if you e.g. run PHP in CGI-mode with SuExec, that is: all customers run their scripts under their own UID. The wrapper described here is not just a PHP-only wrapper (as described in my Simple PHP mail wrapper tutorial) – it directly replaces
/usr/sbin/sendmail so we are able track all sent email of the whole system.
I have updated the process hiding kernel patch described in my previous post. The following patch was created for a vanilla kernel 126.96.36.199 from kernel.org. You should be able to patch also future kernel versions as it is a super simple single-line patch. Just modify one line in the
proc_pid_instantiate method of
If you run a webserver with several hundreds of virtual hosts running PHP, you definitely need to monitor or log the access to PHP’s mail() function. I describe in a short tutorial how to painlessly setup a simple sendmail wrapper to accomplish this.
This has been tested on a Debian Lenny 5.0 system running PHP 5.2.8 and Postfix.