1. Install and configure sendmail to enable ubuntu to send mail
1. Install 2 required packages
Apt-get install sendmail
Apt-get install sendmail-cf
#cat /etc/hosts
127.0.0.1 mail.qq.com localhost.localdomain localhost
#cat /etc/mail/access
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1
Connect:mail.qq.com RELAY
# cat /etc/mail/local-host-names
mail.qq.com
/etc/init.d/sendmail restart