Specifications

208 Chapter 12 Managing Mail Service
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.
 You must escape spaces in file or folder names with a backslash (\), just as you would
in a shell.
For a complete list of commands, see the cyradm man page.
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.
Sieve scripting acts much like the rules in various mail programs, to sort or process mail
based on user-defined criteria. In fact, some mail clients use Sieve for client-side mail
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.
The folder is owned by the Mail service, so users normally don’t have access to it and
can’t put their scripts there for mail processing.
For security purposes, users and administrators upload their scripts to a Sieve process
(timsieved) which transports the scripts to the mail process for use. There are various
ways of getting the scripts to timsieved, such as Perl shell scripts (“sieveshell”) and even
some mail clients.
Enabling Sieve Support
For Sieve to function, you must enable its communications port. Sieve has the vacation
extension added by default. All scripts must be placed in the central script repository at
/usr/sieve/, and Sieve scripts cannot be used to process mail for mail aliases set up in
Workgroup Manager; you must use Postfix-style aliases.
To enable Sieve support:
1 Add the following entry to the services file in /etc/, using a text editor.
sieve 2000/tcp #Sieve mail filtering
2 Reload the Mail service.