1、修改postfix配置文件:
#vi /etc/postfix/main.cf,添加如下内容:
#############################Virtual Mailbox Settings################
virtual_mailbox_base=/var/mailbox
virtual_mailbox_maps=mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains=mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_domains=
virtual_alias_maps=mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps=static:1001
virtual_gid_maps=static:1001
virtual_transport=maildrop
maildrop_destination_recipient_limit=1
maildrop_destination_concurrency_limit=1
#################################Mailbox END###########################
#################################Quota Settings########################
message_size_limit=52428800
mailbox_size_limit = 209715200
virtual_mailbox_limit=207915200
virtual_create_maildirsize=yes
virtual_mailbox_extended=yes
virtual_mailbox_limit_maps=mysql:/etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override=yes
virtual_maildir_limit_message=User's maildir has overdrawn his diskspace quota,try again later.
virtual_overquota_bounce=yes
################################Quota END############################
注意:virtual_uid_maps=static:1001
virtual_gid_maps=static:1001
uid 1001对应的username 是vmail,gid 1001对应的用户所属组是vmail.
2、添加为支持虚拟域和虚拟用户所用到的配置文件
#vi /etc/postfix/mysql/mysql_virtual_alias_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = alias
select_field = goto
where_field = address
additional_conditions = AND active = '1'
#vi /etc/postfix/mysql/mysql_virtual_domains_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = domain
select_field = domain
where_field = domain
additional_conditions = AND active = '1'
#vi /etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = quota
where_field = username
additional_conditions = AND active = '1'
#vi /etc/postfix/mysql/mysql_virtual_mailbox_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = maildir
where_field = username
additional_conditions = AND active = '1'
以上新建文件可以从extman安装文件中获得,也可以由此不用手动输入;
阅读(2544) | 评论(0) | 转发(0) |