Server-Side Mail Rules

Mac OS X Server supports Sieve scripts to process server-side mail rules. Sieve is an Internet standard mail filtering language for server-side filtering. Sieve scripts interact with incoming mail before final delivery.

Sieve acts much like rules in mail programs to sort or process mail based on user- defined criteria. Sieve can provide such functions as vacation notifications, message sorting, and mail forwarding.

Sieve scripts are kept for each user on the mail server at /var/spool/imap/dovecot/ sieve-scripts/GUID. The directory is owned by 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, managesieve, which transports the scripts to the mail process for use.

To enable Sieve support:

For Sieve to function, you must enable its communications port.

By default, Sieve has the vacation extension.

Place scripts in the central script repository at /usr/sieve/.

Do not use Sieve scripts to process mail for mail aliases set up in Workgroup Manager. You must use Postfix-style aliases. See “Creating Additional Mail Addresses for Users” on page 77.

1In Server Admin, select a computer in the Servers list, then select Mail.

2Click Settings.

3Select the Filters tab.

4Select Enable server side mail rules.

From the command line:

Add the following entry in /etc/services/:

...

sieve 2003/udp # Sieve mail filtering

Sieve 2003/tcp # Sieve mail filtering

...

Sieve’s complete syntax, commands, and arguments are found in IETF RFC 3028 at www.ietf.org/rfc/rfc3028.txt?number=3028.

Other information about Sieve and a sample script archive can be found in Appendix B, “Sample Sieve Scripts” and atwww.cyrusoft.com/sieve.

For more information about managesieve, see http://wiki.dovecot.org/ManageSieve.

Chapter 2    Mail Service Setup

39

Page 39
Image 39
Apple 10.6 manual Server-Side Mail Rules, To enable Sieve support, From the command line