Re: [exim] allowing bind to fail

Etusivu
Poista viesti
Vastaa
Lähettäjä: W B Hacker
Päiväys:  
Vastaanottaja: exim users
Aihe: Re: [exim] allowing bind to fail
Jim Gottlieb wrote:
> For years we've been using a single config file for all our mail
> servers that had the following:
>
> local_interfaces = 0.0.0.0.25 : 0.0.0.0.5190 : 0.0.0.0.587
>
> But now we have a machine where we're running a special SMTP instance
> on just one of its interfaces. So I thought I would just make sure I
> start that other one first. But when exim can't bind to all
> interfaces, it exits:
>
>    socket bind() to port 25 for address (any IPv4) failed: Address  
> already in use: daemon abandoned

>
> Likewise if I tried listing all possible addresses under
> local_interfaces, hoping it would bind to those it could and just
> forget about the rest.
>
> So is there any way to do what I'm trying to do without having a
> special config file for this one host? I'd like it to soft fail when
> it can't bind to a particular address.
>
> Thanks...
>
>


Surely.

Presuming you seek a 'portable' configure files, do it as in the
configure.default file shipped with Exim:

Do not specify 'local_interfaces' at all.

Wildcarding also works:

local_interfaces = *

Either way, specify the ports, and ONLY the ports, separately.

daemon_smtp_ports = 25 : 587 : 5190

(CAVEAT 5190 is non-standard)

FWIW, some folks use a lookup or MACRO to drive the choice of interfaces (and
more) from an external source.

That lets you 'standardize' your configure file across servers, yet easily
customize them. See also 'require_files' for a way to prevent them going on-line
if NOT so customized.


Bill