我有/ etc / postfix / virtual文件:
sub.domain.com DOMAIN
@sub.domain.com user2
domain.com DOMAIN
@domain.com user1
@ sub.domain.com的邮件仍然转到user1,这不是我想要的。 这是我的/etc/postfix/my.cnf只是在以下情况:
mydomain = domain.com
myhostname = mail.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual
myorigin = $mydomain
mydestination = $myhostname, $mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 1073741824
recipient_delimiter = +
inet_interfaces = all
parent_domain_matches_subdomains =
注意,我将parent_domain_matches_subdomains设置为空。但它仍然无济于事。有什么想法吗?
答案 0 :(得分:1)
virtual_alias_maps表的右侧是非限定用户名。
Postfix将$ myorigin附加到不合格的用户名,使其有效地
@ sub.example.com user2@example.com @ example.com user1@example.com
现在,user2 @ example.com被@ example.com的捕获所吸引。
因此,user2 @ example.com的邮件将转至user1。
您可以将Postfix配置更改为:
mydomain = example.com myhostname = mail.example.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases virtual_alias_maps = hash:/etc/postfix/virtual myorigin = $mydomain mydestination = $myhostname, $mydomain, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 1073741824 recipient_delimiter = + inet_interfaces = all parent_domain_matches_subdomains = virtual_alias_domains = sub.example.com luser_relay = user2@example.com
/等/后缀/虚拟
@ sub.example.com user1@example.com
创建两个系统帐户user1和user2。