wget http://www.ex-parrot.com/~chris/tpop3d/tpop3d-1.5.3.tar.gz
tar zxvf tpop3d-1.5.3.tar.gz
cd tpop3d-1.5.3
./configure --enable-mbox-maildir --enable-mbox-bsd --enable-tls --disable-auth-pam \
--enable-auth-mysql --with-mysql-include-dir=/usr/local/mysql/include \
--with-mysql-lib-dir=/usr/local/mysql/lib
(注:--enable-tls打开ssl支持,确认已安装openssl,如果不是安装在默认目录,再加上--with-openssl-root参数指定openssl所安装的目录)
make
make install
这时会出现:
configure: error: vmail-sql authentication enabled, but mysql_init doesn't seem to be available.
错误信息。
vi configure,找到
eval "ac_cv_lib_$ac_lib_var=\"mysqlclient \"" ,更改为:
eval "ac_cv_lib_$ac_lib_var=\"mysqlclient -lz \""
然后:
./configure --enable-mbox-maildir --enable-mbox-bsd --enable-tls --disable-auth-pam \
--enable-auth-mysql --with-mysql-include-dir=/usr/local/mysql/include \
--with-mysql-lib-dir=/usr/local/mysql/lib
make
make install
这样就安装完成带Mysql验证的tpop3d,
修改/usr/local/etc/tpop3d.conf文件(如果没有,执行:cp tpop3d.conf.sample /usr/local/etc/tpop3d.conf):
#
# MySQL authentication options
#
# auth-mysql-enable: (yes | true)
# Enable MySQL authentication.
auth-mysql-enable: true
# auth-mysql-mail-group: (group-name | gid)
# The group name or gid under which access to the mailspool will take place.
# [default: group of user associated with virtual domain]
auth-mysql-mail-group: vmail
# auth-mysql-hostname: hostname [[hostname] hostname] ..
# Host on which to connect to MySQL. Tried in order until a working host is
# found. [default: localhost]
auth-mysql-hostname: localhost
# auth-mysql-database: database
# MySQL database to use for authentication.
auth-mysql-database: yourdatabase
# auth-mysql-username: username
# MySQL username used to access the database.
auth-mysql-username: yourusername
# auth-mysql-password: password
# Password of MySQL user.
auth-mysql-password: yourpassword
# auth-mysql-pass-query: substitution string
# Query template to use for USER/PASS authentication. Must return mailpath,
# password, userid, mailspool type; uses substitution variables as described
# in the man page.
#auth-mysql-pass-query: SELECT mailpath, password, userid, spooltype FROM ...
auth-mysql-pass-query: SELECT CONCAT('/var/mail/', maildir), \
CONCAT('{crypt}', password), \
'vmail', 'bsd' \
FROM mailbox \
WHERE username = CONCAT('$(local_part)', '@', '$(domain)')
由于没有使用vmail-sql中的数据库schema,则要将auth-mysql-pass-query配置参数修改成符合你本地数据库schema的查询条件。详细情况参见:
http://www.ex-parrot.com/~chris/tpop3d/tpop3d.conf.5.html 的A note on MySQLauthentication部分
分享到:
相关推荐
Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql编译安装Mysql...
MySQL8.0编译安装方法介绍,欢迎下载
CentOS编译安装MYSQL5.6.17---验证成功
Centos_6.3_编译安装Nginx+php+Mysql,基础文档
使用cmake编译安装mysql,此cmake支持编译安装mysql5.6版本
mysql5.6编译安装.
mysql8编译安装步骤 详细记录了如何一步步从源码安装mysql8
MySQL 5.7.17源码编译安装详解
linux下源码编译安装mysql-5.6.25版本
linux下使用cmake编译安装mysql,并附有mysql修改初始密码与连接地址等信息。
1.编译安装路径:/usr/local/mysql 2.version:5.6.36
普通用户 编译安装apche+php mysql
debian编译安装mysql5.7.35.txt 编译安装更稳定! 每一行复制执行即可完成安装!
MySQL5.6实战部署,编译安装MySQL5.6.22,编译参数详解
linux环境下的mysql编译安装的过程,只要按照我的方法进行,就不会出错,前提示你的linux可以安装yum源,否则无法编译安装
useradd -g mysql mysql -s /bin/false #创建用户mysql并加入到mysql组,不允许mysql用户直接登录系统 mkdir -p /data/mysql #创建MySQL数据库存放目录 chown -R mysql:mysql /data/mysql #设置MySQL数据库存放...
mysql-5.7.16 for linux 免编译安装方式,实际测试验证,毫无问题,安装快速耗时短。
详细的编译安装php,mysql,apache以及它们配置的文档
MySQL编译安装、主从复制的配置(CentOS-6.6+MySQL-5.6)