在Ubuntu 10.10上设置传出邮件

我正在林德设置VPS,但我似乎无法设置像sendmail邮件发送程序,以便我可以通过PHP发送电子邮件

我被困在改变主机名的第一步。 我更改了/etc/hostname/etc/hosts下的条目,但是当我甚至重新启动VPS时,则hostname -f显示hostname: Name or service not known

怎么了? 和任何好的教程设置东西?

我正在使用nginx,如果这在某种情况下很重要。

/etc/hosts

 127.0.0.1 localhost 178.79.162.174 mail.bankpo.in # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 

/etc/hostname

 mail.bankpo.in 

which hostname返回/bin/hostname

像这样编辑/etc/hosts

 127.0.0.1 mail.bankpo.in mail localhost 178.79.162.174 mail.bankpo.in mail 

把这个添加到/etc/resolv.conf

 domain bankpo.in search bankpo.in 

然后,重新启动并尝试使用/bin/hostname --fqdn

要设置电子邮件,这是我会做的:

 sudo apt-get dist-upgrade -y && sudo apt-get update -y sudo reboot sudo apt-get install postfix mailutils -y sudo postconf -e "mydestination = mail.bankpo.in, bankpo.in, localhost.localdomain, localhost" sudo postconf -e "mynetworks = 0.0.0.0/32" sudo postconf -e "inet_interfaces = all" sudo /etc/init.d/postfix restart