wiki'd

by JoKeru

Mail Server - Courier POP3/POP3-SSL

Configure Courier POP3 service using MySQL auth module.

$ apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl

$ sed -i 's/authmodulelist="authpam"/authmodulelist="authmysql"/' /etc/courier/authdaemonrc
$ cat <<'EOF' > /etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME mail
MYSQL_PASSWORD xXxXx
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/inbox"
MYSQL_MAILDIR_FIELD
CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
#MYSQL_QUOTA_FIELD quota
EOF

$ vi /etc/courier/pop3d.cnf  
$ rm -f /etc/courier/pop3d.pem  
$ sed -i.bak 's/365/3650/' /usr/sbin/mkpop3dcert # 10 years validity  
$ mkpop3dcert

$ /etc/init.d/courier-authdaemon restart
$ /etc/init.d/courier-pop restart
$ /etc/init.d/courier-pop-ssl restart

$ telnet 127.0.0.1 110
$ openssl s_client -connect 127.0.0.1:995

Comments