I wondered how to get Dovecot 2 working with ISPConfig 3.0.4, too.
I already had Dovecot 1.2.9 working very reliably with ISPConfig 3.0.4 on Ubuntu 10.04 LTS. But certain Dovecot plug-ins, e.g. Antispam, seem not to work reliably (if at all) with such old versions of Dovecot.
The first challenge was installing Dovecot 2 on Ubuntu 10.04. Fortunately, some kind soul had already built a back-ported package, which made the process pretty simple:
https://launchpad.net/~christian-roe...rchive/dovecot
Here are the required steps, which should upgrade Dovecot to 2.1.9 (I'm using ISPConfig 3.0.4.6):
Code:
# apt-get install python-software-properties
# add-apt-repository ppa:christian-roessner-net/dovecot
# apt-get update
# apt-get dist-upgrade
Perhaps ISPConfig >= 3.0.4.3 generates its own configuration file from a template, but that was not an option for me. (Unless there is some way to force ISPConfig to reconfigure services,
when no upgrade is available; as yet, this question remains unanswered:
http://www.howtoforge.com/forums/showthread.php?t=46329 .)
I let Dovecot do most of the heavy-lifting here. I just fed my old configuration file through Dovecot's configuration updater utility:
Code:
# doveconf -n -c /root/dovecot.old.conf > /etc/dovecot/dovecot.conf
The results were not perfect, but Dovecot resolved, or warned about, almost every issue.
The only "fatal" item that Dovecot was not able to update was
Code:
mail_plugin_dir = /usr/lib/dovecot/modules/lda
to
Code:
mail_plugin_dir = /usr/lib/dovecot/dovecot-lda
Without further ado, here's my configuration file, which seems to work.
(I have Quota and Sieve installed, which is reflected in this configuration; also, be sure to change the paths to the SSL key and certificate, or comment-out those lines. Finally, the protocol lda {"mail_plugin_dir"} value may be architecture-dependent on some systems, so ensure that the path is correct for the given system.)
Code:
auth_mechanisms = plain login
base_dir = /var/run/dovecot/
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = ISPConfig3 IMAP server ready...
mail_gid = 5000
mail_location = maildir:/var/vmail/%d/%n/Maildir
mail_privileged_group = mail
mail_uid = 5000
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve = /var/vmail/%d/%n/.sieve
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
mode = 0600
user = vmail
}
}
service imap {
executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
}
service pop3 {
executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
}
ssl = yes
ssl_cert = </root/ssl/your-ssl.crt
ssl_cipher_list = ALL:!LOW:!SSLv2
ssl_key = </root/ssl/your-ssl.key
verbose_ssl = no
ssl_parameters_regenerate = 168 hours
userdb {
driver = prefetch
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
mail_plugins = quota
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugin_dir = /usr/lib64/dovecot/modules
mail_plugins = sieve quota
postmaster_address = postmaster@my-domain.tld
}
As others have mentioned elsewhere in this thread, it was not necessary to modify
/etc/dovecot/dovecot-sql.conf; it worked "out-of-the-box".
After upgrading Dovecot, you may wish to start it manually (instead of with the init script), which provides additional visibility into any problems:
Code:
# /usr/sbin/dovecot -F -c /etc/dovecot/dovecot.conf
Concerning Sieve, the same gentleman created a back-ported package for Ubuntu 10.04:
Code:
# apt-get install dovecot-pigeonhole
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
liblockfile1 lockfile-progs ntpdate
Use 'apt-get autoremove' to remove them.
Suggested packages:
ufw
The following NEW packages will be installed:
dovecot-pigeonhole
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 718kB of archives.
After this operation, 2265kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/christian-roessner-net/dovecot/ubuntu/ lucid/main dovecot-pigeonhole 0.3.1-3~rns~lucid [718kB]
Fetched 718kB in 0s (810kB/s)
Selecting previously deselected package dovecot-pigeonhole.
(Reading database ... 73905 files and directories currently installed.)
Unpacking dovecot-pigeonhole (from .../dovecot-pigeonhole_0.3.1-3~rns~lucid_amd64.deb) ...
Setting up dovecot-pigeonhole (0.3.1-3~rns~lucid) ...
Creating config file /etc/dovecot/conf.d/20-managesieve.conf with new version
Creating config file /etc/dovecot/conf.d/90-sieve.conf with new version
Sieve seems to work as expected. A cursory test indicates that rules defined through ISPConfig are processed correctly.
I have not yet tested Quota.
I will post again with any corrections or updates.