五、配置courier-authlib-EXTMAIL

1、安装Courier-Authlib

安装以下软件包:

 

shell

# yum install courier-authlib
# yum install courier-authlib-mysql

编辑/etc/authlib/authmysqlrc文件:

 

shell

# vi /etc/authlib/authmysqlrc

并将其内容清空,然后增加如下内容:

MYSQL_SERVER localhost MYSQL_USERNAME extmailMYSQL_PASSWORD extmail MYSQL_SOCKET /var/lib/mysql/mysql.sockMYSQL_PORT 3306 MYSQL_OPT 0MYSQL_DATABASE extmail MYSQL_USER_TABLE mailboxMYSQL_CRYPT_PWFIELD password MYSQL_UID_FIELD uidnumberMYSQL_GID_FIELD gidnumber MYSQL_LOGIN_FIELD usernameMYSQL_HOME_FIELD homedir MYSQL_NAME_FIELD nameMYSQL_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 \ FROM mailbox \ WHERE username = '$(local_part)@$(domain)'

修改authdaemonrc文件

 

shell

# vi /etc/authlib/authdaemonrc

修改如下内容:

authmodulelist="authmysql" authmodulelistorig="authmysql"

2、启动courier-authlib:

 

shell

# service courier-authlib start

如一切正常,命令行将返回如下信息:

Starting Courier authentication services: authdaemond

修改authdaemon socket目录权限

如果该目录权限不正确修改,maildrop及postfix等将无法正确获取用户的信息及密码认证:

 

shell

# chmod 755 /var/spool/authdaemon/

你可能感兴趣的:(ExtMail,authlib,配置courier)