我在 centOS 5.4 上安装了 amavis + postfix + spamassassin。“/etc/hosts”文件包含:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
67.215.65.132 mail.sufalamtech.local mail
当我发送邮件时,出现以下错误:
Apr 8 06:20:53 mail sendmail[3229]: o380oqu7003229: from=root, size=62, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Apr 8 06:20:53 mail postfix/smtpd[3230]: connect from mail.sufalamtech.local[127.0.0.1]
Apr 8 06:20:53 mail sendmail[3229]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Apr 8 06:20:54 mail postfix/smtpd[3230]: 5A53C1A5989: client=mail.sufalamtech.local[127.0.0.1], [email protected]
Apr 8 06:20:54 mail postfix/cleanup[3238]: 5A53C1A5989: message-id=<[email protected]>
Apr 8 06:20:54 mail sendmail[3229]: o380oqu7003229: [email protected], ctladdr=root (0/0), delay=00:00:02, xdelay=00:00:01, mailer=relay, pri=30062, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 5A53C1A5989)
Apr 8 06:20:54 mail postfix/qmgr[3107]: 5A53C1A5989: from=<[email protected]>, size=587, nrcpt=1 (queue active)
Apr 8 06:20:54 mail postfix/smtpd[3230]: disconnect from mail.sufalamtech.local[127.0.0.1]
Apr 8 06:20:54 mail postfix/smtp[3240]: 5A53C1A5989: to=<[email protected]>, relay=none, delay=0.63, delays=0.17/0.1/0.36/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.sufalamtech.local type=A: Host not found)
Apr 8 06:20:54 mail postfix/cleanup[3238]: E73C51A5987: message-id=<[email protected]>
Apr 8 06:20:54 mail postfix/qmgr[3107]: E73C51A5987: from=<>, size=2594, nrcpt=1 (queue active)
Apr 8 06:20:54 mail postfix/bounce[3241]: 5A53C1A5989: sender non-delivery notification: E73C51A5987
Apr 8 06:20:54 mail postfix/qmgr[3107]: 5A53C1A5989: removed
Apr 8 06:20:55 mail postfix/local[3242]: E73C51A5987: to=<[email protected]>, relay=local, delay=0.15, delays=0.02/0.1/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
Apr 8 06:20:55 mail postfix/local[3242]: warning: host not found: localhost
Apr 8 06:20:55 mail postfix/qmgr[3107]: E73C51A5987: removed
Apr 8 06:21:04 mail postfix/qmgr[3107]: warning: connect to transport amavis: No such file or directory
Apr 8 06:22:04 mail postfix/qmgr[3107]: warning: connect to transport amavis: No such file or directory
答案1
您尝试过任何诊断吗?
如果你从命令行查找,会发生什么:
host mail.sufalamtech.local
如果返回“未找到主机”,则表明问题出在 Postfix 之外。例如,/etc/nsswitch.conf 可能仅将 dns 列为主机的解析器。如果您希望它使用主机文件,则 nsswitch.conf 中“文件”必须出现在“主机”旁边。
如果您对 host 命令没有问题,那么可能是 postfix 配置中的某些内容触发了名称服务查找。您使用的是传输文件吗?
在 postfix 邮件列表中,他们总是要求人们发布他们的 postconf -n 的输出,该输出显示配置中默认设置的所有更改。