简体   繁体   English

exim4无法将电子邮件发送到root(所有localhost用户)

[英]exim4 cannot send email to root (all localhost users)

I have a problem with exim4 configuration. 我的exim4配置有问题。 I try to send email to root, but email stay frozen in queue. 我尝试将电子邮件发送到root,但是电子邮件保持在队列中冻结。

I tried this: 我尝试了这个:

root@server2:~# echo TEST | mail -s "Hello this is testing email" root

and email is in queue (frozen), please see some outputs below. 并且电子邮件处于排队(冻结)状态,请参见下面的一些输出。

In log (/var/log/exim4/mainlog) is this message: 在日志(/ var / log / exim4 / mainlog)中是以下消息:

2014-06-11 11:47:36 1Wuf84-0004o3-E4 <= root@server2.mydomain.cz U=root P=local S=416
2014-06-11 11:47:36 1Wuf84-0004o3-E4 remote host address is the local host: server2.mydomain.cz
2014-06-11 11:47:36 1Wuf84-0004o3-E4 == mailer-daemon@server2.mydomain.cz R=dnslookup defer (-1): **remote host address is the local host**
2014-06-11 11:47:36 1Wuf84-0004o3-E4 Frozen

Local host is routable (I hope): 本地主机是可路由的(我希望):

root@server2:~# exim -bt localhost
LOG: MAIN
  remote host address is the local host: server2.danielblazek.cz (while routing <localhost@server2.mydomain.cz>)
localhost@server2.mydomain.cz cannot be resolved at this time: remote host address is the local host
root@server2:~# 

Configuration of hostname is right: 主机名配置正确:

root@server2:~# hostname && hostname -f
server2
server2.mydomain.cz

Aliases seems to be OK: 别名似乎可以:

root@server2:~# cat /etc/aliases 
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: root
clamav: root

Do have any idea how can I fix it? 有什么想法我该如何解决? With Postfix I never have problem like that. 使用Postfix,我永远不会遇到这样的问题。 System emails always was delivered to /var/mail folder. 系统电子邮件始终发送到/ var / mail文件夹。 But with exim4 I' m on the rocks. 但是有了exim4,我就如履薄冰。 It's required for me receive system emails... 我必须收到系统电子邮件...

Please ask me if you need more information or outputs. 请问我是否需要更多信息或输出。 Thank you for all replies! 感谢您的所有回复!

Daniel 丹尼尔

remote host address is the local host is an exim error message which indicates that the sender or recipient's domain has your machine's hostname/IP, but exim is not configured to accept mail for that domain. 远程主机地址是本地主机,是一条exim错误消息,表示发件人或收件人的域具有您计算机的主机名/ IP,但exim未配置为接受该域的邮件。

Exim has a standard domainlist named +local_domains that pretty much every different exim configuration system uses. Exim具有一个名为+ local_domains的标准域列表 ,几乎所有不同的exim配置系统都使用该域列表。 See what domains are configured for your system by running: 通过运行以下命令查看为系统配置了哪些域:

exim -bP '+local_domains'

You will probably see a command that looks up a list of domains from a file. 您可能会看到一个命令,该命令从文件中查找域列表。 Put your hostname (in this case, it looks like it's an implicit hostname "localhost") in that file and exim should begin to work properly. 将您的主机名(在这种情况下,它看起来像是一个隐式主机名“ localhost”)放在该文件中,exim应该开始正常工作。 Your test was slightly incorrect; 您的测试有点不正确; you must pass the username you are delivering to, not the hostname: 您必须传递要传递给的用户名,而不是主机名:

exim -bt root

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM