Apple Mac OS X Server Network Card User Manual


 
202 Chapter 12 Working with the Mail Service
Configuring Mailboxes
The mail service keeps track of incoming email messages with a small database
(BerkeleyDB 4.2.52), but the database doesn’t contain the messages themselves. The
mail service stores each message as a separate file in a mail folder for each user. This is
the user’s mailbox.
Incoming mail is stored on the startup disk in the /var/spool/imap/user/username
folder. Cyrus puts a database index file in the folder of user messages. You can change
the location of any or all of the mail folders and database indexes to another folder,
disk, or disk partition. Cyrus mail storage can also be split across multiple partitions.
This can be done to scale mail services, or to facilitate data backup.
The cyradm tool is included with Mac OS X Server. It is an administration shell for Cyrus,
the IMAP mail service package, and communicates with the Cyrus::IMAP::Admin Perl
module. cyradm can be used to create, delete, or rename mailboxes, as well as set ACLs
for mailboxes (for email clients that support them).
Things to note:
 cyradm is a limited shell. It supports shell-style redirection, but does not understand
pipes.
 cyradm can be used interactively or be scripted, but Perl scripting with
Cyrus::IMAP::Admin is more flexible.
 All spaces in file or folder names must be escaped with a backslash (\), just as you
would in a shell.
See the cyradm man page for a complete list of commands.
Enabling Sieve Scripting
Mac OS X Server supports Sieve scripting for mail processing. Sieve is an Internet
standard mail filtering language for server-side filtering. Sieve scripts interact with
incoming mail before final delivery.
The Sieve acts much like the rules in various email programs, to sort or process mail
based on user-defined criteria. In fact, some email clients use Sieve for client-side email
processing. Sieve can provide such functions as vacation notifications, message sorting,
and mail forwarding, among other things.
Sieve scripts are kept for each user on the mail server in the /usr/sieve/<first letter of
username>/<user> folder.