POSTFIX+Extmail邮件系统搭建(完整版)系列之三

 第三部分:配置Courier-Authlib

1、安装Courier-Authlib

安装以下软件包:

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

 

编辑/etc/authlib/authmysqlrc文件:

# vi /etc/authlib/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                                            \

                        FROM mailbox                                    \

                        WHERE username = '$(local_part)@$(domain)'

 

 

修改authdaemonrc文件

# vi /etc/authlib/authdaemonrc

 

修改如下内容:

authmodulelist="authmysql"

authmodulelistorig="authmysql"

 

2、启courier-authlib

# service courier-authlib start

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

 

Starting Courier authentication services: authdaemond


修改authdaemon socket目录权限

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

# chmod 755 /var/spool/authdaemon/

点击此处查看POSTFIX+Extmail邮件系统搭建(完整版)系列之二

你可能感兴趣的:(职场,休闲,posfix,Linux邮件)