apt-get update
apt-get install vim lsof net-tools lrzsz wget unzip sudo ntpdate cmake build-essential zlib1g zlib1g-dev libmariadb-dev libmariadb-dev-compat libaio-dev ncurses-dev libstemmer-dev libexttextcat-data libssl-dev libkrb5-dev libdb-dev m4 libpam0g-dev
useradd -M -s /sbin/nologin dovecot
useradd -M -s /sbin/nologin dovenull
useradd -M -s /sbin/nologin dovecotmail
useradd -M -s /sbin/nologin dovecotauth
useradd -M -s /sbin/nologin vmail
安装clucene
tar -zxvf clucene-core-2.3.3.4.tar.gz
cd clucene-core-2.3.3.4/
cmake CMakeLists.txt
make
make install
cd /etc/ld.so.conf.d/
vim clucene.conf
ldconfig
安装dovecot(支持MySQL mariadb驱动)
tar -zxvf dovecot-2.3.9.2.tar.gz
cd dovecot-2.3.9.2
./configure --prefix=/home/mail/dovecot/ --exec-prefix=/home/mail/dovecot/ --with-lucene --with-stemmer --with-mysql --with-zlib --with-ssl=openssl --with-gssapi=yes
make
make install
安装sieve
tar -zxvf dovecot-2.3-pigeonhole-0.5.9.tar.gz
cd dovecot-2.3-pigeonhole-0.5.9
./configure --with-dovecot=/home/mail/dovecot/lib/dovecot
make
make install