Dear Gentoo Users, On my new Gentoo laptop installation I recently installed Sendmail in order to receive messages from Cron on the root account. I noticed that when I connect my laptop to a different network than the one I connected to during booting, Sendmail does not know what to do with the Cron mail any more.
For the purpose of clarity, let’s say the host name of this laptop is ‘hostname’. I did not configure the domain part of the host name because of the mobile nature of this machine. When I boot at home, Cron sends mail to root@hostname.homedomain. ‘homedomain’ is automatically added to all host names on my home network by the router. It can only be resolved inside the network; it is not a registered domain name. I can receive mail from Cron just fine. When I boot at work, Cron sends mail to root@hostname. Note that the domain name ‘workdomain’ is not added to the host name. I can still receive Cron mail. However, when I take the laptop home without rebooting and connect to the home network, Sendmail is unable to deliver the Cron mail for root@hostname.homedomain and sends notifications of this to root@hostname.homedomain, which somehow do seem to arrive without problems. The error message is “config error: mail loops back to me”. Based on what I can find about this error on the internet, it looks like Sendmail does not know where hostname.homedomain is and asks my router to resolve that. When it finds out it is localhost, it thinks something is wrong and does not deliver the mail. A possible solution is to register hostname.homedomain as an alias of hostname or localhost, but I would rather not do that, since hard coding domain names on a laptop seems kludgy to me. Does anyone know a more elegant solution? Some way to inform Sendmail about changes to the domain name, or configure it to check for these changes? I would rather not have to reboot. Restarting Sendmail is acceptable, I guess, but perhaps not the most elegant solution. Sincerely, Bas -- Sebastiaan L. Zoutendijk | slzoutend...@gmail.com