Snow Leopard Server and Sieve

On December 25, 2009, in Mac, by Kevin

In our mail server migrations from 10.5 to 10.6 we’ve been running the migrate_mail_data.pl Perl script to move our mail data from Cyrus to Dovecot. Seemingly at random email rules will work for users but vacation messages will not. I’ve spent the better part of Christmas Morning (Merry Christmas btw :-) trying to sort this out. As is typical for Apple when simplifying the GUI side (abstracting things Apple from the Open Source goodies) they kind of complicate what’s happening behind the scenes. In trying to resolve this problem, here are the notes I’ve taken thus far.

What I know to this point 200912251448PST…

The wiki writes sieve scripts to /Library/EmailRules/sievescripts/ . Each script is the users GUID ending in .sieve. They are owned by _teamsserver user and group and perms are 770. Also in /Library/EmailRules is vacationIndex.db . Still sorting out what that does.

There is a LaunchDaemon, /System/Library/LaunchDaemons/com.apple.wiki_sieve_manager.plist that watches /Library/EmailRules/mailsieve and executes /usr/bin/wiki_sieve_manager on changes to that directory . I don’t know what’s put into mailsieve at this point.

By some mechanism scripts are moved into /var/spool/imap/dovecot/sieve-scripts/GUID/ . Unlike the .sieve files in /Library/EmailRules these are owned by the user. The group is mail and perms are 700. Inside the GUID directories should be four files

    .dovecot.lda_dupes which tracks to whom auto replies have been sent.
    wiki_server_rules.sieve which should have the sieve file from /Library/EmailRules/ if I’m at all understanding what’s going on here.
    dovecot.sieve which is a symlink to wiki_server_rules.sieve and the file the server looks for as the current sieve as defined in /etc/dovecot/dovecot.conf .
    dovecot.sievec which is may be the binary of the script. Trying to think back to hand editing sieve scripts a few years ago. Not sure though.
 

1 Response » to “Snow Leopard Server and Sieve”

  1. [...] Snow Leopard Server and Sieve They are owned by _teamsserver user and group and perms are 770. Also in /Library/EmailRules is vacationIndex.db . Still sorting out what that does. … [...]

Leave a Reply