我最近买了一台安装有DirectAdmin的vps服务器。一切工作正常,但我不能发送电子邮件。 的管理向导的消息系统发出了这样的通知:如何在VPS上设置'hostname fqdn'
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.
我的/ etc/hosts文件包含此:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain 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
178.162.145.82 srv771.bitcommand.com
178.162.145.82 server1.novinhost.net