免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6477 | 回复: 11
打印 上一主题 下一主题

[Mail] postfixadmin maildir 和mailbox差别 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-19 16:47 |只看该作者 |倒序浏览
May 19 15:23:22 erabay postfix/virtual[5723]: 2AB5C94603: to=<kkk@rngift.com>, relay=virtual, delay=0.14, delays=0.07/0.04/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
May 19 15:23:22 erabay postfix/qmgr[4492]: 2AB5C94603: removed

我的老出现mailbox



#===========================sasl==============================
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_helo_required = yes
smtpd_delay_reject=no
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
inet_interfaces = all


#=====================MySQL==================================
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_base = /home/vmail/
home_mailbox = Maildir/
virtual_mailbox_limit = 51200000
virtual_minimum_uid = 1002
#transport_maps = mysql:/etc/postfix/mysql/mysql_virtual_transport.cf
virtual_transport = virtual
#virtual_transport = weifeng270
virtual_uid_maps = static:1002
virtual_gid_maps = static:1002




#=====================Quota=====================
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 = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes




我以前没有做设置的时候是

May 15 15:11:39 erabay postfix/virtual[6747]: 4BF73945EB: to=<kk@211.com>, relay=virtual, delay=0.07, delays=0.05/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
May 15 15:11:39 erabay postfix/qmgr[6741]: 4BF73945EB: removed


但是现在不知道在那里改回。

我看了三本达魔经还是没有找到。

找高手指点。

论坛徽章:
0
2 [报告]
发表于 2008-05-19 16:53 |只看该作者

回复 #1 weifeng270 的帖子

root@erabay:/var/log# id vmail
uid=1002(vmail) gid=1002(vmail) groups=1002(vmail)
root@erabay:/var/log# pwd
/var/log
root@erabay:/var/log#


root@erabay:/etc/postfix/mysql# less mysql_virtual_domains_maps.cf
user = postfix
password = kernel
hosts = 127.0.0.1
dbname = postfix
table = domain
select_field = description
where_field = domain
root@erabay:/etc/postfix/mysql# less mysql_virtual_mailbox_
mysql_virtual_mailbox_limit_maps.cf  mysql_virtual_mailbox_maps.cf        
root@erabay:/etc/postfix/mysql# less mysql_virtual_mailbox_maps.cf
user = postfix
password = kernel
hosts = 127.0.0.1
dbname = postfix
table = mailbox
select_field = password
where_field = username
root@erabay:/etc/postfix/mysql# less mysql_virtual_alias_maps.cf
user = postfix
password = kernel
hosts = 127.0.0.1
dbname = postfix
table = alias
select_field = goto
where_field = address

论坛徽章:
0
3 [报告]
发表于 2008-05-19 18:01 |只看该作者
还有我说一下我用的是postfixadmin

这是猫咪的文章对我的一点都不起作用。

授人以渔I-Postfix+LDAP做虚拟邮箱服务器

版权声明:本文可以任意转载,转载时请保持文章的完整性,并以超链接形式标明文章原始出处和作者信息及本声明。

http://geoffl.blog.163.com/

作者: 富贵猫


前阵子开始要做Postfix邮件服务器,网上搜了好多文章,不过大部分文章只是作者自己安装步骤的罗列,只能算授人以鱼,所以我看了之后还是需要去看Postfix的手册,还要看很多官方的参考书,看完之后颇有心得,所以就打算写一个“授人以渔”的系列安装设置的文章,让你知其然也知其所以然。

Postfix作邮箱,有4种设置方式,分别是共享域名+系统帐户、独立域名+系统帐户、独立域名+虚拟帐户和虚拟域名+特殊格式邮箱。鉴于通常我们不可能给每个用户设置一个系统帐户,所以第一第二种就不考虑不介绍了。既然是用Postfix来建立我们自己地邮箱系统,所以也没必要去兜很多圈子设置特殊格式邮箱,所以第四种也不考虑。剩下只有一种方式,就是独立域名+虚拟邮箱。

