电脑技术学习

使用Postfix构建基于FreeBSD的邮件系统

dn001

  几个配置文件:

  cd /usr/local/etc/postfix/

  mkdir mysql

  cd mysql

  1、ee virtual_alias_maps.cf

user = postfix
passWord = postfix
hosts = localhost
dbname = postfix
table = alias
select_fIEld = goto
where_field = address

  2、ee virtual_domains_maps.cf

user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain

  3、ee virtual_mailbox_maps.cf

user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username

  4、ee virtual_mailbox_limit_maps.cf

user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username

  ④配置courier-authdaemond

cd /usr/local/etc/rc.d
./courier-authdaemond.sh start
chmod o+x /var/run/authdaemond
cd /usr/local/etc/authlib

  ee authdaemonrc

  修改authmodulelist和authmodulelistorig

  authmodulelist="authmysql"

  authmodulelistorig="authmysql"

  添加

version="authaemond.mysql"
courier-imap
ee authmysqlrc
DEFAULT_DOMAIN example.com
MYSQL_CRYPT_PWFIELD password
MYSQL_DATABASE postfix
MYSQL_GID_FIELD '80'
MYSQL_HOME_FIELD '/usr/local/virtual'
MYSQL_LOGIN_FIELD username
MYSQL_MAILDIR_FIELD maildir
MYSQL_NAME_FIELD name
MYSQL_OPT 0
MYSQL_PASSWORD postfix
#MYSQL_PORT 0
#MYSQL_QUOTA_FIELD quota
MYSQL_SERVER localhost
MYSQL_UID_FIELD '80'
MYSQL_USERNAME postfix
MYSQL_USER_TABLE mailbox

标签: