Saturday, August 8, 2009

Creating Email Aliases in 10.5 Server with Magic Triangle

First let me warn you that this post will be far more technical than any of my previous content. I have been working on some pretty advanced networking issues at my office and have decided to begin publishing some of the solutions that I have discovered. This solution was not to hard to find but it is buried in the middle of a manual and does not specifically discuss the magic triangle or golden triangle configuration that I am using. So for anyone out there that manages a Leopard Mac OS X 10.5 Server Open Directory and Windows 2003/2008 Server Active Directory, this is for you.

With the magic triangle (AD/OD Integration) in place the user records all existing in the active directory and thus can not be altered with Apple's Workgroup Manager (WGM). Therefore we can not simply create an email alias by adding an additional entry in the Short Name field through WGM (this method is known as Mac OS X Server-style alias). Instead we must use the Postfix-style alias which requires use of the command line. The official instructions can be found in the Mail_Service_Admin_v10.5_2nd_ed.pdf on Apple's website.

1) Open a terminal/command line session with the mail server
ssh -l adminuser

2) Open the aliases file for editing
sudo pico /etc/postfix/aliases

3) Add or remove references to mailboxes as needed
Only edit the section of the document titled "# Put your local aliases here."
Enter aliases in the format of "newalias: shortname"
Press Control-O to save the file
Press Control-X to Exit the pico text editor

4) Process the text file into the database for faster access
sudo postalias /etc/postfix/aliases

5) Reload the alias database
sudo newaliases

6) Close the command line for security purposes
(Do this immediately even if you have other cli processes to take care of since the sudo command caches your root password for a short amount of time)

No comments: