4、编辑/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
#vi /usr/local/etc/postfix/mysql_virtual_domains_maps.cf
加入以下内容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domaininfo WHERE domain=’%s’
5、编辑/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
#vi /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
加入以下内容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT maildir FROM userinfo WHERE address=’%s’ AND active = 1
6、编辑/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
# vi /usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
加下以下内容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT quota FROM userinfo WHERE address=’%s’
C、配置Courier-imap
1、修改Courier相关设置。
#vi /usr/local/etc/courier-imap/imapd:
找到这一句:
#IMAP_CAPABILITY=”IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE”
然后在这一句下面加上下面这句:
IMAP_CAPABILITY=”IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA”
注:上面是一句设置文件,而不是两句设置.
2、修改/usr/local/etc/courier-imap/pop3d
#vi /usr/local/etc/courier-imap/pop3d
找到下面这一句:
#POP3AUTH=”LOGIN CRAM-MD5 CRAM-SHA1″
取消注解符#号, 最后变成如下:
POP3AUTH=”LOGIN CRAM-MD5 CRAM-SHA1″
3、编辑修改/usr/local/etc/authlib/authmysqlrc
# mv /usr/local/etc/authlib/authmysqlrc /usr/local/etc/authlib/authmysqlrc_bak
# vi /usr/local/etc/authlib/authmysqlrc
加入以下内容:
MYSQL_SERVER localhost //数据库主机地址
MYSQL_USERNAME postfix //数据库用户名
MYSQL_PASSWORD postfix //数据库密码
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix //数据库名称
MYSQL_USER_TABLE userinfo
MYSQL_CRYPT_PWFIELD passwd
MYSQL_UID_FIELD ‘125’
MYSQL_GID_FIELD ‘125’
MYSQL_LOGIN_FIELD address
MYSQL_HOME_FIELD homedir
MYSQL_NAME_FIELD realname
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
注:这里得用tab键来跳格
以下文章点击率最高
Loading…