postmp -s
列出了测试文件的内容,但postmap -q
与查询不匹配。我遗漏了什么?
Postfix 版本和测试文件
[root@relay postfix]# rpm -q postfix
postfix-3.9.0-8.fc41.x86_64
[root@relay postfix]# cat accessTest
[email protected] OK
[email protected] REJECT
[email protected] OK
[email protected] 521
建立数据库并显示内容
[root@relay postfix]# postmap -v accessTest
postmap: name_mask: ipv4
postmap: inet_addr_local: configured 2 IPv4 addresses
postmap: open hash accessTest
postmap: Compiled against Berkeley DB: 5.3.28?
postmap: Run-time linked against Berkeley DB: 5.3.28?
[root@relay postfix]# postmap -s accessTest
[email protected] OK
[email protected] REJECT
[email protected] OK
[email protected] 521
测试查询返回 Shell 错误
[root@orelay postfix]# postmap -q aaa@ accessTest
[root@relay postfix]# echo $?
1
还测试了:
postmap -q example.com accessTest
postmap -q .example.com accessTest
postmap -q ddd@ accessTest
postmap -q ddd+extra@ accessTest
全部返回 shell 代码 1。