From iRedMail
This tutorial is for only RHEL/CentOS 5.x, Debian 5.
Install Dovecot 1.2
on RHEL/CentOS 5
Dovecot 1.2 is available in another iRedMail yum repository, you should add this yum repository in /etc/yum.repos.d/iRedMail.repo and then install it via yum command:
| File: /etc/yum.repos.d/iRedMail.repo
|
[iRedMail-Dovecot-12]
name=iRedMail-Dovecot-12
baseurl=http://iredmail.org/yum/rpms/dovecot/
enabled=1
gpgcheck=0
priority=1
|
Be aware of below steps, we will update dovecot config based on config file of dovecot-1.1.
| Terminal:
|
# cp /etc/dovecot.conf /etc/dovecot-1.1.conf
# rpm -e dovecot dovecot-sieve
warning: /etc/logrotate.d/dovecot saved as /etc/logrotate.d/dovecot.rpmsave
warning: /etc/dovecot.conf saved as /etc/dovecot.conf.rpmsave
# yum install dovecot dovecot-sieve dovecot-managesieve
# cp /etc/dovecot.conf /etc/dovecot-1.2.conf
# cp /etc/dovecot-1.1.conf /etc/dovecot.conf
|
Package dovecot-managesieve provides 'managesieve' service, so we don't need pysieved anymore. Disable it:
| Terminal:
|
# chkconfig --level 345 pysieved off
# /etc/init.d/pysieved stop
|
on Debian 5
Append below line to /etc/apt/sources.list:
| File: /etc/apt/sources.list
|
deb http://backports.debian.org/debian-backports lenny-backports main
|
Install Dovecot 1.2:
| Terminal:
|
$ sudo apt-get -t lenny-backports update
$ sudo apt-get -t lenny-backports upgrade dovecot-imapd dovecot-pop3d
|
Update Dovecot configure
We need to update Dovecot config file dovecot.conf, it's /etc/dovecot.conf on RHEL/CentOS, /etc/dovecot/dovecot.conf on Debian 5.
- Remove umask. It wasn't really used anywhere anymore.
- Remove all zlib plugin. It's buggy in 1.x and will be fixed only in 2.x.
- Change sieve plugin name cmusieve to sieve in protocol lda {} section.
- Change ssl_disable=no to ssl=yes.
- [For MySQL backend] Add two more columns in vmail.mailbox if not present:
| Terminal:
|
$ mysql -uroot -p
mysql> USE vmail;
mysql> ALTER TABLE mailbox ADD COLUMN enablesieve TINYINT(1) NOT NULL DEFAULT '1';
mysql> ALTER TABLE mailbox ADD COLUMN enablesievesecured TINYINT(1) NOT NULL DEFAULT '1';
|
- [For RHEL/CentOS] Append managesieve service related config:
| File: dovecot.conf
|
# ManageSieve service. http://wiki.dovecot.org/ManageSieve
protocol managesieve {
listen = 127.0.0.1:2000
}
# Plugin: sieve. ttp://wiki.dovecot.org/LDA/Sieve
plugin {
#sieve_global_path =
#sieve_global_dir =
#sieve_before = /var/vmail/sieve/dovecot.sieve
#sieve_after =
sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
sieve_dir = /var/vmail/sieve/%Ld/%Ln/
}
|
Append "managesieve" in "protocols = ", like this:
| File: dovecot.conf
|
protocols = pop3 pop3s imap imaps managesieve
|
- [For Debian 5 (lenny)] Move sieve = and sieve_storage = from section protocol managesieve {} to section plugin {}, and rename sieve_storage to sieve_dir:
| File: dovecot.conf
|
plugin {
sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
sieve_dir = /var/vmail/sieve/%Ld/%Ln/
# ... SKIP OTHER SETTINGS HERE ...
}
|