如何配置exim以在没有DNS的情况下将邮件发送到LAN

时间:2014-03-16 20:48:16

标签: email dns lan exim exim4

我正在尝试将exim配置为直接通过LAN发送邮件而不使用DNS,但我没有运气这样做......

两端都有一台服务器,其中有一个面向Internet的接口和一个本地接口。我需要使用本地接口。

当我从一台服务器telnet到端口25到另一台服务器时,它就像一个魅力。但是,当我尝试通过exim发送邮件时,它坚持要我将邮件发送给自己。

我已将此路由器添加到具有本地接口11.11.0.1的服务器:

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

甚至强迫remote_smtp使用正确的接口:

remote_smtp:
  driver = smtp
  interface = 11.11.0.1

如果我尝试将邮件表单11.11.0.1发送到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

这应该是日志的相关部分:

--------> 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

您是否知道如何说服exim不将11.11.0.2视为本地地址?

谢谢,

Drasha

1 个答案:

答案 0 :(得分:0)

看来你的exim认为11.11.0.2指的是你自己的机器,即你有一些配置设置(local_interfacesextra_local_interfaceshosts_treat_as_local),包括11.11.0.2。

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

来调整
self = send

到您的 new_router 配置,虽然最好修复原始问题而不是修补症状,因为如果你搞砸了本地的问题,你可能会遇到各种其他奇怪的问题主持人而不是。

BTW,命令exim -bP | grep local显示什么?