Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

ManageSieve with Dovecot on Centos 5.4

My recent project is to establish a local mailing system with a webmail client, and end up using RoundCubeMail on my Centos 5.4 using the Postfix and Dovecot. Crossing various articles on the Internet gives me some idea on capturing the gmail like email message filtering. ManageSieve is a plugin for Dovecot with Sieve, also roundcubemail has this neat managesieve interface plugin.

Note that this howto, will not tackle topics on dovecot installation and configuring the roundcubemail. The scope will only include: recompiling sources, configuring plugins for dovecot and roundcubemail. I hope this guide helps you.

1.Install them using the normal rpm install command: rpm -Uhiv


2.Configure the dovecot accordingly to your plan (normal posix or virtual user).
3.After checking that your new dovecot IMAP and POP3 works fine, extract the sources of dovecot, dovecot-sieve.

 #> cd /usr/src/redhat/SOURCES 
 #> tar xvfz dovecot-1.2.10.tar.gz 
 #> tar xvfz dovecot-1.2-sieve-0.1.15.tar.gz 
 #> tar xvfz dovecot-1.2-managesieve-0.11.11.tar.gz 

4.Then patch the dovecot with dovecot-1.2.10-managesieve-0.11.11.diff.gz which provided by the dovecot-1.2.10-2_107.el5.i386.rpm.

 #> cd /usr/src/redhat/SOURCES/dovecot-1.2.10 
 #> gzip -dc ../dovecot-1.2.10-managesieve-0.11.11.diff.gz  | patch -p1 

5.After the patch recompile the dovecot source.

#> ./configure 
#> make 
#> make install 

6.Compile and configure Sieve

#> cd /usr/src/redhat/SOURCES/dovecot-1.2-sieve-0.1.15 
#> ./configure –with-dovecot = ../dovecot-1.2.10/ 
#> make
#> make install 

7.Configure the protocol lda section in /etc/dovecot.conf with this settings:

protocol lda { 
 # Support for dynamically loadable plugins. mail_plugins is a space separated 
 # list of plugins to load. 
 mail_plugins = sieve # ... other plugins like quota 

8.Then finally compile the managesieve with dovecot and dovecot-seive

#> cd /usr/src/redhat/SOURCES/dovecot-1.2-managesieve-0.11.11 
#> ./configure –with-dovecot=../dovecot-1.2-10/  \ 
    --with-dovecot-sieve= ../dovecot-1.2-sieve-0.1.15 
#> make 
#> make install

9.Configure the managesieve on /etc/dovecot.conf

# Start imap, imaps, pop3 and managesieve services 
protocols = imap imaps pop3 managesieve 
protocol managesieve { 
 # Specify an alternative address:port the daemon must listen on 
 # (default: *:2000) 
 #listen = localhost:2000 
 managesieve_logout_format = bytes ( in=%i : out=%o ) 
 mail_executable = /usr/local/libexec/dovecot/managesieve 
 login_executable =  /usr/local/libexec/dovecot/managesieve-login 
 # Verify the location of binary of managesieve and managesieve-login 
plugin { 
 # Used by both the Sieve plugin and the ManageSieve protocol 

10.Then to enable the managesieve plugin for roundcubemail:

// List of active plugins (in plugins/ directory) 
$rcmail_config['plugins'] = array('managesieve'); 

11. Restart your dovecot and open your email account using roundcube to verify if the plugins is now working in good shape.


3 responses to “ManageSieve with Dovecot on Centos 5.4

  1. Vimalkumar April 20, 2010 at 5:46 am

    Respected sir,

    I’ve installed Dovecot using yum command, and now i like to implement Dovecot Managesieve plugin. I would like to know how to install managesieve plugin. Please help me regarding this.
    Thank you in advance.

  2. Vanessa May 12, 2010 at 12:55 am

    Sweet!! It was bugging the crap out of me that dovecot couldn’t be upgraded to the new version in CentOS 5.4. I just made adjustments for the x85_64 version and bada bing! Works a treat.
    Just one thing though,
    “./configure –with-dovecot = ../dovecot-1.2.10/” should read:

    “./configure –with-dovecot=../dovecot-1.2.11/”
    (1.2.11 in my case but you get the gist)

  3. Vanessa May 12, 2010 at 12:56 am

    …. er “x86_64”. I need coffee I think.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: