10.6.2 Squirrelmail, LDAP & Sieve

How I Use Tailwind CSS To Design A Website From Scratch

Snow Leopard 10.6 comes with built in Server Side rules (Sieve) that helps you to organize mail, if your like me and am supremely disappointed at the lack of functionality then you will be happy to know that there are alternatives out there. Snow Leopard still ships with a copy of Squirrel mail for OSX it also ships with many cool plugins for squirrel mail already installed. Lets look at the alternative to the built in Sieve scripts that ship with 10.6 Snow Leopard server.

To start with you must enable Sieve on your server to do this, start Server Admin, Mail > Settings > Advanced: Tick “PLAIN” on IMAP/POP and save it. Mail > Settings > Filters: Tick “Enable Server Side mail rules”, save it and restart the mail service. once your done here you will be able to use the built in web based interface for handling server side rules. However you can also install your own!

SquirrelMail is the default webmailer in SLS. You can use the plugin avelsieve to manage server side mail rules. Download avelsieve (I recommend version 1.9.9) and unpack in directory /usr/share/squirrelmail/plugins (so that directory avelsieve is within the plugins dir).

Note that you also need to download javascript_libs plugin, if you use a recent version (>=1.9.8) of avelsieve. If you need the javascript_libs plugin, also unpack it in squirrelmail’s plugins dir. Then edit the file plugins/avelsieve/config/config.php (copy config_sample.php to config.php if not exisiting).

Change the authentication mechanism to

$sieve_preferred_sasl_mech = 'PLAIN';

Edit file /usr/share/squirrelmail/config/config.php and register the plugin(s)

$plugins[0] = 'avelsieve'; $plugins[1] = 'javascript_libs'; //

only if using a newer version of avelsieve. See avelsieve page Access the Webmailer (https://<SLS_server_name>/webmail/ and check the filter connection.

SquirrelMail is the default webmailer in SLS. You can use the plugin avelsieve to manage server side mail rules. Download avelsieve (I recommend version 1.9.9) and unpack in directory /usr/share/squirrelmail/plugins (so that directory avelsieve is within the plugins dir).Note that you also need to download javascript_libs plugin, if you use a recent version (>=1.9.8) of avelsieve.If you need the javascript_libs plugin, also unpack it in squirrelmail’s plugins dir.

Then edit the file plugins/avelsieve/config/config.php (copy config_sample.php to config.php if not exisiting).Change the authentication mechanism to  

$sieve_preferred_sasl_mech = 'PLAIN';

Edit file /usr/share/squirrelmail/config/config.php and register the

plugin(s):$plugins[0] = 'avelsieve';$plugins[1] = 'javascript_libs'; //

only if using a newer version of avelsieve. See avelsieve page Access the Webmailer (https://<SLS_server_name>/webmail/ and check the filter connection.

Roundcube: Sorrily Apple decided to use the old-fashioned, ugly SquirrelMail webmailer and not RoundCube. RoundCube is much nicer and also the “managesieve” plugin available for it is much better than avelsieve in SquirrelMail. Luckily you can install RoundCube on your SLS without harming the default installation.

Enable managesieve plugin ManageSieve plugin comes with RoundCube. To enable it, edit file roundcube/config/main.inc.php:

$rcmail_config['plugins'] = array('managesieve');

Then edit file plugins/managesieve/lib/Net/Sieve.php comment line

var $supportedAuthMethods=.... (comment with //)

uncomment line

var $supportedAuthMethods=array( 'PLAIN' , 'Login' );

Set timezone:

date.timezone = Europe/Berlin

Now test roundcube by accessing https:///roundcube/ Login as a user you like to change server side rules for. Click on “Settings” in the upper right corner, then on Filter. If you see the page and no error occurs, you are successfully connected to the sieve backend of IMAP! You now can create your rules.

The good thing is, that every rule managing application (Apple web rule management, SquirrelMail, RoundCube) you use, store its own file. So one app is not overwriting the others config file. This is of importance if you enable the apple built-in crippled rule management and store the rules, there. This creates an own file “wiki_server_rules.sieve” in your sieve script dir and enables it by the link dovecot.sieve -> wiki_server_rules.sieve

Subscribe to my newsletter

Join me on my journey as I set out to help aspiring entrepreneurs take that critical first step.