Setting up Sieve in OSX

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

  1. Configure the imapd.conf file to setup the sieve directory
  2. Setup /etc/services to open sieve for port 2000 on TCP
  3. Restart the mail service
  4. Download and install avelsieve into /etc/squirrelmail/plugins and place the configuration file into its config directory
  5. Change the configuration and change the authentication method from PLAIN into CRAM-MD5
  6. Enable the new plugin in squirrelmail configuration by running conf.pl
  7. 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.

Download (PDF, Unknown)