Postfix 忽略虚拟地图

Cod*_*ree 5 postfix

我正在使用 Postfix,当我尝试向虚拟地址 (paradise@example.org) 发送电子邮件时,它无法找到用户:

Aug  7 11:55:32 example postfix/local[24435]: AE54C808E546: to=<paradise@example.org>, relay=local, delay=6.6, delays=4.8/0.47/0/1.4, dsn=5.1.1, status=bounced (unknown user: "paradise")
Run Code Online (Sandbox Code Playgroud)

我正在使用以下虚拟地图:

paradise@example.org horus
@example.org horus
Run Code Online (Sandbox Code Playgroud)

其中 horus 是我的(非 root)Unix 用户。如果我尝试通过执行以下操作来验证虚拟地址:

postmap -q paradise@example.org hash:/etc/postfix/virtual
Run Code Online (Sandbox Code Playgroud)

它返回我当前的用户:

horus
Run Code Online (Sandbox Code Playgroud)

正因为如此,我不知道为什么找不到天堂@example.org或天堂。

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = example.org,localhost
myhostname = example.org
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = example.org
readme_directory = no
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
virtual_alias_maps = hash:/etc/postfix/virtual
Run Code Online (Sandbox Code Playgroud)

而我的/etc/aliases(但据我所知,它仅用于本地传递)是:

...
www:            webmaster
webmaster:      root
noc:            root
security:       root
hostmaster:     root
info:           postmaster
marketing:      postmaster
sales:          postmaster
support:        postmaster


# trap decode to catch security attacks
decode:         root

# Person who should get root's mail
root:           horus
Run Code Online (Sandbox Code Playgroud)

数据库看起来没问题:

db_dump /etc/postfix/virtual.db -p

VERSION=3
format=print
type=hash
h_nelem=4098
db_pagesize=4096
HEADER=END
paradise@example.org\00
horus\00
@example.org\00
horus\00
DATA=END
Run Code Online (Sandbox Code Playgroud)

配置有什么问题?

eKK*_*KiM 2

你跑了吗:

postmap /etc/postfix/virtual
postfix reload
Run Code Online (Sandbox Code Playgroud)