所谓独立域名,就是即使用户名是一样的,但如果域名不同其邮件也将放置在不同的目录。譬如info@abc.cominfo@def.com,这二个e-mail地址都以info为用户名,但域名不同,如果是共享域名,他们的mail将被放置在同一个目录下,而独立域名将放置在不同目录下。如果你们公司是很大的集团,下面分好几个公司,分别有独立的域名,这难免有重名的员工,这种情况下,后者显然是我们希望看到的。而所谓虚拟帐户,既然那些邮箱用户只是使用mail服务,我们当然没有必要去给每个用户在Linux下面开设一个个系统帐户,所以我们就用一些数据库之类的东西来保存这些帐户信息,譬如用哈希表、SQL数据库或者LDAP。我使用的是独立域名+虚拟LDAP帐户。

Postfix的安装我就不说了,非常简单。不过如果不会也没关系,后面我会写一篇关于Postfix+mail quota的,那时候需要下载、补丁和编译,等于是Postfix的安装。

LDAP也不说了,要完全掌握LDAP不是这篇能解决的,我只假设你的LDAP服务器里已经有mail这个字段。

下面开始说Postfix如何设置。Postfix的配置文件是/etc/postfix/main.cf,这是独立域名+LDAP的设置

# ===== Basic Setting =====

mail_owner = postfix
myhostname = pop.test.com
inet_interfaces = all
queue_directory = /var/spool/postfix
mynetworks = 127.0.0.0/8

home_mailbox =

# ===== Virtual Mailbox =====
virtual_mailbox_domains = hash:/etc/postfix/v_domains
virtual_mailbox_maps = ldap:/etc/postfix/v_mailbox_maps

virtual_mailbox_base = /var/spool/vhosts/
virtual_minimum_uid = 500
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = virtual

myhostname设置你的邮件服务器名字

inet_interfaces = all设置你在哪些网卡上监听

另外有几个是需要解释的:我们接受哪些域名的邮件?我们的域名下有哪些用户?他们的邮件存放在什么目录?

我们接受那些域名的邮件,这是由virtual_mailbox_domains来定义的。虽然我们可以直接使用

virtual_mailbox_domains = test.com, test2.com

这样的格式来定义这些域名,不过我还是建议如我这样使用一个表来存放,这样更方便日后的维护,表名是随意取的,有没有后缀都没关系,我用v_domains作为表的名字,在main.cf里定义是

virtual_mailbox_domains = hash:/etc/postfix/v_domains

v_domains的内容如下

test.com OK

test2.com OK

这是个text文件,仅仅包含域名,但为了满足哈希表的格式,所以在后面添加一个OK。然后我们还要把这个文件变成Postfix的数据库格式,因此用如下命令转变其格式

postmap v_domains

之后你会得到一个以db为后缀的文件v_domains.db。注意,每次修改完v_domains你都需要使用一次postmap。



我们有哪些用户,这是由virtual_mailbox_maps来决定。同样,你可以用哈希表,不过我还是用LDAP。为了方便你理解,我先说明一下如果用哈希表,它的格式应该是

user1@test.com test.com/user1_mailDirectory/

user2@test.com test.com/user2_mailDirectory/

user1@test2.com test2.com/user1_mailDirectory/

左边是用户的e-mail地址,空格之后是该用户的邮件存放目录。既然我们说了,独立域名代表info@abc.cominfo@def.com的邮件放置在不同目录下,所以我们的定义里user1@test.comuser1@test2.com的目录是不同的。如果换成LDAP,我们要得到相同的结果,即用e-mail地址来搜索,得到其邮件存放目录

既然讲到邮件存放目录,就一并解释一下到底这个目录怎样定义的。邮件是存放在

