Whistlestop Guide to a Mac Mini Mail Server

posted Friday, 27 October 2006

My Mac Mini serves me well as a media centre but it's very much a part time job for a far more capable machine. With a Core Duo processor, doing multiple jobs at the same time is what it was born to do right? So recently I decided that it was time to retire an aging Linux box and unleash the Mac on something a bit more tasking - mail server duties! 

What follows hopefully serves as a good whistlestop guide to doing the same with your Mac Mini.

Upgrading the RAM

My Mac Mini shipped with 512MB which had been enough until this point in time. My mail server software of choice however, tends to spend a lot of time reading/writing to and from the swap file if you supply it with such meagre resources!

So with a new 1Gb chip in hand I set about the far-from-easy task of installing the memory. There are numerous guides you can find via google but the best resource I found is the video found here:

 http://eshop.macsales.com/ 

Opening the case is by far the hardest part and I have to admit that the video does make it look easier than I found it to be.

Installing DNS server

The DNS server I had was also on the Linux box I was retiring so it was up to the Mac to perform that job too. Thankfully Mac OS X ships with BIND, it's just disabled by default. The following guide helped me was useful, particularly since I'm running Tiger which requires step 3 (other guides omit this step which was a source of confusion for me):

  http://www.macosxhints.com/

The named.conf should be edited for your own particular circumstances.

Mail Server Software

Zimbra was the chosen one when it came to the mail server software. Although it's a bit of a resource hog, it's a breeze to install and a very nice package as a whole.

Other options considered were:

  • Postfix comes preinstalled on Mac OS X, it's just a case of enabling it (see PostFixEnabler for a nice GUI driven tool to do so). However it's a bit barebones for my needs.
  • Open-Xchange is more comparable to Zimbra but the installation is far from straightforward. I used the guide written by Jordi Yeh to get me most of the way but it wasn't enough to take me to a successful conclusion. I did discover DarwinPorts along the way though which is well worth looking at.

Syncing up with old email accounts 

If you have emails to bring over from an existing server like I had, I'd highly recommend ImapSync. Easy to use and works like a charm. You can even use the aforementioned DarwinPorts to install it.

Zimbra Spam Filtering

Make sure that you have setup Zimbra mail accounts that are used exclusively for spam and ham training. Run these commands to see what account, if an, are currently setup to do so:

  zmprov gcf zimbraSpamIsNotSpamAccount
  zmprov gcf zimbraSpamIsSpamAccount 

If these aren't set then create accounts using whatever naming convention you wish and run the following commands substituting the appropriate email addresses:

  zmprov mcf zimbraSpamIsNotSpamAccount <ham training account>@example.com
  zmprov mcf zimbraSpamIsSpamAccount <spam training account>@example.com

Now any emails forwarded to them as attachments will be used to train the Bayesian filters. Also when you mark an email as Junk via the Zimbra web interface, it is automatically sent to the 'IsSpam' account. Note though the same doesn't happen when using an email client via IMAP (see bug 9532 for more details).

If that doesn't satisfy your spam-killing needs then there are more 'weapons' to try out.

Backing up Zimbra

I'm using the Open Source edition of Zimbra so am left to do cold backups. You can use the script provided on the Zimbra wiki, or opt for the recently created project zimbraColdBackup which I use.

 

tags:    



Related Posts

Whistlestop Guide to a Mac Mini Mail Server

Friday, 27 October 2006 10:59 P GMT+01
A whistlestop guide to turning your Mac Mini into a fully functional mail server
tags: