Guide updated on 29th of February 2016

Install Vpopmail


Vpopmail is one of the major components of this installation. Vpopmail allows us to do virtual domain mail hosting. It's got a lot of built in tools and features that make it a dream to work with. Even if you don't want to host mail for multiple domains, I would still recommend installing Vpopmail. It just makes the whole mail game easier. Plus, this installation centers around it, so if you don't install it you're going to have a headache.

Create the needed Database.

The used MySQL_root_password should be the password chosen on pre-step 3. It's should not be the same as the password for vpopmailuser (VPOPMAIL_PASSWORD).

It's not a typo, the MySQL_root_password should really be just aside the -p

mysql -pMySQL_root_password

CREATE DATABASE vpopmail;
GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmailuser@localhost IDENTIFIED BY 'VPOPMAIL_PASSWORD';
FLUSH PRIVILEGES;
quit;

Test your the account you have just created

mysql -uvpopmailuser -pVPOPMAIL_PASSWORD

You should have such response

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1073
Server version: 5.5.47-0+deb8u1 (Debian)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>exit;

Prepare the installation

mkdir -p /home/vpopmail/etc
chown -R vpopmail:vchkpw /home/vpopmail
chmod 770 /home/vpopmail
cd /home/vpopmail/etc

Do not forget to put your OWN chosen MySQL password for vpopmailuser (refered as VPOPMAIL_PASSWORD in this guide)

echo "localhost|0|vpopmailuser|VPOPMAIL_PASSWORD|vpopmail" > ~vpopmail/etc/vpopmail.mysql
chown vpopmail:vchkpw ~vpopmail/etc/vpopmail.mysql
chmod 640 ~vpopmail/etc/vpopmail.mysql

Install Vpopmail

cd /downloads/
tar zxvf vpopmail-5.4.33.tar.gz
cd /downloads/vpopmail-5.4.33

./configure \
--enable-qmaildir=/var/qmail/ \
--enable-qmail-newu=/var/qmail/bin/qmail-newu \
--enable-qmail-inject=/var/qmail/bin/qmail-inject \
--enable-qmail-newmrh=/var/qmail/bin/qmail-newmrh \
--enable-tcprules-prog=/usr/bin/tcprules \
--enable-tcpserver-file=/etc/tcp.smtp \
--enable-clear-passwd \
--enable-many-domains \
--enable-valias \
--enable-qmail-ext \
--enable-logging=p \
--enable-auth-logging \
--enable-sql-logging \
--enable-auth-module=mysql \
--enable-incdir=/usr/include/mysql \
--enable-libdir=/usr/lib/ \
--disable-mysql-limits \
--disable-roaming-users \
--disable-passwd

make && make install-strip

You can find HERE all compilation options.

Note that vpopmail is not configured here with spamassassin option. This is is due to the fact spamassassin will be used during the SMTP conversation thanks to Simscan. Nevertheless, if you want spamassasisn to be used during local delivery to Maildir (=to mailbox), just add the configuration option --enable-spamassassin

This file modification is needed to avoid a segmentation fault in some case

cat > ~vpopmail/etc/vusagec.conf << __EOF__
Server:
    Disable = True;
__EOF__

Put binaries into $PATH variable

echo 'export PATH=$PATH:/var/qmail/bin/:/home/vpopmail/bin/' > /etc/profile.d/extrapath.sh
chmod +x /etc/profile.d/extrapath.sh
source /etc/profile

Install Vqadmin


Users comments