Chinaunix首页 | 论坛 | 博客
  • 博客访问: 788043
  • 博文数量: 434
  • 博客积分: 11187
  • 博客等级: 上将
  • 技术积分: 5221
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-19 01:00
文章分类

全部博文(434)

文章存档

2016年(2)

2013年(1)

2012年(115)

2011年(195)

2010年(32)

2009年(89)

分类: LINUX

2011-06-21 13:53:43

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安装文件中获得,也可以由此不用手动输入;
阅读(2547) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~