[CentOS] sieveshell fails to start on CentOS 6.0

Wed Jun 12 06:26:33 UTC 2013
Gerard <gerard at gerardmillar.com>

Harold Pritchett <harold at ...> writes:

> 
> 
>     On 8/11/2011 7:00 PM, Devin Reade wrote:
>     
>       --On Wednesday, August 10, 2011 01:52:21 PM -0400 Harold Pritchett
> <harold at uga.edu> wrote:
> 
> 
>       
>         [harold <at> newmick ~]$ sieveshell localhost
> connecting to localhost
> unable to connect to server at /usr/bin/sieveshell line 170.
> 
>       
>     
>     As an aid to finding out what was happening, I dropped a blank drive
>     into this system
>     and installed CentOS 5.6 in place of 6.0.  Did a quick upgrade to
>     5.7 and then configured
>     and started the following subsystems, exactly the same way I had
>     done with 6.0
> cyrus-imap
>       cyrus saslauthd
>       openldap
>     [harold <at> newmick ~]$ sieveshell localhost
>       connecting to localhost
>       Please enter your password: 
>       > put sieve
>       > list
>       sieve 
>       > activate sieve
>       > list    
>       sieve  <- active script
>       > quit
>       [harold <at> newmick ~]$ 
>     And, so, it works.  I am building this server to replace my existing
>     mail/web/database server
>     which is running Fedora release 9 (Sulphur).  I wanted to upgrade to
>     the latest version of
>     CentOS, but it looks to me that it's just not ready for prime time. 
>     So, I'll just go to 5.7 and
>     be supported again.
>     Thanks for the help, even if we never got it to work.
>     Harold
> 
> 
> _______________________________________________
> CentOS mailing list
> CentOS at ...
> http://lists.centos.org/mailman/listinfo/centos
> 


I had the same issue and couldn't seem to fix after Googling so I tried
doing random stuff. My OS was CentOS 6.4 and was getting the same error as you.

That error code looked like a connection error as the python class fails to
instansiate a socket.

A telnet localhost 4190 revealed -

[root at xxxxx ~]# telnet localhost 4190
Trying ::1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.3.16-Fedora-RPM-2.3.16-6.el6_2.5"
"SASL"
"SIEVE" "comparator-i;ascii-numeric fileinto reject vacation imapflags
notify envelope relational regex subaddress copy"
OK

Where most configurations has "SASL" "PLAIN"

A sivtest command also spat out something along the lines of no
authentication mechanisms left. Even though I know my SASL demon and IMAP
was working perfectly.

How I solved the problem was sperating the sieve config from the imapd.conf

In my /etc/cyrus.conf I changed sieve file to read -

sieve cmd="timsieved -C /etc/sieve-local.conf" listen="localhost:sieve"
prefork= 10

This points to a file that follows the same format as /etc/imapd.conf

I then copied over similar stuff I thought relavent for sieve -

/etc/sieve-local.conf

postmaster: postmaster
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus
allowanonymouslogin: no
allowplaintext: yes
sasl_mech_list: PLAIN
servername: servername
autocreatequota: 10000
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
sieve_maxscriptsize: 32
sieve_maxscripts: 5

Many of these were a direct copy & paste job from /etc/imapd.conf but when
imap was in one config file and sieve in another it all seemed to work alot
better. I also took off all the TLS stuff for sieve in the config file
because im communicating via localhost and thus no reason to encrypt.

Might not work for you if you want to manage sieve from a remote host. But
for me this did the job.