Çarşamba, Mayıs 28, 2014

Sieve and managesieve on redhat EL 6 with Dovecot 2.0.9

Last time , I applied LDA deliverey on our MTA instead of procmail.

let's try to add sieve funtions to dovecot.

first, stop everything :)

# service stop postfix

# service stop dovecot

after that you must install dovecot pigeonhole with

yum install dovecot-pigeonhole

after that, go to dovecot/conf.d directory.
1. Edit your 15-lda.conf file and 
uncomment plugins parameter in protocol lda seciton:

mail_plugins = $mail_plugins sieve 

We have aditional two files in here for sieve configuration, 20-managesieve.conf and 90-sieve.conf.

2. Go to 90-sieve.conf file and edit parameters below:

sieve = /var/sieve-scripts/%u.sieve
sieve_dir = /home/vmail/domains/sieve/%n/.sieve
 %u user     full username (e.g. user@domain)
 %n username user part in user@domain, same as %u if there's no domain
 %d domain   domain part in user@domain, empty if user with no domain

3. In 20-managesieve.conf file uncomment

  protocols = $protocols sieve


 inet_listener sieve {
    port = 4190

lines and add this parameters end of  file
plugin {
  # Used by both the Sieve plugin and the ManageSieve protocol
  sieve = /var/sieve-scripts/%u.sieve  
  sieve_dir = /home/vmail/domains/sieve/%n/.sieve

* Our mail_location is mbox:/home/vmail/domains/%d/%u and there is no mail_home config parameter. Home directory is come form OpenLDAP field (Jamm schema)

and scripts folder is like this.
drwxr-xr-x 2 vmail vmail 4096 May 28 14:43 /var/sieve-scripts 

And start everything
# service start postfix
# service start dovecot

I suggest , you must do change delivery method to LDA , so after that install sieve things. If you have any webmail interface like roundcube, afterlogic , you can install managesieve plugin or filter plugin than you can start create your filters.