hosts = 127.0.0.1
Modify courier Related Settings,/ETC/COURIER/IMAPD:
Authmodules= "Authdaemon"
imap_capability= "IMAP4rev1 CHILDREN NAMESPACE Thread=orderedsubject
Thread=references SORT auth=cram-md5 auth=cram-sha1 IDLE "
Modify/etc/courier/pop3d
Authmodules= "Authdaemon"
Pop3auth= "LOGIN cram-md5 cram-sha1"
Modify/ETC/COURIER/AUTHDAEMONRC
authmodulelist= "Authmysql authpam"
Use MySQL validation and Pam validation.
Modify/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
Create/etc/postfix/sasl/smtpd.conf:
Pwcheck_method:pam
Pam-mysql
Create/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