Local Mail a Fail

So now the slightly longer version after having read (most) of the thread. If the OP can't be bothered to read documentation then I can't be bothered to spent too much time on this.

First things first, regarding my message above, please see the attached screenshot of this message. I recreated the whole setup; using a hostname without the FQDN, and local mail works just fine. When you truly use this 'out of the box' then this simply works as intended. Even if you make the mistake of not using a FQDN.

However, there is also a problem to address here, which is local unbound. I have used it myself a few times (or tried to) and my general opinion is that it's usually more trouble than it's worth. In most cases it doesn't work for me, let alone work 'out of the box'. I can get it to work by reconfiguring it (see /var/unbound), but one should also wonder why you'd want to use this in the first place? One way or the other you'll be using a DNS server, and those do their own caching as well. Why add even more to that?

And it's also noteworthy to mention that using Unbound has nothing to do with an "out of the box" kind of scenario:

Code:
peter@zefiris:/etc/defaults $ grep unbound rc.conf
local_unbound_enable="NO"       # local caching resolver
I realize that I'm playing the devils advocate a bit right now, but it doesn't change the fact that in a pristine 'out of the box' FreeBSD environment this service isn't used, as seen above.

Ergo: your problem isn't so much the local mail, but involves local unbound. Personally I'd recommend to turn it off, throw it into /dev/null and then forget all about it.

(edit)

Please please please....
CHECK /etc/hosts.allow

It seems there is a TCP wrapped sendmail process (so inetd superserver is required), and localhost could be "blocked" according to the settings.
inetd isn't used out of the box by FreeBSD:

Code:
peter@zefiris:/etc/defaults $ grep inetd rc.conf
inetd_enable="NO"               # Run the network daemon dispatcher (YES/NO).
inetd_program="/usr/sbin/inetd" # path to inetd, if you want a different one.
inetd_flags="-wW -C 60"         # Optional flags to inetd
Another problem with your theory is that the default MTA (sendmail) gets started in localhost mode only, and none of the errors shared by the OP point in this direction.

What you're describing simply cannot happen on a freshly installed FreeBSD environment, which is what the OP was talking about.
 

Attachments

  • fbsd-mail.jpg
    fbsd-mail.jpg
    136 KB · Views: 247
ShelLuser
if you don't have Network at all above won't work until you manually edit the hosts file. I also checked it on the vm without any network and the mail is trying to send it to root@hostname and it fail to resolve the hostname if it's not in /etc/hosts. In my network the DHCP is updating the local DNS server and it work without any modification to the hosts.
 
Well, the first time I started the cashing DNS, it made some changes in the system automatically, I mentioned it in this forum. Perhaps dns/unbound introduced the strange behaviour, but the correctly working /etc/hosts mechanism should be enough for mail/sendmail.

I had previously dns/bind as caching DNS. My experience is, that mail/sendmail is by far the most complicated daemon to configure, that it and not the DNS server normally makes troubles. In that sense Wozzeck.Live is right.
 
Back
Top