CentOS+postfix+ExtMail+amavisd-new+Spam_Locker+DSpam配置指南:四、配置Courier-Authlib

 1、安装Courier-Authlib

安装以下软件包:

 

  
  
  
  
  1. shell 
  2. # yum install courier-authlib 
  3. # yum install courier-authlib-mysql 

编辑/etc/authlib/authmysqlrc文件:

 

  1. shell 
  2. # vi /etc/authlib/authmysqlrc 

 

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

  
  
  
  
  1. MYSQL_SERVER            localhost 
  2. MYSQL_USERNAME          extmail 
  3. MYSQL_PASSWORD          extmail 
  4. MYSQL_SOCKET            /var/lib/mysql/mysql.sock 
  5. MYSQL_PORT              3306 
  6. MYSQL_OPT               0 
  7. MYSQL_DATABASE          extmail 
  8. MYSQL_USER_TABLE        mailbox 
  9. MYSQL_CRYPT_PWFIELD     password 
  10. MYSQL_UID_FIELD         uidnumber 
  11. MYSQL_GID_FIELD         gidnumber 
  12. MYSQL_LOGIN_FIELD       username 
  13. MYSQL_HOME_FIELD        homedir 
  14. MYSQL_NAME_FIELD        name 
  15. MYSQL_MAILDIR_FIELD     maildir 
  16. MYSQL_QUOTA_FIELD       quota 
  17. MYSQL_SELECT_CLAUSE     SELECT username,password,"",uidnumber,gidnumber,\ 
  18.                         CONCAT('/home/domains/',homedir),               \ 
  19.                         CONCAT('/home/domains/',maildir),               \ 
  20.                         quota,                                          \ 
  21.                         name                                            \ 
  22.                         FROM mailbox                                    \ 
  23.                         WHERE username = '$(local_part)@$(domain)' 

修改authdaemonrc文件

  
  
  
  
  1. shell 
  2. # vi /etc/authlib/authdaemonrc 

修改如下内容:

 

  
  
  
  
  1. authmodulelist="authmysql" 
  2. authmodulelistorig="authmysql" 

2、启动courier-authlib:

  
  
  
  
  1. shell 
  2. # service courier-authlib start 

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

  
  
  
  
  1. Starting Courier authentication services: authdaemond  

 

修改authdaemon socket目录权限

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

  
  
  
  
  1. shell 
  2. # chmod 755 /var/spool/authdaemon/ 

 

你可能感兴趣的:(centos,postfix,安装配置,dspam,ExtMail)