Can not resolve host name for sending emails

2hamed

Verified User
Joined
Apr 13, 2011
Messages
31
hey there,
I just got this notification and it seems I can't send emails(I can only receive them).
Cannot find your hostname using the command '/bin/hostname --fqdn'. Please check this command to ensure it works properly.
If you get the error:
hostname: Name or service not known

Check your /etc/resolv.conf and try setting it to use 127.0.0.1Unable to resolve your hostname, . This will cause major issues when sending email.

Solution:

Create an A record for your hostname (.) in your DNS control panel. Point the hostname to your server's main IP address. Also check /etc/hosts to ensure that the server ip is correctly set.
 
Hello,

Where did you get it? Please show results for:

Code:
/bin/hostname -f
cat /etc/resolv.conf
 
I got that in DA's message system.
here is the results for the command you said:
for:/bin/hostname -f
hostname: Name or service not known

for:cat /etc/resolve.conf
nameserver 4.2.2.4
nameserver 8.8.4.4
regards
 
So it seems hostname is not installed on your box. You should add it manually.
 
well, I use Ubuntu. but doesn't it need to be done through DirectAdmin?
or what? is it independent from DA?
 
To install it, make sure i't not installed

Code:
aptitude search hostname
i   hostname                             - utility to set/show the host name or domain name

«i» means installed.
«p» not installed

and run

Code:
aptitude install hostname

That's very simple. Read FAQ and MAN on how to use apt-get or aptitude.
 
hmm, it says it is already installed!
what to do now?
do I have to reconfigure it?
 
this is it...
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
127.0.1.1 srvubu100.screweb.com srvubu100

::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

178.162.145.82 srv771.screweb.com srv771
178.162.145.82 srv771.bitcommand.com
178.162.145.82 server1.novinhost.net
 
Post the result for
Code:
/bin/hostname

Aswell

Also, i think that 127.0.1.1 srvubu100.screweb.com srvubu100 must be removed but not sure

Regards
 
so one of the external ip in /etc/hosts (the server main, the one of directadmin license assigned) should be set to server1.novinhost.net

Regards
 
it didn't work! doing what you sail messed up everything in my server. I had to revert it.
any other help?!?!
 
Back
Top