Gentoo Archives: gentoo-user

From: Ian Zimmerman <itz@××××××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Sendmail confused by network change
Date: Wed, 20 Sep 2017 15:23:47
Message-Id: 20170920152333.dhpdq3bheabqnosw@matica.foolinux.mooo.com
In Reply to: [gentoo-user] Sendmail confused by network change by Bas Zoutendijk
1 On 2017-09-20 11:45, Bas Zoutendijk wrote:
2
3 > When I boot at home, Cron sends mail to root@××××××××.homedomain.
4 > ‘homedomain’ is automatically added to all host names on my home
5 > network by the router. It can only be resolved inside the network; it
6 > is not a registered domain name. I can receive mail from Cron just
7 > fine.
8 >
9 > When I boot at work, Cron sends mail to root@hostname. Note that the
10 > domain name ‘workdomain’ is not added to the host name. I can still
11 > receive Cron mail. However, when I take the laptop home without
12 > rebooting and connect to the home network, Sendmail is unable to
13 > deliver the Cron mail for root@××××××××.homedomain and sends
14 > notifications of this to root@××××××××.homedomain, which somehow do
15 > seem to arrive without problems. The error message is “config error:
16 > mail loops back to me”.
17
18 According to crontab(5), you can configure where the mail is sent, by
19 setting the MAILTO variable in the crontab file. [This is for cronie, I
20 am not sure if other cron variants do this.] So, you could tell it to
21 send to <me@localhost>; presumably this would solve the problem.
22
23 Despite being one of the retro/traditionalist guys on this list, I have
24 to say installing sendmail just for this purpose doesn't seem
25 proportionate. Even if you don't want to look into the smallish MTA
26 packages (nullmailer etc.), you can make /usr/sbin/sendmail to be a
27 pretty trivial script (or a link to one) that just locks the destination
28 mailbox and appends the input to it. Heck, procmail could do that.
29
30 --
31 Please don't Cc: me privately on mailing lists and Usenet,
32 if you also post the followup to the list or newsgroup.
33 Do obvious transformation on domain to reply privately _only_ on Usenet.

Replies

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