Re: [gentoo-user] Sendmail confused by network change
On Wed 20 Sep 2017 at 19:02:52 +0200, J. Roeleveld wrote: > To clarify: > The IP-address determines how it is accessible. If the IP is not accessible > from the rest of the world, then you don't have to worry too much about > securing your mailserver. > > The domain name is only an address-book entry. Unless it is fully entered > into > the public one, noone will see the IP you are using. And as mentioned above, > even if they can, the IP is sitting behind a router and is most likely in a > private range. Good to know, thanks. Sincerely, Bas -- Sebastiaan L. Zoutendijk | slzoutend...@gmail.com
Re: [gentoo-user] Sendmail confused by network change
On Wednesday, September 20, 2017 6:50:54 PM CEST Bas Zoutendijk wrote: > Dear John, > > On Wed 20 Sep 2017 at 07:05:11 -0400, John Covici wrote: > > Restarting sendmail seems fine with me, if you want to have something > > that works everywhere, why not get a domain name from ddns or > > somewhere and use a full fqdn all the time -- you can put your home > > machine on another host in that domain and you will be good to go. > > Thank you for this suggestion. I added ‘.localdomain’ to my host name > and now Sendmail uses this domain name on all networks. Cron mail > arrives again at home. Glad it works now. > I did not want to try a ‘real’ domain name, as this could make the > system accessible from outside the local network, if I understand > correctly. To say it bluntly, you don't :) > Right now it is hidden behind the router and only has a > local IP address. I would like to keep it that way, because then I do > not have to worry about network security settings. Nevertheless you led > me to a solution. This is how it works. To clarify: The IP-address determines how it is accessible. If the IP is not accessible from the rest of the world, then you don't have to worry too much about securing your mailserver. The domain name is only an address-book entry. Unless it is fully entered into the public one, noone will see the IP you are using. And as mentioned above, even if they can, the IP is sitting behind a router and is most likely in a private range. -- Joost
Re: [gentoo-user] Sendmail confused by network change
Dear John, On Wed 20 Sep 2017 at 07:05:11 -0400, John Covici wrote: > Restarting sendmail seems fine with me, if you want to have something > that works everywhere, why not get a domain name from ddns or > somewhere and use a full fqdn all the time -- you can put your home > machine on another host in that domain and you will be good to go. Thank you for this suggestion. I added ‘.localdomain’ to my host name and now Sendmail uses this domain name on all networks. Cron mail arrives again at home. I did not want to try a ‘real’ domain name, as this could make the system accessible from outside the local network, if I understand correctly. Right now it is hidden behind the router and only has a local IP address. I would like to keep it that way, because then I do not have to worry about network security settings. Nevertheless you led me to a solution. Thank you, Bas -- Sebastiaan L. Zoutendijk | slzoutend...@gmail.com
Re: [gentoo-user] Sendmail confused by network change
On Wed, 20 Sep 2017 05:45:07 -0400, Bas Zoutendijk wrote: > > 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. Restarting sendmail seems fine with me, if you want to have something that works everywhere, why not get a domain name from ddns or somewhere and use a full fqdn all the time -- you can put your home machine on another host in that domain and you will be good to go. -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici cov...@ccs.covici.com