0

I am trying to configure exim to send mails directly over LAN without DNS, but I have no luck doing it...

On both ends there is a server with one Internet-facing interface and one local interface. I need to use the local interface.

When I telnet to port 25 from one server to another, it works like a charm. However, when I try to send mail via exim, it insist that I am trying to send the mail to myself.

I have added this router to server with local interface 11.11.0.1:

new_router:
  driver = manualroute
  domains = 11.11.0.2
  transport = remote_smtp
  route_list = * 11.11.0.1

and even forced the remote_smtp to use the correct interface:

remote_smtp:
  driver = smtp
  interface = 11.11.0.1

This is what I get if I try to send a mail form 11.11.0.1 to 11.11.0.2:

2014-03-16 22:11:38 1WPILK-0004YD-O1 == test@11.11.0.2 R=new_router defer (-1): remote host address is the local host
2014-03-16 22:11:39 1WPILK-0004YD-O1 Frozen

This should be the relevant part of the log:

--------> new_router router <--------
local_part=test domain=11.11.0.2
checking domains
11.11.0.2 in "11.11.0.2"? yes (matched "11.11.0.2")
calling new_router router
new_router router called for test@11.11.0.2
  domain = 11.11.0.2
route_item = * 11.11.0.1
11.11.0.2 in "*"? yes (matched "*")
original list of hosts = "11.11.0.1" options =
expanded list of hosts = "11.11.0.1" options =
set transport remote_smtp
finding IP address for 11.11.0.1
calling host_find_byname
gethostbyname2(af=inet6) returned 1 (HOST_NOT_FOUND)
local host found for non-MX address
fully qualified name = 11.11.0.1
gethostbyname2 looked up these IP addresses:
  name=11.11.0.1 address=11.11.0.1
LOG: MAIN
  remote host address is the local host: 11.11.0.2
new_router router: defer for test@11.11.0.2
  message: remote host address is the local host
added retry item for R:11.11.0.2: errno=-1 more_errno=0 flags=0
post-process test@11.11.0.2 (1)
LOG: MAIN
  == test@11.11.0.2 R=new_router defer (-1): remote host address is the local host

Do you have any idea how to convince exim to not treat 11.11.0.2 as a local address?

Thanks,

Drasha

4

1 回答 1

0

您的 exim 似乎认为 11.11.0.2 是指您自己的机器,即您有一些配置设置(local_interfacesextra_local_interfaceshosts_treat_as_local,其中包括 11.11.0.2。

默认情况下,手动路由路由器旨在为您提供远程主机,但也可以通过添加来调整

self = send

到您的new_router配置,尽管最好修复原始问题而不是修补症状,因为如果您弄乱了被认为是本地主机而不是本地主机,您可能会遇到各种其他奇怪的问题。

顺便说一句,命令exim -bP | grep local显示什么?

于 2014-04-02T07:19:52.953 回答