How to Install and Configure vpopmail on Centos


Vpopmail

What is vpopmail?

vpopmail may be a virtual mail backend system. it's designed to figure in conjunction with qmail's virtual domain implementation. vpopmail supports varied backends to store user and domain configuration like MySQL, PostgreSQL, LDAP et al..

Why vpopmail?

vpopmail provides an honest set of management tools and a fairly elegant structure that saves you implementing your own. vpopmail has conjointly been around for an extended time and enjoys support from plenty of alternative software package packages associated with mail that makes integration fairly easy.

What is this howto all about?

This howto can give directions on a way to install vpopmail with MySQL information support and integrate it with varied items of software package associated with email as well as bound packages that go with CentOS four.

Installation necessities

An put in instance of qmail since vpopmail is tied to qmail. The mysql-devel package should be put in too so as to compile vpopmail with MySQL support.

If you are doing not have a qmail instance put in, then you'll be able to follow the subsequent directions to urge one. However, this a way to doesn't upset qmail. Please see the qmail-toaster web site (http://www.qmailtoaster.com/) for a qmail + vpopmail setup.

Download the qmail supply tarball at http://cr.yp.to/software/qmail-1.03.tar.gz

Extract the ASCII text file.

Preparation for collecting involves adding 2 teams and seven user accounts employed by qmail.


mkdir /var/qmail
groupadd nofiles
useradd -s /sbin/nologin -g nofiles -d /var/qmail/alias alias
useradd -s /sbin/nologin -g nofiles -d /var/qmail qmaild
useradd -s /sbin/nologin -g nofiles -d /var/qmail qmaill
useradd -s /sbin/nologin -g nofiles -d /var/qmail qmailp
groupadd qmail
useradd -s /sbin/nologin -g qmail -d /var/qmail qmailq
useradd -s /sbin/nologin -g qmail -d /var/qmail qmailr
useradd -s /sbin/nologin -g qmail -d /var/qmail qmails
Change directory into the qmail ASCII text file directory. (cd qmail-1.0.3)

Put 'gcc -O2 -include /usr/include/errno.h' into the conf-cc file.

Run 'make setup check' to compile qmail and install a qmail instance

Run './config-fast localhost' to try to to the terribly minimum configuration of qmail required for vpopmail.

You currently have a qmail instance which will satisfy vpopmail's necessities.

Building vpopmail with mysql support

Download the vpopmail supply from sourceforge. This howto deals with version five.4.17. http://sourceforge.net/project/showfiles.php?group_id=85937.

vpopmail commonly uses uid eighty nine and gid eighty nine however since affix uses each, we want to use others. uid ninety one and gid ninety one.


groupadd -g ninety one vchkpw
useradd -g vchkpw -u ninety one vpopmail
Extract the ASCII text file from the tarball and alter directory into the ASCII text file directory.


 ./configure --enable-mysql-replication --enable-sql-logging --enable-auth-module=mysql --disable-users-big-dir --enable-valias
This will provide North American country the choice to use a master MySQL server wherever writes for work, user/domain creation square measure sent and mysql slaves that square measure used just for reading user/domain info by vpopmail and alternative software package through its library. --enable-valias tells vpopmail to store email aliases during a MySQL information instead of .qmail files that we'll not be exploitation. All email addresses are hold on in one single table during this setup and aliases during a separate table.


make
Installing and configuring vpopmail for MySQL


make install/make install-strip
MySQL settings for vpopmail square measure hold on within the file /home/vpopmail/etc/vpopmail.mysql. associate degree example will be found below for one MySQL information instance.


# MYSQL association SETTINGS FOR VPOPMAIL
#
# Line one defines the association to use for information reads,
# Line two defines the association to use for information updates/writes.
#
# If you omit line two, then a similar settings are
# used for each scan and write.
#
# settings for every line:
# host|port|user|password|database
#
localhost|0|vpopmail|vpopmailpass|vpopmail
#
# Note:
# the worth of host could also be either a hostname or associate degree scientific discipline address.
#   If host is 'localhost', then sockets (Unix) or named pipes (Windows)
# are used rather than TCP/IP to attach to the server.

vpopmail binaries square measure put in in /home/vpopmail/bin. they must be run with root once adding or deleting users/domains since they're going to amendment files underneath /var/qmail/control. you would like to form the vpopmail information and grant access thereto before exploitation vpopmail.

Installation of vpopmail is currently complete.

Glue for software package that don't support vpopmail directly

courier software package and vpopmail have an extended history along. The traveller authentication library is supported by plenty of mail connected software package that don't directly support vpopmail. It will so give the glue between vpopmail and these software package like drop. you'll be able to transfer courier-authlib and drop from http://sourceforge.net/project/showfiles.php?group_id=5404

courier-authlib
courier software package won't compile underneath the basis account. Also, to urge courier-authlib to select vpopmail libraries, you would like to be ready to access them throughout the configuration of the build method. it's instructed so that you just use the vpopmail user for the build method of courier-authlib. The courier-authlib supply desires atiny low patch to create it absolutely use vpopmail: courier-authlib-vpopmail.patch.


patch -p1 < courier-authlib-vpopmail.patch
cd courier-authlib-0.58
./configure --prefix=/usr/lib/courier --with-redhat \ --with-mailuser=vpopmail --with-mailgroup=vchkpw \ --with-mysql-libs=/usr/lib/mysql \ --with-mysql-includes=/usr/include/mysql
make
make install
make install-configure

0 comments:

Post a Comment