local mail submission sendmail fails when loopback is down
TL;DR: `sendmail <address>` fails with `sendmail: fatal: could not find
any active network interfaces` if loopback interface is not up. Is this
I know applications can expect the loopback interface to be available.
However, strictly speaking, sendmail when invoked for local mail
submission shouldn't attempt to access the network, all it has to do is
drop the file into the maildrop directory. It shouldn't have open any
kind of network socket, and indeed it does work even with postfix daemon
The background for this werid question, by the way, is that I was poking
about an application I have, and I wanted to see what would happen if I
ran it without internet access. The expected outcome was that it'd
gracefully fail and send me a nice e-mail with a notification - which
would be delivered whenever the site got internet access back. So I ran
Re: local mail submission sendmail fails when loopback is down
> On Jun 8, 2018, at 6:47 AM, Daniel Armengod <[hidden email]> wrote:
> TL;DR: `sendmail <address>` fails with `sendmail: fatal: could not find
> any active network interfaces` if loopback interface is not up. Is this
> expected behaviour?
Yes, expected. The failure is in common initialization code that is
not sendmail command specific. The "mynetworks", "myhostname",
"mydomain" and "myorigin" parameters are initialized in the same way
across all of Postfix, and internally a list of "own" network
addresses is also computed. This code expects to find at least one
interface even on systems not connected to a network.