Gentoo Archives: gentoo-user

From: John Covici <covici@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Sendmail confused by network change
Date: Wed, 20 Sep 2017 11:05:19
Message-Id: m37ewttyu0.wl-covici@ccs.covici.com
In Reply to: [gentoo-user] Sendmail confused by network change by Bas Zoutendijk
1 On Wed, 20 Sep 2017 05:45:07 -0400,
2 Bas Zoutendijk wrote:
3 >
4 > Dear Gentoo Users,
5 >
6 > On my new Gentoo laptop installation I recently installed Sendmail in
7 > order to receive messages from Cron on the root account. I noticed that
8 > when I connect my laptop to a different network than the one I connected
9 > to during booting, Sendmail does not know what to do with the Cron mail
10 > any more.
11 >
12 > For the purpose of clarity, let’s say the host name of this laptop is
13 > ‘hostname’. I did not configure the domain part of the host name
14 > because of the mobile nature of this machine.
15 >
16 > When I boot at home, Cron sends mail to root@××××××××.homedomain.
17 > ‘homedomain’ is automatically added to all host names on my home network
18 > by the router. It can only be resolved inside the network; it is not a
19 > registered domain name. I can receive mail from Cron just fine.
20 >
21 > When I boot at work, Cron sends mail to root@hostname. Note that the
22 > domain name ‘workdomain’ is not added to the host name. I can still
23 > receive Cron mail. However, when I take the laptop home without
24 > rebooting and connect to the home network, Sendmail is unable to deliver
25 > the Cron mail for root@××××××××.homedomain and sends notifications of
26 > this to root@××××××××.homedomain, which somehow do seem to arrive
27 > without problems. The error message is “config error: mail loops back
28 > to me”.
29 >
30 > Based on what I can find about this error on the internet, it looks like
31 > Sendmail does not know where hostname.homedomain is and asks my router
32 > to resolve that. When it finds out it is localhost, it thinks something
33 > is wrong and does not deliver the mail. A possible solution is to
34 > register hostname.homedomain as an alias of hostname or localhost, but I
35 > would rather not do that, since hard coding domain names on a laptop
36 > seems kludgy to me.
37 >
38 > Does anyone know a more elegant solution? Some way to inform Sendmail
39 > about changes to the domain name, or configure it to check for these
40 > changes? I would rather not have to reboot. Restarting Sendmail is
41 > acceptable, I guess, but perhaps not the most elegant solution.
42
43 Restarting sendmail seems fine with me, if you want to have something
44 that works everywhere, why not get a domain name from ddns or
45 somewhere and use a full fqdn all the time -- you can put your home
46 machine on another host in that domain and you will be good to go.
47
48 --
49 Your life is like a penny. You're going to lose it. The question is:
50 How do
51 you spend it?
52
53 John Covici
54 covici@××××××××××.com

Replies

Subject Author
Re: [gentoo-user] Sendmail confused by network change Bas Zoutendijk <slzoutendijk@×××××.com>