Skip to content

Migrating Mail

My current server runs FreeBSD, sendmail, and cyrus IMAP. I experimented with an old (more than 5 years) webmail package, but that hasn’t been in use for some time. It has a procmail mailer of my own devising to handle some primitive spam filtering, but that really doesn’t cut it any more.

Moving to MacOS X Server means a change to postfix, working webmail (SquirrelMail), filtering (spamassassin, clamAV, and Sieve), and using MailMan for all lists. The change from procmail to Sieve doesn’t bother me, and the webmail won’t make a significant difference. We had MailMan installed, but dropped the couple of lists we had that used it several years ago.

A couple of things are giving me a headache: the first is users. I have set up my user accounts and given them my own randomly generated passwords, which I can tell the users. However, I really want them to be able to change their passwords themselves, and I don’t see a way of doing that beyond giving them shell access, which isn’t going to be appropriate for all users.

The second is aliases. We use a lot of aliases: paul is mapped from Paul_Lynch, paul.lynch, and a few others; we also use aliases for common list type addresses: info, sales, etc. I can see using MailMan for the lists, but it isn’t appropriate for single member lists. In sendmail, I just edit the aliases file and re-make /etc/mail: end of story. But I don’t see a UI tool to do the same for MacOS X Server. Apparently you add additional short names in Workgroup Manager to handle this; the first short name is ‘special’. This doesn’t help for account redirections, including redirecting from an alias to a list.

The normal solution for postfix is to edit the /etc/aliases file and run newaliases, which is very similar to the old sendmail solution. So MacOS X Server supports single address aliases through the UI (what may be called ‘real’ aliases), but traditional aliases still have to be created the old fashioned way – call them ‘group’ aliases.

In addition, postfix supports most existing sendmail configuration files; we also use virtusertable for off-site (ie non-user) aliases and groups. The aliases file is restricted to local users only.

As we have a number of domains, I will need to investigate the ‘advanced’ features for virtual hosting, could be interesting.

Notes:

If you have an alias similar to “Paul_Lynch”, it must be entered into the short names as “paul_lynch”. This is different from the old netinfo form of mail aliases, and definitely caught me out.

For spam filtering, you need to prime the pumps by creating two mailboxes, one for spam and one for definite non-spam, and running a command line on them. Once that is done, you should create users called junkmail and notjunkmail; use forward (Cmd-Shift-E) to send new spam to these account, which are processed by cron every night. After about three weeks of this, I still have a lot of spam coming in, but it does seem to improve gradually.

More detail on aliases

/etc/aliases is linked to /etc/postfix aliases. When you make a change, you must run newaliases, and then ‘postfix reload’.

Postscript:

I have been running, reasonably painlessly, on this server since January 1, 2006. The transition went more smoothly than I expected; the only surprise was the one mentioned above about alias case sensitivity.

Somewhere I kept some more notes about exact configuration steps, which I will post when they surface.

Post a Comment

Your email is never published nor shared. Required fields are marked *