Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Managesieve - Roundcube setup help

Hi all,


I've sucessfully got Roundcube up and running using MySQL as detailed here:


http://www.marcoach.nl/index.php/en/tech-tips/55-os-x-mountain-lion-webmail.html



Followed these steps to try and get Managesieve implemented but no luck!


https://discussions.apple.com/thread/4153247?answerId=19157609022#19157609022&ac_cid=tw123456%23191576 09


Filters do not show up when logged in to Roundcube.

telnetting into the server on port 4190 gives the following so I can see there is some sign of life!



Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

"IMPLEMENTATION" "Dovecot Pigeonhole"

"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave"

"NOTIFY" "mailto"

"SASL" "CRAM-MD5 X-PLAIN-SUBMIT LOGIN PLAIN"

"STARTTLS"

"VERSION" "1.0"

OK "Dovecot ready."


Would someone be able to give step by step instructions on how to go about getting it running?


PS - I am using a test user that has no mail in their mailbox BTW - not sure if that makes a difference?


Thanks


Ryan

Posted on Feb 27, 2013 6:23 AM

Reply
21 replies

Mar 7, 2013 7:26 AM in response to UptimeJeff

Hey UptimeJeff


Sure:


/opt/webapps/webmail/config/main.inc.php


$rcmail_config['plugins'] = array('autologon');



/opt/webapps/webmail/plugins/managesieve/config.inc.php


// managesieve server port

$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'] = '127.0.0.1';


// 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

// it's because I've problems with TLS and dovecot's managesieve plugin

// and it's not needed on localhost

$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();


?>

Mar 12, 2013 4:05 AM in response to De Baron 2009

I aIso see the filter but i get an error message when i click on it.

I tried the same configs changes that u made but i get the error message:

Unable to connect to server


the only weird thing i noticed is that i am missing the default.sieve file on my machine:

$rcmail_config['managesieve_default'] = '/var/lib/dovecot/sieve/default.sieve';


i can telnet on port 4190 and get a response:

Escape character is '^]'.

"IMPLEMENTATION" "Dovecot Pigeonhole"

"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave"

"NOTIFY" "mailto"

"SASL" "CRAM-MD5 GSSAPI DIGEST-MD5"

"STARTTLS"

"VERSION" "1.0"

OK "Dovecot ready."


does anyone know what i do wrong?

Mar 12, 2013 5:52 AM in response to RapTile-NL

Hmm, i do see the filters, i can add filters but for some reasons no filter is working.


i added a test filter.

if the subject contains "test" it should move this message to the test folder that i created.


I can't seem to find anything in log files.

Do i look at the wrong log files? (in the server app i check the websites error log)



Do you experience any problems?

Mar 12, 2013 8:23 AM in response to RapTile-NL

@RapTile


Only new mail is filtered.

Your filter looks for "*****SPAM*****" in the subject and moves that message to a SPAM folder.

The SPAM (case sensitive) folder must exist for this to work.


10.8 comes with sieve working, don't worry about missing files.

The managesieve plugin is just an interface to create/modify sieve scripts(filters).


Send yourself mail with the EXACT subject listed in the rule.

Make sure the SPAM folder exists


-AND- this may be the key, in the managesieve filter, where it asks for additional addresses, put the email address in that field even though it says 'additional' it still needs your address even if you have one (in most cases)


Jeff

Mar 12, 2013 10:30 AM in response to UptimeJeff

Hi Jeff,


Thanks for your input.


I've send a test mail with exactly that subject.

Ive send it from gmail so i am sure that the mail comes from the internet and it still comes in the normal inbox folder.


two questions:

- Do u know which config file i have to insert that additional mail address?

- Will this work for all the users retrieving mail of just for that specific email address?


Thanks in advance for your reply.

Mar 12, 2013 10:38 AM in response to RapTile-NL

You shouldn't need to touch the actual sieve script files.


You add a filter via Roundcube/Filters.

Along with whatever criteria you setup for the filter, be sure to enable it and add your email address in the 'Additional Email Addresses' field.


If you have logged into roundcube with user bob

then go to Filters, add/edit a filter, and in the additional email addresses field, add: bob@yourdomain.com

Managesieve - Roundcube setup help

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.