Postfix临时查找失败

我正在尝试设置后缀,但是我收到“临时查找失败”错误

main.cf:

inet_protocols = ipv4 inet_interfaces = all queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/lib/postfix data_directory = /var/lib/postfix mail_owner = postfix myhostname = ns0.dzervas.gr mydomain = dzervas.gr myorigin = dzervas.gr mynetworks_style = host mydestination = localhost, localhost.$mydomain, $myhostname, $mydomain, mail.$mydomain, www.$mydomain virtual_mailbox_base = /var/mail/vhost virtual_mailbox_maps = hash:/etc/postfix/vmailbox virtual_minimum_uid = 1000 virtual_uid_maps = static:2000 virtual_gid_maps = static:2000 virtual_alias_maps = hash:/etc/postfix/valias smtp_generic_maps = hash:/etc/postfix/generic 

vmailbox:

 [email protected] dzervas.gr/dzervas [email protected] dzervas.gr/dna [email protected] ns0.dzervas.gr/dzervas 

valias:

 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] #[email protected] [email protected] 

通用:

 [email protected] root 

远程logintesting:

 Trying <ip>... Connected to <ip>. Escape character is '^]'. 220 ns0.dzervas.gr ESMTP Postfix ehlo test.com 250-ns0.dzervas.gr 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN mail from: [email protected] 250 2.1.0 Ok rcpt to: [email protected] 451 4.3.0 <[email protected]>: Temporary lookup failure quit 221 2.0.0 Bye Connection closed by foreign host. 

journalctl报告:

 May 09 15:09:22 ns0 postfix/smtpd[7754]: error: open database /etc/aliases.db: No such file or directory May 09 15:09:22 ns0 postfix/smtpd[7754]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled May 09 15:09:22 ns0 postfix/smtpd[7754]: connect from <client-ip> May 09 15:09:43 ns0 postfix/smtpd[7754]: warning: hash:/etc/aliases is unavailable. open database /etc/aliases.db: No such file or directory May 09 15:09:43 ns0 postfix/smtpd[7754]: warning: hash:/etc/aliases lookup error for "[email protected]" May 09 15:09:43 ns0 postfix/smtpd[7754]: NOQUEUE: reject: RCPT from <client-ip>: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<test.com> May 09 15:09:52 ns0 postfix/smtpd[7754]: disconnect from <client-ip> 

我应该指出,我还没有设置的DNSlogging(dzervas.gr是不是指着我的新服务器呢)另外我在arch linux x86_64

编辑:我创build一个空的/ etc /别名,然后newaliases新问题(在telnet中):

 rcpt to: [email protected] 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table 

但!:

 rcpt to: root@localhost 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> hhahahahha . 250 2.0.0 Ok: queued as <some-code> 

编辑2:解决了Recipient address rejected: User unknown in local recipient table通过在main.cf中设置local_recipient_maps = Recipient address rejected: User unknown in local recipient tableRecipient address rejected: User unknown in local recipient table但是,现在我的邮件[email protected]得到排队! 它不会在/var/mail/vmail/dzervas.gr/dzervas/,因为它应该!

运行newaliases 。 如果/ etc / aliases不存在,那么先创build它,然后运行newaliases
另外也许更新/添加alias_maps = hash:/etc/aliases到/etc/postfix/main.cf摆脱其他警告。
然后再试一次。
(如果使用telnet进行testing,则不需要工作DNS)。


第二个问题:首先从mydestination删除$myhostname, $mydomain, ,因为这里不应该列出虚拟域。
然后添加(到main.cf):

 virtual_mailbox_domains=dzervas.gr 

重新加载后缀,然后重试。

我的networking需要严格的networking范围

在我的情况下,在/etc/postfix/main.cf有一个ip范围是错误的。

 # NG; Temporary lookup failure mynetworks = 172.16.0.0/8 # OK mynetworks = 172.16.0.0/12 

/var/log/maillog中有一个错误,我后来注意到了。

10月4日13:47:54 postfix / smtpd [25056]:警告:“172.16.0.0/8”中的非空主机地址位,也许你应该使用“172.0.0.0/8”

如果有人来自谷歌的顶部searchTemporary lookup failure ,我会说请复审检查您的$mynetworks格式。