BSMTP send message Error

I am trying to setup alerting on my bacula server. It is running FREEBSD. Whenever i go to send a message i get the following error (bsmtp.c:377 Fatal gethostbyname for myself failed "": ERR=Unknown error:) I have verified that localhost is listening on port 25. Any ideas?
 
Fixed it

the machine hostname has to be added in /etc/rc.conf. edit that file and add the following line hostname="hostname.mydomain.com" and reboot.
 
From gethostbyname(3)
Code:
      When using the nameserver, gethostbyname() and gethostbyname2() will
     search for the named host in the current domain and its parents unless
     the name ends in a dot.  If the name contains no dot, and if the environ-
     ment variable ``HOSTALIASES'' contains the name of an alias file, the
     alias file will first be searched for an alias matching the input name.
     See hostname(7) for the domain search procedure and the alias file for-
     mat.

So it has something to do with the resolver.

  • What is the contents of the /etc/resolv.conf?

  • What is the output of hostname and dig -x 127.0.0.1?

BTW please use [code] and [/code] tags ;)
 
Back
Top