免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1092 | 回复: 0
打印 上一主题 下一主题

exim4 and gmail (zz) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-03 00:45 |只看该作者 |倒序浏览

GmailAndExim4
Using Exim4 to send Messages through GMail
Debian ships default with Exim4 as a mail server. To use this to
send messages through Google's smtp servers for GMail accounts, you
need to do the following.
# dpkg-reconfigure exim4-config
-Choose YES, split configuration into small files
-Choose mail sent by SMARTHOST; received via SMTP or fetchmail
-Type System Mail Name: localhost
-Type IP Adresses to listen on for incoming SMTP connections: 127.0.0.1
-Leave Other destinations for which mail is accepted blank
-Leave Machines to relay mail for: blank
-Type Machine handling outgoing mail for this host (smarthost): smtp.gmail.com::587
-Choose NO, don't hide local mail name in outgoing mail.
-Chose NO, don't keep number of DNS-queries minimal (Dial-on-Demand).
Run
# vi /etc/exim4/passwd.client
and add the following lines:
gmail-smtp.l.google.com:yourAccountName@gmail.com:y0uRpaSsw0RD
*.google.com:yourAccountName@gmail.com:y0uRpaSsw0RD
smtp.gmail.com:yourAccountName@gmail.com:y0uRpaSsw0RD
The following only applies to exim 4.50 in sarge; in etch and sid
the port can be configured via debconf with smtp.gmail.com::587. See
the Debian exim docs for more detailed description.
The following will only work in split configuration.
Next, tell it what port to try. Run
# vi /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost
and add the following line after the line containing "hosts_try_auth..."
port=587
Add your outgoing email-address to the /etc/exim4/email-addresses
# echo 'YOUR-USER-NAME@LocalHost: yourAccountName@gmail.com' >> /etc/exim4/email-addresses
Finally, run
# update-exim4.conf
Good luck.
Possible Problems
If this doesn't work, first enable POP for your GMail account, and then try:
# tail /var/log/exim4/mainlog.
If you see something like   
2005-10-23 21:51:04 1ETuIW-0002iB-Qo **  yourAccountName@gmail.com R=smarthost  T=remote_smtp_smarthost: SMTP error from remote mailer after  MAIL FROM: SIZE=1555:  host gmail-smtp.l.google.com [64.233.163.111]: 530  5.7.0 Authentication Required 23sm863650nzn  
except there is something different than  
gmail-smtp.l.google.com,  
the host might be resolving to something else.  In that case, replace the gmail-smtp.l.google.com in your /etc/exim4/passwd.client with whatever it says.
To try test these changes immediately---you might have failed enough times to have a very long delay between retries---run  
# exim4 -M 1ETuIW-0002iB-Qo  
but replacing that garbage ID tag from the first line of the error
entry in the log file with the ID of the failed message that you want
to resend.
exim4 4.62-2, the default version for ubuntu Edgy has authentication problems.  Bug report


403583

shows


required changes to the hosts_try_auth clause of /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost.


If you see something like
failed to open /etc/exim4/passwd.client for linear search: Permission denied (euid=102 egid=102)
exim is unable to read the password file.
The following will restore the default permissions.
# chown root:Debian-exim /etc/exim4/passwd.client
# chmod 640 /etc/exim4/passwd.client
If you see in mainlog message that states "Credentials Rejected", type:
# vi /etc/exim4/passwd.client
and replace every yourAccountName@gmail.com with yourAccountName (delete @gmail).
(2007-07-24 17:51:08由IrwissDavid编辑)
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/40232/showart_352797.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP