ports/98537: p5-IMAP-Sieve fails PLAIN authentication against timsieved (cyrus-imapd)

Sergey Starosek star at sunbay.com
Mon Jun 5 16:00:42 UTC 2006

>Number:         98537
>Category:       ports
>Synopsis:       p5-IMAP-Sieve fails PLAIN authentication against timsieved (cyrus-imapd)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 05 16:00:35 GMT 2006
>Originator:     Sergey Starosek
>Release:        6.0-RELEASE
Sunbay Software Crimea Ltd.
After upgrading to cyrus-imapd to version 2.3.6, websieve-0.63.a stopped working failing to authenticate user with the following error:

Jun  5 18:37:06 host sieve[64799]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Jun  5 18:37:07 host sieve[64799]: badlogin: localhost.example.com[] PLAIN error base64 decoding string

Websieve in this case reports the following error:

System Error: IMAP::Sieve [ Login incorrect while connecting to localhost ]: NO "Authentication Error"
Wrong Password! 

Quick search via Google gave a hint that probably base64 encoded string contains a eol marker at position 76. Patching Sieve.pm solves a problem.

Install cyrus-imap (with SASL and PLAIN auth support) and websieve from ports.
Try to login with valid user account.

Here's a patch which solves the problem by defining empty eol separator while calling encode_base64()

--- Sieve.pm.orig	Mon Jun  5 18:50:26 2006
+++ Sieve.pm	Mon Jun  5 18:50:49 2006
@@ -178,7 +178,7 @@
     $userpass = "$self->{'Proxy'}\x00".$self->{'Login'}."\x00".$self->{'Password'};
-    $encode=encode_base64($userpass);
+    $encode=encode_base64($userpass, '');
     print $fh "AUTHENTICATE \"PLAIN\" {$len+}\r\n";


More information about the freebsd-ports-bugs mailing list