Server side mail filtering is a beautiful thing. Here are some useful instructions that i have found on how to set it up using OSX. I believe that the process would be very similar in the other UNIXes. There are, however, a couple of things to note in the setup.
- It apparently isn’t necessary to have a separate mail admin account before sieve works.
- Following the steps below, the most important troubleshooting step is to check if port 2000 is open and listening. This can be done by using
netstat -an | grep 2000
- Creating the /usr/sieve directory with _cyrus:mail permissions is important
- After installing avelsieve from http://email.uoa.gr/projects/squirrelmail/, make sure that you change the authentication to CRAM-MD5
In a nutshell, the way to setup sieve would be
- Configure the imapd.conf file to setup the sieve directory
- Setup /etc/services to open sieve for port 2000 on TCP
- Restart the mail service
- Download and install avelsieve into /etc/squirrelmail/plugins and place the configuration file into its config directory
- Change the configuration and change the authentication method from PLAIN into CRAM-MD5
- Enable the new plugin in squirrelmail configuration by running conf.pl
- Restart the mail service
For the individual users, it is possible then to login to squirrelmail, click on the new Filters link and setup the filters the way you want to.
Note: One interesting thing is that i wasn’t able to test the system by sending an email to myself. However, mails that are sent from another account seems to work fine. This oddity might be because i am using fetchmail to gather my emails but i can’t confirm this.
Some useful articles i found for setup is attached below.
- Sieve on OSX: Setting up Sieve. Original article http://www.netmojo.ca/blog/2007/12/01/setting-up-sieve-and-vacation-messages-on-mac-os-x-server/
- http://www.afp548.com/article.php?story=20080106215609968&query=sieve