Last year I helped setting up an email environment with two mail servers.

One of them is a Kerio mail server which serves mails for the customer’s staff.

The second mail server makes use of Mac OS X Server 10.4′s internal mail technologies and serves mails for the majority of the customer’s mail users.

All users were set up in a central Open Directory database, with the Mac OS X mail server being the incoming SMTP server.

So we had to tell our mail server which mails have to be forwarded to the Kerio mail server, and which have to be delivered locally.
You can easily use /etc/aliases to tell your machine which accounts need to be forwarded, yet, the more intuitive way for our customer’s staff is to use Workgroup Manager to do so.

You can select all users in WM, whose mails need to be delivered locally, and simply point them to the local mail server. They will now get their own individual email addresses and mailboxes on the local machine.

Unluckily, you can’t select all users with forwardings in the same way to forward their mails to the Kerio server.

Instead, we used a little script, which automatically did all the work for us and still displays all settings in Workgroup Manager:

ForwardMails

I haven’t tried this with Mac OS X Server 10.5 yet, but it’s either still the same method, or you might need to adapt the script a bit.
But basically it should look almost the same on 10.5.

The script is not very effective in terms of CPU load, as for each user it connects to the Open Directoy system.
You might want to connect to your database once only if you really need to change many entries.

Please use at your own risk!

Posted on by André Aulich. This entry was posted in Mac OS X Server.

Comments are closed.