virtual_mailbox_base\virtual_mailbox_maps\home_mailbox下,也就是说 virtual_mailbox_base定义的目录下,postfix会根据virtual_mailbox_maps返回的用户目录自动创建该目录,然后如果home_mailbox也有定义,那么在用户目录下还会创建home_mailbox定义的名字。举例来说,按照上面的设置,邮件会存放在

/var/spool/vhosts/test.com/user1/下面。

如果home_mailbox不是空白而是Mail/,那么就会存放在

/var/spool/vhost/test/com/user1/Mail/下面。home_mailbox有什么用呢?举个例子,比方你已经有 homeDirectory了,但那是你平时放文件的地方,那么再在同样目录下放邮件就变得很奇怪,所以需要home_mailbox来定义邮件放在你 homeDirectory下的什么目录下

注意:地址的最后有没有"/"决定了使用mailbox格式还是maildir格式,没有"/"表示mailbox,有表示maildir。所以并不象大部分人认为的,home_mailbox定义为MailDir才表示使用maildir格式。再举几个例子

/var/spool/vhosts/test.com/user1/  表示使用MailDir格式

/var/spool/vhosts/test.com/user1  表示使用MailBox格式

/var/spool/vhosts/test.com/user1/Mail/  表示使用MailDir格式

/var/spool/vhosts/test.com/user1/MailDir/ 表示使用MailDir格式

/var/spool/vhosts/test.com/user1/MailDir 表示使用MailBox格式,即使home_mailbox是maildir,但没有最后的"/",只能表示使用MailBox格式。同样道理

/var/spool/vhosts/test.com/user1/MailBox/ 表示使用MailDir格式,虽然home_mailbox是mailbox,但最后的"/"就说明了是使用MailDir格式。

回到virtual_mailbox_maps的LDAP定义,其格式是

virtual_mailbox_maps = ldap:/etc/postfix/v_mailbox_maps

v_mailbox_maps只是一个连接Postfix和LDAP的配置文件,同样文件名是随意取的。v_mailbox_maps的内容是

# LDAP Server的IP地址,我是设在和postfix同一电脑,所以是127.0.0.1

server_host = 127.0.0.1
# 下面这些关于LDAP Search的内容如果你不了解,请学习LDAP

search_base = ou=people,o=test
server_port = 389
bind = yes
bind_dn = cn=root,o=test
bind_pw = <rootpassword>
version = 3

# 下面是关键,我会额外解释

论坛徽章:
0
4 [报告]
发表于 2008-05-19 18:04 |只看该作者
May 19 18:03:06 erabay postfix/master[8294]: daemon started -- version 2.4.5, configuration /etc/postfix
May 19 18:03:33 erabay postfix/smtpd[8298]: connect from localhost[127.0.0.1]
May 19 18:03:33 erabay postfix/smtpd[8298]: 1C673945F6: client=localhost[127.0.0.1]
May 19 18:03:33 erabay postfix/cleanup[8301]: 1C673945F6: message-id=<20080519100333.1C673945F6@mail.erabay.com>
May 19 18:03:33 erabay postfix/qmgr[8296]: 1C673945F6: from=<weifeng270@gmail.com>, size=482, nrcpt=1 (queue active)
May 19 18:03:33 erabay postfix/smtpd[8298]: disconnect from localhost[127.0.0.1]
May 19 18:03:33 erabay postfix/virtual[8302]: 1C673945F6: to=<5@5.com>, relay=virtual, delay=0.08, delays=0.03/0.02/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
May 19 18:03:33 erabay postfix/qmgr[8296]: 1C673945F6: removed



又出这个了。

论坛徽章:
0
5 [报告]
发表于 2008-05-22 16:04 |只看该作者
先把home_mailbox = Maildir/设置成空看看呢?

论坛徽章:
0
6 [报告]
发表于 2008-05-23 11:03 |只看该作者

回复 #5 富贵猫 的帖子

我换成空的还是不行。



root@erabay:/home/Virtual# vim /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree{queue_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree{queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.erabay.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = erabay.com,localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +




