打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
vpopmail

Vpopmail

What is vpopmail?

vpopmail is a virtual mail backend system. It is designed to work in conjunction with qmail‘s virtual domain implementation. vpopmail supports various backends to store user and domain configuration such as MySQL, PostgreSQL, LDAP and others.

Why vpopmail?

vpopmail provides a good set of management tools and a reasonably well designed structure which saves you implementing your own. vpopmail has also been around for a long time and enjoys support from a lot of other software packages related to mail which makes integration fairly simple.

What is this howto all about?

This howto will provide instructions on how to install vpopmail with MySQL database support and integrate it with various pieces of software related to email including certain packages that come with CentOS 4.

Installation requirements

An installed instance of qmail since vpopmail is tied to qmail. The mysql-devel package must be installed too in order to compile vpopmail with MySQL support.

If you do not have a qmail instance installed, then you can follow the following instructions to get one. However, this how to does not deal with qmail. Please see the qmail-toaster website (http://www.qmailtoaster.com/) for a qmail + vpopmail setup.

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

Extract the source code.

Preparation for compiling involves adding two groups and 7 user accounts used by qmail.

mkdir /var/qmailgroupadd nofilesuseradd -s /sbin/nologin -g nofiles -d /var/qmail/alias aliasuseradd -s /sbin/nologin -g nofiles -d /var/qmail qmailduseradd -s /sbin/nologin -g nofiles -d /var/qmail qmailluseradd -s /sbin/nologin -g nofiles -d /var/qmail qmailpgroupadd qmailuseradd -s /sbin/nologin -g qmail -d /var/qmail qmailquseradd -s /sbin/nologin -g qmail -d /var/qmail qmailruseradd -s /sbin/nologin -g qmail -d /var/qmail qmails

Change directory into the qmail source code 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 do the very minimum configuration of qmail needed for vpopmail.

You now have a qmail instance that will satisfy vpopmail‘s requirements.

Building vpopmail with mysql support

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

vpopmail normally uses uid 89 and gid 89 but since Postfix uses both, we need to use others. uid 91 and gid 91.

groupadd -g 91 vchkpwuseradd -g vchkpw -u 91 vpopmail

Extract the source code from the tarball and change directory into the source code directory.

 ./configure --enable-mysql-replication --enable-sql-logging --enable-auth-module=mysql --disable-users-big-dir --enable-valias

This will give us the option to use a master MySQL server where writes for logging, user/domain creation are sent and mysql slaves that are used only for reading user/domain information by vpopmail and other software through its library. --enable-valias tells vpopmail to store email aliases in a MySQL database rather than .qmail files which we will not be using. All email addresses will be stored in one single table in this setup and aliases in a separate table.

make

Installing and configuring vpopmail for MySQL

make install/make install-strip

MySQL settings for vpopmail are stored in the file /home/vpopmail/etc/vpopmail.mysql. An example can be found below for a single MySQL database instance.

# MYSQL CONNECTION SETTINGS FOR VPOPMAIL## Line 1 defines the connection to use for database reads,# Line 2 defines the connection to use for database updates/writes.## If you omit line 2, then the same settings will be# used for both read and write.## settings for each line:# host|port|user|password|database#localhost|0|vpopmail|vpopmailpass|vpopmail## Note:#   The value of host may be either a hostname or an IP address.#   If host is ‘localhost‘, then sockets (Unix) or named pipes (Windows)#   will be used instead of TCP/IP to connect to the server.

vpopmail binaries are installed in /home/vpopmail/bin. They should be run with root when adding or deleting users/domains since they will change files under /var/qmail/control. You need to create the vpopmail database and grant access to it before using vpopmail.

Installation of vpopmail is now complete.

Glue for software that do not support vpopmail directly

courier software and vpopmail have a long history together. The courier authentication library is supported by a lot of mail related software that do not directly support vpopmail. It can thus provide the glue between vpopmail and these software such as maildrop. You can download courier-authlib and maildrop from http://sourceforge.net/project/showfiles.php?group_id=5404

courier-authlib

courier software will not compile under the root account. Also, to get courier-authlib to pick vpopmail libraries, you need to be able to access them during the configuration of the build process. It is suggested therefore that you use the vpopmail user for the build process of courier-authlib. The courier-authlib source needs a small patch to make it fully use vpopmail: courier-authlib-vpopmail.patch.

patch -p1 < courier-authlib-vpopmail.patchcd 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/mysqlmakemake installmake install-configure

You can use this sample authdaemond sysvinit script that supports chkconfig to enable the service: authdaemond

HowTos/vpopmail (2007-03-02 06:01:05由FeiZhou编辑)
 
 
 
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
超级无敌qmail安装大法,详尽之极!
qmail安装(比较全的文章)
Postfix邮箱【二】安装Postfix后台
CentOS5.3+Nginx0.7.57+Postfix+Extmail邮件系统安装 -...
CentOS7下搭建postfix邮件服务器实现extmail的web访问
linux下安装postfix邮件系统(二)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服