The Ultimate Business Machine - Archives
List of Categories : Commentary * Database * Singapore * Technology * Travel *
Fri 14 Mar 2003
Category : Technology
I'm finally done with this little project. First, I wrote a how-to on setting up OS X's mail server. Then I realised this would be of limited use, since I took a whole evening to set up the mail server the first time I took this path.
So, I wrote a shell script in a half-a-day that automated the whole thing so people could do this in five minutes. Actually, the script did its stuff in half a minute but people may need a totally unpredictable amount of time finding their way around the OS X Terminal. And they'll probably make mistakes that could kill their systems. So what was I getting myself into?
I was about to throw it all away. But it's such a waste. So, one more try. I remembered I could use AppleScript Studio to create a Cocoa application that can control the Mac at the Unix level, in effect hiding all the hoary stuff behind a pretty interface.
My first try at AppleScript Studio proved so enthralling, I didn't want to sleep. It's that fun. Again, the thing works in half-a-day. But I wanted to reduce to the absolute minimum, the things the user had to do. It ended up with just one field the user had to key in (the domain name) and then just one click. It can't be simpler.
But wait, things could still go wrong. I need to give to the user a POP3 server which I have pre-compiled and some configuration files that I've edited. What if these were somehow separated from the main package. So I needed to find a way to pack all these into one bundle so the user sees just one application they can download. Again, nothing simpler than that.
Finally, the S word - security. In the PC world this dredges up visions of the Thought Police. But think about it. The application which I have writtten and called Sendmail Enabler will need super-user rights to install all these stuff on your machine. One mistake and I can wipe out your system. So I have to keep testing to make sure that any mistakes I am ever likely to make is limited in its impact.
But I can't stop someone from trying to alter my scripts so that it will screw up your system. You may run it because you trust me - but what you're running may not be what I had written. So I have to make it a bit harder for the casual would-be terrorist (for indeed you will face terror) to do this. It's not foolproof but it's what I know to do at the moment. To be sure, only use a copy you downloaded directly from my site.
It took a total of one day to get the basic concept right. And five days to wrap some industrial strength around it to protect against what could go wrong. That ratio, in my experience, is usually what it takes.