ExtMail服务器社区's Archiver

hzqbbc 发表于 2003-1-2 07:43

一个简单的使用文本保存所有数据的postfix例子

[url]http://groups.google.com/groups?q=virtual_mailbox_maps+postmap+group:mailing.postfix.users&hl=zh-CN&lr=&ie=UTF-8&inlang=zh-CN&selm=asigh6%244ns%241%40FreeBSD.csie.NCTU.edu.tw&rnum=2[/url]

第2 ��
寄件者:"Ebbinge, Onno" ([email]EbbingeO@logica.com[/email])
主旨:SOLVED: virtual-mailbox domains
这是仅有的一条留言  
View: Original Format
新闻群组:mailing.postfix.users
日期:2002-12-03 06:53:39 PST


Thanks to Viktor and Russell !!!

Posftfix virtual-mailbox domains (postfix 1.1.11-?):

* In main.cf:

transport_maps = hash:$config_directory/transport_maps.hash
virtual_mailbox_base = /var/mail
virtual_mailbox_maps = hash:$config_directory/virtual_mailbox_maps.hash
virtual_uid_maps = static:1003
virtual_gid_maps = static:6

* The files:

# cat transport_maps.hash
domain.tld  local:
virtual-domain1.tld  virtual:
virtual-domain2.tld  virtual:

# cat virtual_mailbox_maps.hash
virtual-domain1.tld  anything
virtual-domain2.tld  anything

[email]foo@virtual-domain1.tld[/email]  virtual-domain1.tld/foo
[email]bar@virtual-domain1.tld[/email]  virtual-domain1.tld/bar
[email]bar@virtual-domain2.tld[/email]  virtual-domain2.tld/bar

* The uid/gid mapping:

uid 1003 = postfix
gid 6    = mail

* The mailboxes (make them: touch/chown/chmod):

-rw-rw-r--  1 postfix  mail  0 Dec  3 15:27
/var/mail/virtual-domain1.tld/foo
-rw-rw-r--  1 postfix  mail  0 Dec  3 15:27
/var/mail/virtual-domain1.tld/bar
-rw-rw-r--  1 postfix  mail  0 Dec  3 15:27
/var/mail/virtual-domain2.tld/bar

* restart the postfix system

# postmap transport_maps.hash
# postmap virtual_mailbox_maps.ha
# postfix reload

DONE.

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.
回应留言

--------------------------------------------------------------------------------

基本上我自己弄的是一样的。不过自己的老出warning,比较郁闷。。:(

laosechong 发表于 2003-1-15 02:24

什么警告? 是下面这个吗?

Jan 14 08:40:46 mail-sun postfix/smtpd[29180]: [ID 947731 mail.warning] warning: maps_append: map ld
ap:accounts has flags 0120, want flags 04100

hzqbbc 发表于 2003-1-15 07:19

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:什么警告? 是下面这个吗?

:Jan 14 08:40:46 mail-sun postfix/smtpd[29180]: [ID 947731 mail.warning] warning: maps_append: map ld
:ap:accounts has flags 0120, want flags 04100
[/quote]

看样子你应该用的是1.1.12 snapshot或2.x版本的postfix。在这个版本里。local_recipient_maps 只应该罗列出非virtual的用户。将virtual_xxx这些东西从$local_recipient_maps里去掉就不会有warning了。

jieer 发表于 2003-1-17 01:31

如果virtual用户不使用virtual投递,就应该没有问题了吧?

hzqbbc 发表于 2003-1-17 08:35

[quote]【[b]在 jieer 发表的大作中提到:[/b]】
:如果virtual用户不使用virtual投递,就应该没有问题了吧?
[/quote]
不对,还是有的。这个告警和什么transport无关。只是和什么maps有关

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.