[Dovecot] [Fwd: [PATCH] Dovecot-1.0rc2 MANAGESIEVE]

Stephan Bosch stephan at rename-it.nl
Fri Jul 14 01:25:14 EEST 2006


John Peacock schreef:
> but you have to change lib/sieve.lib (which stupidly hardcodes for 
> timsieved).  
Hahaha omg why would anyone think of implementing a (draft standard) 
protocol and require just a specific implementation! If he needs the
IMPLEMENTATION capability string something is either wrong with the 
protocol or wrong with his implementation :)

> One 
> thing that testing showed was that the string length (e.g. {13+}) is 
> part of the API that the draft RFC doesn't cover fully.  In particular, 
> websieve wanted to send the string length as part of the AUTHENTICATE 
> stanza (which your code didn't like).  You should probably just expect a 
> string length for any command and just discard it when you don't care.
> 
Actually, like the imap daemon, managesieve should accept quoted strings 
as well as string literals (with size spec) as string tokens anywhere in 
the managesieve grammar. I implemented this accordingly, but of course I 
cannot rule out any bugs in this implementation. I tested this for 
authenticate and this worked (altered the base64 for security reasons):

"IMPLEMENTATION" "dovecot"
"SASL" "PLAIN"
"SIEVE" "FILEINTO VACATION"
OK "Dovecot ready."
authenticate {5+}
plain {16+}
AHSlc3RAXnJvcA==
OK "Logged in."

However, I found a very stupid bug, which might be the cause of your 
problem: if you login with "plain" (for instance) without an initial 
response, you get an empty response back, but the linefeed is missing. 
This is obviously a protocol error. Initially this bug was not present, 
but it has been  introduced when I added managesieve string quoting to 
the string output functions.

While checking out smartsieve I noticed forgot to implement the SASL 
response code. Some implementations (noteably smartsieve) might moan 
about this with the more complex sasl mechanisms.

I also noticed that somewhere in the code I forgot a t_pop() call; the 
log moans about it sometimes when I log out. Still can't find it.

Regards,

--
Stephan Bosch
stephan at rename-it.nl






More information about the dovecot mailing list