Snow Leopard Sieve Rules

How to edit sieve rules in Snow Leopard by hand. This is not really recommended especially because it seems that SL server does not utilize all the sieve rules and the ones that it does utilize are in a slightly different format than exists in Sieve documentation.

A couple of sources later and a couple of quick lines of code helps to figure out what file to edit.

u="username"; dscl /Search read Users/$u GeneratedUID | awk {'printf "/Library/EmailRules/sievescripts/"$2".sieve\n"'} | xargs -n1 -p sudo cat

u="username"; dscl /Search read Users/$u GeneratedUID | awk {'printf "/Library/EmailRules/sievescripts/"$2".sieve\n"'} | xargs -n1 -p sudo pico

Edit the command to make u equal to the username of the person and you can look at and edit the sieve files. I also don’t know why but I get the following error.

Received SIGHUP or SIGTERM

All you have to do is simply copy the command and it will work. Not sure why it doesn’t work the first time.

I’m quite certain if you go ahead and try to re-edit using the GUI your files might get screwed up. YMMV.

Some say running the following command helps. Also, see Update below. Again, YMMV.

sudo /usr/bin/wiki_sieve_manager

Finally a real solution to the above. Simply make sure you use the URL https://yourdomain.com/settings/username/emailrules/. Even if the website is not set up to use port 443 in Server Admin it seems you must use https.

Update
I discovered another secret. In order for the new rules to transfer you will need to add a new rule via the wiki, or at least go to the wiki and press the add rule button. This way the new rule is copied over to /var/spool/imap/dovecot/sieve-scripts/%u.

Related posts:

  1. Server-Side Email Filtering with Sieve Another post for the peripheral brain. When I first set...
  2. Setting up Snow Leopard iCal Server After scouring through the official documentation, and finding that lacking,...
  3. Dovecot Permissions Well, I finally bit the bullet and installed OS X...
  4. Fail2ban on Leopard Server So here I am running my own server — for...

Related posts brought to you by Yet Another Related Posts Plugin.

This entry was posted in osx-server and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.