[Dovecot] Dict client unescaping sieve script

Joshua Perry josh at 6bit.com
Sat Nov 9 01:32:53 EET 2013


I've created a dict service that listens on a unix socket and answers 
queries for sieve scripts (among other things).

As I understand it (from the source code at 
http://hg.dovecot.org/dovecot-2.2/file/tip/src/lib-dict/dict-client.c), 
the dict client will unescape \001n, \001t, and \0011 to line feeds, 
tabs, and the \001 character respectively.

In my service I am escaping those three characters in my response (if I 
don't escape them the line-oriented nature of the protocol causes a 
failure for multiline sieve scripts) but every time LDA attempts to 
process a sieve script I get an error in the logs (see below) showing 
sieve choking on \001 characters.

Is there some configuration value I've missed or something?

*dovecot log*
Nov  8 23:04:54 www dovecot: lmtp(29940, josh at redacted.com): 
pxg7JxZufVL0dAAAPhZyyg: sieve: failed to compile script 
dict:proxy:/var/run/dovecot-auth.sock:sieve;name=main script (view user 
logfile /var/mail/vhosts/redacted.com/josh/.dovecot.sieve.log for more 
information)

*.dovecot.sieve.log*
sieve: info: started log at Nov 08 16:14:38.
main script: line 1: error: unexpected character(s) starting with 0x01.
main script: line 1: error: unexpected unknown characters found at (the 
presumed) end of file.
main script: error: parse failed.



More information about the dovecot mailing list