
This howto I put together very quickly becasue of the late requsts on tsl-discuss. So there are no explenations but just a quick list on things to do to make ostfix, courier-imaps, and MySQL work with Maildir and Virtual Domains.
Have fun :-)
Install packages
1. of all you need to have installed these packages:
-
Apache 2
-
MySQL 4
-
PHP
-
stfix
-
Postfix-MySQL
-
Courier-imap
-
Courier-imaps
-
Courier-imap-MySQL
Filesystem
Secondly you will need to make these system changes:
In my example i use /data/mail for maildirs and domains.
yourbox:~# mkdir -p /data/mail/
yourbox:~# chmod -R 775 /data/mail/
yourbox:~# chown -R postfix:postfix /data/virtual/
Authorisation
For MySQL you need to change the authorization in /etc/courier-imap/authdaemonrc
Set autmodulelist to "authmysql"
Now change /etc/courier-imap/authmysqlrc set:
MYSQL_SERVER localhost
MYSQL_USERNAME yourusername
MYSQL_PASSWORD yourpassword
MYSQL_SOCKET /var/run/mysql/mysql.sock
MYSQL_DATABASE maildb
MYSQL_USER_TABLE users
MYSQL_HOME_FIELD '/data/mail/'
MYSQL_MAILDIR_FIELD maildir
MYSQL_WHERE_CLAUSE imapok=1 AND bool1=1 AND bool2=1