Mac OS X Server 10.2’s Apple Mail Server and UNIX’ /var/mail
6 November 2002
If you are running Mac OS X Server 10.2, you now have two options for passing mail from Exim, or any other mail transfer agent, to the Apple Mail Server. The “old” way was for the MTA (mail transfer agent—for example, Postfix or Exim) to make an SMTP connection to the localhost on port 627, where AMS would be listening. You can replicate this behavior in 10.2 by keeping the setting for AMS to use SMTP to transfer mail, but then manually set the incoming SMTP port to 627.
The “new” way is to have the MTA deliver the mail to a spool file in /var/mail. This is the traditional method for most UNIX daemons to hand off mail to a POP or IMAP server. The user’s mail will collect in /var/mail in a file until they check mail using POP or IMAP. At this point, AMS will check /var/mail for a file that matches the first short name of the user that just logged in. AMS will collect all of the waiting mail, delete the spool file, and put all of the waiting mail into the user’s INBOX (stored in the AMS mail database).
While a user can log into POP or IMAP with any of their given shortnames, AMS will only check for a spool file with the name of the user’s first short name. So you can have a user, George, with a primary shortname of “george” and a secondary shortname of “george@afp548.com.” Set up your SMTP server to spool mail to a file called “george.” Since the secondary shortname is the user’s e-mail address, they can use their e-mail address as their login name when checking their mail. One less thing for the user to have to remember.
If your mail is spooling in /var/mail but your users aren’t able to get it, check the AMS logs in /Library/Logs/MailServer. Most likely it is a permissions problem. Try changing the permissions on /var/mail:
sudo chmod 1777 /var/mail
Another problem I have seen is users without a password server password logging into the POP or IMAP server using APOP or MD5 passwords. Both of these password types are only available to users with password server passwords. Sometimes Apple Mail Server erroneously allows them to log in, but will not collect any new mail from /var/mail. In this case try stopping and starting the mail server a time or two. After that, you should see log entries where APOP or MD5 authentication was denied for the user. Then the user will be able to login using normal plaintext authentication.
—by Joel Rennich,