构建反病毒反垃圾邮件系统(三)

80酷酷网    80kuku.com

  hosts = 127.0.0.1

  修改Courier相关设置,/etc/courier/imapd:

  AUTHMODULES="authdaemon"

  IMAP_CAPABILITY="IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT
THREAD=REFERENCES SORT AUTH=CRAM-MD5 AUTH=CRAM-SHA1 IDLE"

  修改/etc/courier/pop3d

  AUTHMODULES="authdaemon"

  POP3AUTH="LOGIN CRAM-MD5 CRAM-SHA1"

  修改/etc/courier/authdaemonrc

  authmodulelist="authmysql authpam"

  使用mysql验证和pam验证。

  修改/etc/courier/authmysqlrc

  MYSQL_SERVER 127.0.0.1
  MYSQL_USERNAME mysql-postfix-user
  MYSQL_PASSWORD mysql-postfix-pass
  #MYSQL_SOCKET /var/run/mysql/mysql.sock
  MYSQL_PORT 0
  MYSQL_OPT 0
  MYSQL_DATABASE postfix
  MYSQL_USER_TABLE users

  MYSQL_LOGIN_FIELD email
  MYSQL_CLEAR_PWFIELD clear
  MYSQL_UID_FIELD uid
  MYSQL_GID_FIELD gid
  MYSQL_HOME_FIELD homedir
  MYSQL_MAILDIR_FIELD maildir

  SASL library

  创建/etc/postfix/sasl/smtpd.conf:

  pwcheck_method: PAM

  PAM-MySQL

  创建/etc/pam.d/smtp:

  auth optional pam_mysql.so host=localhost db=postfix user=
mysql-postfix-user passwd=mysql-postfix-pass table=users
usercolumn=email passwdcolumn=clear crypt=n
  account required pam_mysql.so host=localhost db=postfix user=mysql-postfix-user passwd=mysql-postfix-pass usercolumn=email passwdcolumn=clear crypt=n



分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: