Gentoo Archives: gentoo-user

From: Bas Zoutendijk <slzoutendijk@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Sendmail confused by network change
Date: Wed, 20 Sep 2017 09:45:06
Message-Id: 20170920094507.GA4844@blackeye
1 Dear Gentoo Users,
2
3 On my new Gentoo laptop installation I recently installed Sendmail in
4 order to receive messages from Cron on the root account. I noticed that
5 when I connect my laptop to a different network than the one I connected
6 to during booting, Sendmail does not know what to do with the Cron mail
7 any more.
8
9 For the purpose of clarity, let’s say the host name of this laptop is
10 ‘hostname’. I did not configure the domain part of the host name
11 because of the mobile nature of this machine.
12
13 When I boot at home, Cron sends mail to root@××××××××.homedomain.
14 ‘homedomain’ is automatically added to all host names on my home network
15 by the router. It can only be resolved inside the network; it is not a
16 registered domain name. I can receive mail from Cron just fine.
17
18 When I boot at work, Cron sends mail to root@hostname. Note that the
19 domain name ‘workdomain’ is not added to the host name. I can still
20 receive Cron mail. However, when I take the laptop home without
21 rebooting and connect to the home network, Sendmail is unable to deliver
22 the Cron mail for root@××××××××.homedomain and sends notifications of
23 this to root@××××××××.homedomain, which somehow do seem to arrive
24 without problems. The error message is “config error: mail loops back
25 to me”.
26
27 Based on what I can find about this error on the internet, it looks like
28 Sendmail does not know where hostname.homedomain is and asks my router
29 to resolve that. When it finds out it is localhost, it thinks something
30 is wrong and does not deliver the mail. A possible solution is to
31 register hostname.homedomain as an alias of hostname or localhost, but I
32 would rather not do that, since hard coding domain names on a laptop
33 seems kludgy to me.
34
35 Does anyone know a more elegant solution? Some way to inform Sendmail
36 about changes to the domain name, or configure it to check for these
37 changes? I would rather not have to reboot. Restarting Sendmail is
38 acceptable, I guess, but perhaps not the most elegant solution.
39
40 Sincerely,
41
42 Bas
43
44 --
45 Sebastiaan L. Zoutendijk | slzoutendijk@×××××.com

Replies

Subject Author
Re: [gentoo-user] Sendmail confused by network change John Covici <covici@××××××××××.com>
[gentoo-user] Re: Sendmail confused by network change Ian Zimmerman <itz@××××××××××××.org>