sendmail via gmail
I am trying to use smtp.gmail.com as my smtp server to send mail for my domain iserver.com. When I try to send an email I get the following:
root@Iserver-web1:/etc/mail/auth# mail -v joep83@gmail.com
Subject: test
pc
EOT
^C
root@Iyearbook-web1:/etc/mail/auth# WARNING: local host name (Iserver-web1) is not
qualified; see cf/README: WHO AM I?
joep83@gmail.com... Connecting to [127.0.0.1] via relay...
joep83@gmail.com... Deferred: Connection refused by [127.0.0.1]
Thanks in advance for your help开发者_运维百科
Simply restart the sendmail service, you can do this by
service restart sendmail
This fixed my problem
As http://mail.google.com/support/bin/answer.py?answer=13287 says, you need to be using authentication and communicating over a secure channel (eg using ssl). You are probably not configured to do this locally.
I would send mail using exim, and configure exim to use gmail to send mail. It looks like http://typo.submonkey.net/articles/2005/9/9/use-gmail-as-a-smart-host has advice on how to do this.
精彩评论