(一)安装 courier-authlib

#tar jxvf courier-authlib-0.62.4.tar.bz2
#cd courier-authlib-0.62.4

#./configure --prefix=/usr/local/courier-authlib --without-stdheaderdir --without-authuserdb --without-authpam --without-authldap --without-authpwd --without-authshadow --without-authvchkpw --without-authpgsql --without-authcustom --with-authmysql  --with-mysql-libs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql --with-redhat --with-mailuser=vuser --with-mailgroup=vgroup

#make
#make install
#make install-migrate
#make install-configure

#echo "/usr/local/courier-authlib/lib/courier-authlib" >> /etc/ld.so.conf

#/sbin/ldconfig
#/sbin/ldconfig -v

#cp courier-authlib.sysvinit /etc/rc.d/init.d/courier-authlib
#chmod 755 /etc/rc.d/init.d/courier-authlib

#cd ..
#rm -rf courier-authlib-0.62.4

#cd /usr/local/courier-authlib/etc/authlib/

#vi authmysqlrc

==== 内容如下 ====

MYSQL_SERVER            localhost
MYSQL_USERNAME          extmail
MYSQL_PASSWORD          extmail
MYSQL_SOCKET            /var/lib/mysql/mysql.sock
MYSQL_PORT              3306
MYSQL_OPT               0
MYSQL_DATABASE          extmail
MYSQL_USER_TABLE        mailbox
MYSQL_CRYPT_PWFIELD     password
MYSQL_UID_FIELD         uidnumber
MYSQL_GID_FIELD         gidnumber
MYSQL_LOGIN_FIELD       username
MYSQL_HOME_FIELD        homedir
MYSQL_NAME_FIELD        name
MYSQL_MAILDIR_FIELD     maildir
MYSQL_QUOTA_FIELD       quota
MYSQL_SELECT_CLAUSE     SELECT username,"",password,uidnumber,gidnumber,             \
                        CONCAT('/home/domains/',homedir),                            \
                        CONCAT('/home/domains/',maildir),                            \
                        quota,                                                       \
                        name,                                                        \
                        CONCAT("disableimap=",disableimap,",disablepop3=",           \
                                disablepop3,",disablewebmail=",disablewebmail,       \
                               ",disablesmtpd=",disablesmtpd,",disablesmtp=",        \
                                disablesmtp,",disablenetdisk=",disablenetdisk,       \
                               ",netdiskquota=",netdiskquota)                        \
                        FROM mailbox                                                 \
                        WHERE username = '$(local_part)@$(domain)'
===============================================

#vi authdaemonrc

==== 更改内容如下 ====

authmodulelist="authmysql"
uthmodulelistorig="authmysql"
daemons=10
authdaemonvar=/usr/local/courier-authlib/var/spool/authdaemon

=====================================


#/etc/rc.d/init.d/courier-authlib start

#chmod 755 /usr/local/courier-authlib/var/spool/authdaemon

#/etc/rc.d/init.d/courier-authlib restart

| 引用(0)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]