Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5351970
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: LINUX

2006-11-28 11:12:07

qmail 中多主机名和虚拟域名的区别 
打印 
E-mail 
2004-09-29 
里面的 3.3 和 3.4 节详细的阐述了他们的区别。但是很多人可能对这个概念认识不是很深入。
如果采用 遇到以下错误时,估计就是 locals 和 virtualdomains 文件设置出错。

deferral: Unable_to_chdir_to_maildir._(#4.2.1)

我的 locals 是空的, virtualdomains 的格式是

vd1.com:vd1.com
vd2.com:vd2.com

实际上结合 users/assign 文件就可以知道qmail和 vpopmail 对整个电子邮件的处理流程。


3.3. Multiple host names
If your system is known by more than one name, e.g., all addresses of the form
can also be written as or
, then you need to tell qmail this so it'll know which addresses it
should deliver locally and which messages it should accept from remote systems.
To do this, just add all of the names to two control files:
rcpthosts, which tells qmail.smtpd to accept mail addressed to these hosts, and ·
locals, which tells qmail.send that addresses on these hosts are to be delivered locally. ·
Send qmail.send a HUP (hangup) signal to tell it to reread locals. If you have qmailctl, you
can do:

qmailctl reload


3.4. Virtual domains
Virtual domains are similar to the multiple host names discussed in the previous section, but there are
some important differences. First, if example.net hosts the virtual domain
virtual.example.com, it's generally not true that messages sent to

should end up in the same mailbox as messages sent to The
namespace for each virtual domain is distinct.
With qmail, virtual domains are configured in the virtualdomains file, which consists of one or
more entries of the form:
user@domain:prepend
qmail converts user@domain to prepend.user@domain and treats the result as if domain
was local. The user@ part is optional. If it's omitted, the entry matches all @domain addresses.
Returning to the example scenario above, if the example.net mail administrator wanted to create a
virtual domain, virtual.example.com, under the administrative control of user john, the
following entry in virtualdomains would accomplish that:
virtual.example.com:john

An incoming message to would be rewritten as
john. and delivered locally. See the .qmail section, and the
extension addresses subsection for more information about how john can manage his virtual domain.
As with multiple host names, all virtual domains must be listed in rcpthosts so qmail.smtpd
will know to accept messages addressed to them.

!!! However, unlike multiple host names, virtualdomains must not be added to locals.

After modifying virtualdomains, send qmail.send a HUP (hangup) signal to tell it to reread
the file. If you have qmailctl, you can do:

qmailctl reload
阅读(1405) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~