Apple Mac OS X Server Network Card User Manual


 
Chapter 12 Working with the Mail Service 203
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”), web mail plug-ins (“avelsieve”), and
even some email clients.
Enabling Sieve Support
In order 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 email
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.
Sample Sieve Scripts
The following scripts are examples of some common scripts that a user might want to
use.
Vacation Notification Script
#--------
# This is a sample script for vacation rules.
# Read the comments following the pound/hash to find out
# what the script is doing.
#---------
#
# Make sure the vacation extension is used.
require "vacation";
# Define the script as a vacation script
vacation
# Send the vacation response to any given sender only once every seven days
no matter how many messages are sent from him.
:days 7
#For every message sent to these addresses
:addresses ["bob@example.com", "robert.fakeuser@server.com"]
# Make a message with the following subject
:subject "Out of Office Reply"
# And make the body of the message the following
"I’m out of the office and will return on December 31. I won’t be able to
replay until 6 months after that. Love, Bob.";
# End of Script