Re: [exim] localhost vs 127.0.0.1

Top Page
Delete this message
Reply to this message
Author: Heiko Schlittermann
Date:  
To: exim-users
Subject: Re: [exim] localhost vs 127.0.0.1
Hi,

Mihamina Rakotomandimby <mihamina@???> (Mo 11 Mär 2013 10:20:45 CET):
>
>
> Connecting to Exim via "localhost" is denies relay
> Connecting to Exim via 127.0.0.1 accepts the relay
> "localhost" is in the local_domains domainlists
> "localhost" is resolving to 127.0.0.1 in /etc/hosts


"localhost" may resolve to ::1 too, is visible in your example:

> [mihamina@recette53 ~]$ rpm -aq | grep exim
> exim-4.72-4.el6.x86_64
>
> [mihamina@recette53 ~]$ telnet localhost 25
> Trying ::1...
> Connected to localhost.
> Escape character is '^]'.
> 220 recette53.ideoneov.com ESMTP Exim 4.72 Mon, 11 Mar 2013 10:09:27 +0100
> HELO mihamina
> 250 recette53.ideoneov.com Hello localhost [::1]



> mihamina@recette53 ~]$ telnet 127.0.0.1 25
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> 220 recette53.ideoneov.com ESMTP Exim 4.72 Mon, 11 Mar 2013 10:10:26 +0100
> HELO mihamina
> 250 recette53.ideoneov.com Hello localhost [127.0.0.1]
> MAIL from: <mrakotom@???>


The ::1 source address is not in your lists of allowed to use your host
as a relay.

And: local_domains is not related to the list of allowed senders. You
should check the hostlist relay_from_hosts = …, this list contains a
list of hosts allowed for relaying. (The name relay_from_hosts is not
hard coded, it depends on the ACL settings, but the example configs use
this name.)

Probably

    hostlist relay_from_hosts = <; 127.0.0.1; ::1


helps. Or disable IPv6 globally or just prevent exim from binding to
::1.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
 gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-