Author Topic: Geting managesieve working on Mountain Lion Server  (Read 6258 times)

Offline PaSav

  • Newbie
  • *
  • Posts: 6
Geting managesieve working on Mountain Lion Server
« on: May 04, 2013, 10:11:42 AM »
Hi,

I have trouble getting managesieve working on my ML Server.
I run 10.8.3 and RC 0.9.0

I see the filters in my RC, but when i click on it it keeps saying can't connect to manage_sieve server.

I tryed already everything i could find, nothing seems working.
What els do you need to know ?

config.inc.php :

<?php

// managesieve server port. When empty the port will be determined automatically
// using getservbyname() function, with 4190 as a fallback.
$rcmail_config['managesieve_port'] = 4190;

// managesieve server address, default is localhost.
// Replacement variables supported in host name:
// %h - user's IMAP hostname
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
$rcmail_config['managesieve_host'] = 'services.domein.com';

// authentication method. Can be CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, EXTERNAL
// or none. Optional, defaults to best method supported by server.
$rcmail_config['managesieve_auth_type'] = CRAM-MD5;

// Optional managesieve authentication identifier to be used as authorization proxy.
// Authenticate as a different user but act on behalf of the logged in user.
// Works with PLAIN and DIGEST-MD5 auth.
$rcmail_config['managesieve_auth_cid'] = null;

// Optional managesieve authentication password to be used for imap_auth_cid
$rcmail_config['managesieve_auth_pw'] = null;

// use or not TLS for managesieve server connection
// Note: tls:// prefix in managesieve_host is also supported
$rcmail_config['managesieve_usetls'] = false;

// default contents of filters script (eg. default spam filter)
$rcmail_config['managesieve_default'] = '/var/lib/dovecot/sieve/default.sieve';

// The name of the script which will be used when there's no user script
$rcmail_config['managesieve_script_name'] = '';

// Sieve RFC says that we should use UTF-8 endcoding for mailbox names,
// but some implementations does not covert UTF-8 to modified UTF-7.
// Defaults to UTF7-IMAP
$rcmail_config['managesieve_mbox_encoding'] = 'UTF-8';

// I need this because my dovecot (with listescape plugin) uses
// ':' delimiter, but creates folders with dot delimiter
$rcmail_config['managesieve_replace_delimiter'] = '';

// disabled sieve extensions (body, copy, date, editheader, encoded-character,
// envelope, environment, ereject, fileinto, ihave, imap4flags, index,
// mailbox, mboxmetadata, regex, reject, relational, servermetadata,
// spamtest, spamtestplus, subaddress, vacation, variables, virustest, etc.
// Note: not all extensions are implemented
$rcmail_config['managesieve_disabled_extensions'] = array();

// Enables debugging of conversation with sieve server. Logs it into <log_dir>/sieve
$rcmail_config['managesieve_debug'] = true;

// Enables features described in http://wiki.kolab.org/KEP:14
$rcmail_config['managesieve_kolab_master'] = false;

// Script name extension used for scripts including. Dovecot uses '.sieve',
// Cyrus uses '.siv'. Doesn't matter if you have managesieve_kolab_master disabled.
$rcmail_config['managesieve_filename_extension'] = '.sieve';

// List of reserved script names (without extension).
// Scripts listed here will be not presented to the user.
$rcmail_config['managesieve_filename_exceptions'] = array();

?>

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Geting managesieve working on Mountain Lion Server
« Reply #1 on: May 04, 2013, 10:30:26 AM »
// authentication method. Can be CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, EXTERNAL
// or none. Optional, defaults to best method supported by server.
$rcmail_config['managesieve_auth_type'] = CRAM-MD5;
This is wrong, the option value should be in quotes (single or double). Also, you have enabled debug option. Check logs what they say.

Offline PaSav

  • Newbie
  • *
  • Posts: 6
Re: Geting managesieve working on Mountain Lion Server
« Reply #2 on: May 04, 2013, 10:36:19 AM »
You are right. That was the tric ... ARCHHHHHH :-[ :-[ :-[ :-[

Looked to long to the config files .. ;-)

THXS !

Offline Matt_D

  • Newbie
  • *
  • Posts: 7
Re: Geting managesieve working on Mountain Lion Server
« Reply #3 on: June 23, 2013, 09:05:01 PM »
This didn't work for me on 0.9.2.

I did do a quick check on things, and noticed that roundcube 0.9.2's plugin for managesieve insists on authenticating over DIGEST-MD5 and CRAM-MD5, even if you specify CRAM-MD5 in the config file.  This seems to be what's broken.

I cannot seem to track down the offending source file though to patch it...any ideas?

Offline Matt_D

  • Newbie
  • *
  • Posts: 7
Re: Geting managesieve working on Mountain Lion Server
« Reply #4 on: June 23, 2013, 09:17:47 PM »
For some reason, on my config, the functions in Sieve.php seem to return values that suggest my server supports DIGEST-MD5 when in fact it doesn't.

You can workaround the issue by removing the DIGEST-MD5 as a supported type in class Net_Sieve, but this seems to be a bit of a brute force mechanism to solve what should be a simpler problem.  I'm fresh out of ideas on why this happening, any suggestions?