#===========================sasl==============================
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_helo_required = yes
smtpd_delay_reject=no
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
inet_interfaces = all


#=====================MySQL==================================
#virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_base = /home/Virtual/
home_mailbox =
virtual_mailbox_limit = 51200000
virtual_minimum_uid = 33
#transport_maps = mysql:/etc/postfix/mysql/mysql_virtual_transport.cf
virtual_transport = virtual
#virtual_transport = weifeng270
virtual_uid_maps = static:33
virtual_gid_maps = static:33




#=====================Quota=====================
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 = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes

#virtual_trash_count=yes
#virtual_trash_name=.Trash



root@erabay:/home/Virtual# tail /var/log/mail.log
May 23 06:45:55 erabay postfix/master[4295]: reload configuration /etc/postfix
May 23 10:58:21 erabay postfix/master[4295]: terminating on signal 15
May 23 10:58:22 erabay postfix/master[5080]: daemon started -- version 2.4.5, configuration /etc/postfix
May 23 11:00:32 erabay postfix/smtpd[5086]: connect from localhost[127.0.0.1]
May 23 11:00:32 erabay postfix/smtpd[5086]: ECDC59460A: client=localhost[127.0.0.1]
May 23 11:00:32 erabay postfix/cleanup[5092]: ECDC59460A: message-id=<20080523030032.ECDC59460A@mail.erabay.com>
May 23 11:00:33 erabay postfix/smtpd[5086]: disconnect from localhost[127.0.0.1]
May 23 11:00:33 erabay postfix/qmgr[5083]: ECDC59460A: from=<weifeng270@gmail.com>, size=493, nrcpt=1 (queue active)
May 23 11:00:33 erabay postfix/virtual[5093]: ECDC59460A: to=<3434@3333.com>, relay=virtual, delay=0.16, delays=0.08/0.02/0/0.06, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 11:00:33 erabay postfix/qmgr[5083]: ECDC59460A: removed


root@erabay:/home/Virtual# ls -l
total 12
-rw------- 1 www-data www-data 624 2008-05-23 11:00 111
-rw------- 1 www-data www-data 600 2008-05-21 17:26 3
-rw------- 1 www-data www-data 648 2008-05-21 17:29 kkk
root@erabay:/home/Virtual#

论坛徽章:
0
7 [报告]
发表于 2008-05-23 13:34 |只看该作者
root@erabay:/home/Virtual# tail /var/log/mail.log
May 23 14:27:39 erabay postfix/qmgr[5980]: E60669460A: from=<weifeng270@gmail.com>, size=481, nrcpt=1 (queue active)
May 23 14:27:40 erabay postfix/virtual[6011]: E60669460A: to=<2@2.com>, relay=virtual, delay=0.08, delays=0.04/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 14:27:40 erabay postfix/qmgr[5980]: E60669460A: removed
May 23 14:28:56 erabay postfix/smtpd[6007]: connect from localhost[127.0.0.1]
May 23 14:28:56 erabay postfix/smtpd[6007]: 5971E9460A: client=localhost[127.0.0.1]
May 23 14:28:56 erabay postfix/cleanup[6010]: 5971E9460A: message-id=<20080523062856.5971E9460A@mail.erabay.com>
May 23 14:28:56 erabay postfix/smtpd[6007]: disconnect from localhost[127.0.0.1]
May 23 14:28:56 erabay postfix/qmgr[5980]: 5971E9460A: from=<weifeng270@gmail.com>, size=481, nrcpt=1 (queue active)
May 23 14:28:56 erabay postfix/virtual[6011]: 5971E9460A: to=<4@2.com>, relay=virtual, delay=0.1, delays=0.09/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 14:28:56 erabay postfix/qmgr[5980]: 5971E9460A: removed

