View Single Post
Old 10th May 2013, 21:58
monkfish monkfish is offline
HowtoForge Supporter
Join Date: Mar 2013
Posts: 106
Thanks: 9
Thanked 15 Times in 14 Posts
Default switching courier/maildrop to dovecot/sieve rules


For performance reasons I just flipped a (Centos 6.4 x64 / ISPConfig server from Courier to Dovecot. All the necessary folder changes were made, along with the server configuration System >> Server Config >> Server >> Mail and selecting Dovecot with Sieve.

Everything is working as expected, all clients and webmail users see all folders in correct places, etc. however users with mail filter rules seem to have a problem.

It seems that the .sieve ruleset initially written is structured for maildrop NOT sieve. Therefore I see parse errors such as:-

line 12: error: unexpected character(s) starting with '`'.

If I DISABLE then ENABLE the rule within ispconfig then it is written in the correct format and mail is filtered correctly.

Is this expected behaviour having to do this when flippng from one to the other?

Example is the following rule. Opened up .sieve file and inspected this which is showing in the logs as failing:-

`test -e "$DEFAULT/.oracle" && exit 1 || exit 0`
if ( $RETURNCODE != 1 )
        `maildirmake -f "oracle" $DEFAULT`
        `chmod -R 0700 "$DEFAULT/.oracle"`
        `echo "" >> $DEFAULT/courierimapsubscribed`
if (/^From: .*sup\-oracle@mydomain\.com/:h)
exception {
ID50EndFolder = "$DEFAULT/.oracle/"
to $ID50EndFolder
Edited the rule within the ISPConfig gui to disable it, saw it disappear from .sieve file then edited again to re-enable it. It reappeared as follows:-

if header :regex    ["from"] [".*sup\-oracle@mydomain\.com"] {
    fileinto "oracle";
So while I've a feeling the "workaround" is to go through and disable all the rules and re-enable them, can I ask is this expected behaviour when flipping from courier to dovecot?

Thanks for ISPConfig
Reply With Quote
Sponsored Links