Eximconfiguration – 仅在本地主机上监听25

我想使用Exim4作为我的服务器的MTA,但基本上只发送电子邮件。 对于安全问题,我想限制传入连接到本地主机(我认为)。 所以在exim4configuration中有这个选项可以指定:

侦听SMTP连接的IP地址:

如果我把localhost放在那里,我完全可以通过mutt和邮件发送邮件,但是我的机器上的其他服务不能连接到exim守护进程来发送邮件,特别是因为如果我指定了localhost,那么没有绑定到端口tcp / 25上面的领域。

当然,如果我把字段留空,一切正常,但我不想听任何其他人比我自己的机器tcp / 25 …这是我的日志,当所有的连接被接受,本地服务如ossec :

2013-10-08 12:26:13 1VTcv7-XXXXX-XX <= [email protected] H = localhost(notify.ossec.net)[127.0.0.1] P = smtp S = 979

如果你真的把“本地主机”放在这个设置中,可以尝试把:

dc_local_interfaces='127.0.0.1 ; ::1' 

dpkg-reconfigure exim4-config期间 ,如果select“Internet站点”作为types,则第二个问题如下所示:

 Please enter a semicolon-separated list of IP addresses. The Exim SMTP listener daemon will listen on all IP addresses listed here. An empty value will cause Exim to listen for connections on all available network interfaces. If this system only receives mail directly from local services (and not from other hosts), it is suggested to prohibit external connections to the local Exim daemon. Such services include e-mail programs (MUAs) which talk to localhost only as well as fetchmail. External connections are impossible when 127.0.0.1 is entered here, as this will disable listening on public network interfaces. IP-addresses to listen on for incoming SMTP connections: 

简单地说,在这个领域下面:

 127.0.0.1; ::1 

如果你不使用基于debian的configuration,那么一般的configuration指令是:

 local_interfaces = 127.0.0.1.25 # At least, when assuming this: disable_ipv6 = true