[ 本帖最后由 weifeng270 于 2008-5-23 14:29 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2008-05-23 15:44 |只看该作者
我要崩盘了


May 23 15:42:18 erabay postfix/postsuper[7966]: Deleted: 3 messages
May 23 15:42:36 erabay postfix/smtpd[7951]: connect from localhost[127.0.0.1]
May 23 15:42:36 erabay postfix/smtpd[7951]: BA66794603: client=localhost[127.0.0.1]
May 23 15:42:36 erabay postfix/cleanup[7946]: BA66794603: message-id=<20080523074236.BA66794603@mail.erabay.com>
May 23 15:42:36 erabay postfix/qmgr[7941]: BA66794603: from=<weifeng270@gmail.com>, size=483, nrcpt=1 (queue active)
May 23 15:42:36 erabay postfix/smtpd[7951]: disconnect from localhost[127.0.0.1]
May 23 15:42:36 erabay postfix/virtual[7955]: BA66794603: to=<77@1.com>, relay=virtual, delay=0.07, delays=0.05/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
May 23 15:42:36 erabay postfix/qmgr[7941]: BA66794603: removed
May 23 15:42:49 erabay postfix/smtpd[7951]: connect from localhost[127.0.0.1]
May 23 15:42:49 erabay postfix/smtpd[7951]: 9273194603: client=localhost[127.0.0.1]
May 23 15:42:49 erabay postfix/cleanup[7946]: 9273194603: message-id=<20080523074249.9273194603@mail.erabay.com>
May 23 15:42:49 erabay postfix/qmgr[7941]: 9273194603: from=<weifeng270@gmail.com>, size=483, nrcpt=1 (queue active)
May 23 15:42:49 erabay postfix/virtual[7955]: 9273194603: to=<99@1.com>, relay=virtual, delay=0.04, delays=0.04/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 15:42:49 erabay postfix/smtpd[7951]: disconnect from localhost[127.0.0.1]
May 23 15:42:49 erabay postfix/qmgr[7941]: 9273194603: removed
May 23 15:43:19 erabay postfix/smtpd[7951]: connect from localhost[127.0.0.1]
May 23 15:43:19 erabay postfix/smtpd[7951]: 2C95094603: client=localhost[127.0.0.1]
May 23 15:43:19 erabay postfix/cleanup[7946]: 2C95094603: message-id=<20080523074319.2C95094603@mail.erabay.com>
May 23 15:43:19 erabay postfix/qmgr[7941]: 2C95094603: from=<weifeng270@gmail.com>, size=485, nrcpt=1 (queue active)
May 23 15:43:19 erabay postfix/smtpd[7951]: disconnect from localhost[127.0.0.1]
May 23 15:43:19 erabay postfix/virtual[7955]: 2C95094603: to=<345@1.com>, relay=virtual, delay=0.07, delays=0.05/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 15:43:19 erabay postfix/qmgr[7941]: 2C95094603: removed
May 23 15:43:45 erabay postfix/smtpd[7951]: connect from localhost[127.0.0.1]
May 23 15:43:45 erabay postfix/smtpd[7951]: 660CA94603: client=localhost[127.0.0.1]
May 23 15:43:45 erabay postfix/cleanup[7946]: 660CA94603: message-id=<20080523074345.660CA94603@mail.erabay.com>
May 23 15:43:45 erabay postfix/qmgr[7941]: 660CA94603: from=<weifeng270@gmail.com>, size=485, nrcpt=1 (queue active)
May 23 15:43:45 erabay postfix/smtpd[7951]: disconnect from localhost[127.0.0.1]
May 23 15:43:45 erabay postfix/virtual[7955]: 660CA94603: to=<345@2.com>, relay=virtual, delay=0.09, delays=0.06/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
May 23 15:43:45 erabay postfix/qmgr[7941]: 660CA94603: removed

论坛徽章:
0
9 [报告]
发表于 2008-05-23 16:19 |只看该作者
$CONF['encrypt'] = 'md5crypt';
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree{queue_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree{queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.erabay.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = erabay.com,localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +




#===========================sasl==============================
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_helo_required = yes
smtpd_delay_reject=no
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
inet_interfaces = all


#=====================MySQL==================================
#virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_base = /home/Virtual/
home_mailbox = maildir/
virtual_mailbox_limit = 51200000
virtual_minimum_uid = 33
#transport_maps = mysql:/etc/postfix/mysql/mysql_virtual_transport.cf
virtual_transport = virtual
#virtual_transport = weifeng270
virtual_uid_maps = static:33
virtual_gid_maps = static:33




#=====================Quota=====================
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 = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes

#virtual_trash_count=yes
#virtual_trash_name=.Trash




May 23 16:04:37 erabay postfix/virtual[8427]: 2A95F9460A: to=<xxx@weifeng.com>, relay=virtual, delay=0.09, delays=0.06/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 16:04:37 erabay postfix/qmgr[8358]: 2A95F9460A: removed
May 23 16:05:25 erabay postfix/smtpd[8423]: connect from localhost[127.0.0.1]
May 23 16:05:25 erabay postfix/smtpd[8423]: CD1D99460A: client=localhost[127.0.0.1]
May 23 16:05:25 erabay postfix/cleanup[8426]: CD1D99460A: message-id=<20080523080525.CD1D99460A@mail.erabay.com>
May 23 16:05:25 erabay postfix/qmgr[8358]: CD1D99460A: from=<weifeng270@gmail.com>, size=483, nrcpt=1 (queue active)
May 23 16:05:25 erabay postfix/smtpd[8423]: disconnect from localhost[127.0.0.1]
May 23 16:05:25 erabay postfix/virtual[8427]: CD1D99460A: to=<22@2.com>, relay=virtual, delay=0.06, delays=0.05/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 16:05:25 erabay postfix/qmgr[8358]: CD1D99460A: removed
May 23 16:08:18 erabay postfix/master[8356]: terminating on signal 15
May 23 16:11:11 erabay postfix/master[8562]: daemon started -- version 2.4.5, configuration /etc/postfix
May 23 16:11:15 erabay postfix/master[8562]: terminating on signal 15
May 23 16:11:15 erabay postfix/master[8636]: daemon started -- version 2.4.5, configuration /etc/postfix
May 23 16:13:51 erabay postfix/smtpd[8667]: connect from localhost[127.0.0.1]
May 23 16:13:51 erabay postfix/smtpd[8667]: 5FF849460A: client=localhost[127.0.0.1]
May 23 16:13:51 erabay postfix/cleanup[8670]: 5FF849460A: message-id=<20080523081351.5FF849460A@mail.erabay.com>
May 23 16:13:51 erabay postfix/qmgr[8638]: 5FF849460A: from=<weifeng270@gmail.com>, size=483, nrcpt=1 (queue active)
May 23 16:13:51 erabay postfix/smtpd[8667]: disconnect from localhost[127.0.0.1]
May 23 16:13:51 erabay postfix/virtual[8671]: 5FF849460A: to=<77@5.com>, relay=virtual, delay=0.1, delays=0.03/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to maildir)
May 23 16:13:51 erabay postfix/qmgr[8638]: 5FF849460A: removed
May 23 16:14:18 erabay postfix/smtpd[8667]: connect from localhost[127.0.0.1]
May 23 16:14:18 erabay postfix/smtpd[8667]: D36B79460A: client=localhost[127.0.0.1]
May 23 16:14:18 erabay postfix/cleanup[8670]: D36B79460A: message-id=<20080523081418.D36B79460A@mail.erabay.com>
May 23 16:14:18 erabay postfix/qmgr[8638]: D36B79460A: from=<weifeng270@gmail.com>, size=481, nrcpt=1 (queue active)
May 23 16:14:18 erabay postfix/smtpd[8667]: disconnect from localhost[127.0.0.1]
May 23 16:14:18 erabay postfix/virtual[8671]: D36B79460A: to=<1@1.com>, relay=virtual, delay=0.07, delays=0.05/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
May 23 16:14:18 erabay postfix/qmgr[8638]: D36B79460A: removed
May 23 16:14:30 erabay postfix/smtpd[8667]: connect from localhost[127.0.0.1]
May 23 16:14:30 erabay postfix/smtpd[8667]: 35BD29460A: client=localhost[127.0.0.1]
May 23 16:14:30 erabay postfix/cleanup[8670]: 35BD29460A: message-id=<20080523081430.35BD29460A@mail.erabay.com>
May 23 16:14:30 erabay postfix/qmgr[8638]: 35BD29460A: from=<weifeng270@gmail.com>, size=481, nrcpt=1 (queue active)
May 23 16:14:30 erabay postfix/smtpd[8667]: disconnect from localhost[127.0.0.1]
May 23 16:14:30 erabay postfix/virtual[8671]: 35BD29460A: to=<3@1.com>, relay=virtual, delay=0.09, delays=0.07/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
May 23 16:14:30 erabay postfix/qmgr[8638]: 35BD29460A: removed








但是
$CONF['encrypt'] = 'md5crypt';
换成
$CONF['encrypt'] = 'cleartext';

就又出现

May 23 16:04:01 erabay postfix/qmgr[8358]: DE1379460A: from=<weifeng270@gmail.com>, size=499, nrcpt=1 (queue active)
May 23 16:04:01 erabay postfix/virtual[8427]: DE1379460A: to=<kkkk@weifeng.com>, relay=virtual, delay=0.05, delays=0.04/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 16:04:01 erabay postfix/qmgr[8358]: DE1379460A: removed
May 23 16:04:01 erabay postfix/smtpd[8423]: disconnect from localhost[127.0.0.1]
May 23 16:04:37 erabay postfix/smtpd[8423]: connect from localhost[127.0.0.1]
May 23 16:04:37 erabay postfix/smtpd[8423]: 2A95F9460A: client=localhost[127.0.0.1]
May 23 16:04:37 erabay postfix/cleanup[8426]: 2A95F9460A: message-id=<20080523080437.2A95F9460A@mail.erabay.com>
May 23 16:04:37 erabay postfix/qmgr[8358]: 2A95F9460A: from=<weifeng270@gmail.com>, size=497, nrcpt=1 (queue active)
May 23 16:04:37 erabay postfix/smtpd[8423]: disconnect from localhost[127.0.0.1]
May 23 16:04:37 erabay postfix/virtual[8427]: 2A95F9460A: to=<xxx@weifeng.com>, relay=virtual, delay=0.09, delays=0.06/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 16:04:37 erabay postfix/qmgr[8358]: 2A95F9460A: removed
May 23 16:05:25 erabay postfix/smtpd[8423]: connect from localhost[127.0.0.1]
May 23 16:05:25 erabay postfix/smtpd[8423]: CD1D99460A: client=localhost[127.0.0.1]
May 23 16:05:25 erabay postfix/cleanup[8426]: CD1D99460A: message-id=<20080523080525.CD1D99460A@mail.erabay.com>
May 23 16:05:25 erabay postfix/qmgr[8358]: CD1D99460A: from=<weifeng270@gmail.com>, size=483, nrcpt=1 (queue active)
May 23 16:05:25 erabay postfix/smtpd[8423]: disconnect from localhost[127.0.0.1]
May 23 16:05:25 erabay postfix/virtual[8427]: CD1D99460A: to=<22@2.com>, relay=virtual, delay=0.06, delays=0.05/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 16:05:25 erabay postfix/qmgr[8358]: CD1D99460A: removed



但是我需要明文的目录名。

论坛徽章:
0
10 [报告]
发表于 2008-05-26 12:31 |只看该作者
是我太粗心了。对不起。问题解决。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP