目标:Debian环境下,用Exim4 + fetchmail + mutt来收发gmail电子邮件。
1、设置exim4,通过smarthost外发邮件
(1)将配置文档拆分成小文件么? 否
(2)选择“用smarthost发信;通过smtp或fetchmail接受邮件”
(3)系统邮件名称,随意;(这里我写了tom.com)
(4)要监听的入站 SMTP 连接的 IP 地址:127.0.0.1 (这样,就只有本机可以利用 exim4)
(5)其它可接受的邮件目的地址:(empty)
(6)为这些主机进行邮件转发:(empty)
(7)负责处理从本机寄出的邮件的机器(smarthost):真正用来外发邮件的smtp地址
(我这里用smtp. gmail.com)
(8)要在寄出的邮件中隐藏本地邮件名称吗? 是
(9)本地用户的可视域名:同(3)
(10)保持最小 DNS 查询量吗(按需拔号 Dial-on-Demand)? 否
还要修改几个配置文件:
(1)/etc/ exim4/passwd.client,smtp的帐号密码设置,加入:
后一个地址非常重要,当 exim 联向 smtp. gmail.com 时它会以类似重定向的方式联向 gmail-smtp.l.google.com,所以也要给它写上认证信息。
(2)/etc/email-addresses,系统邮箱地址,加入:
(3)/etc/ exim4/ exim4.conf.template, exim4配置文件
1、设置exim4,通过smarthost外发邮件
$dpkg-reconfigure exim4-config
(1)将配置文档拆分成小文件么? 否
(2)选择“用smarthost发信;通过smtp或fetchmail接受邮件”
(3)系统邮件名称,随意;(这里我写了tom.com)
(4)要监听的入站 SMTP 连接的 IP 地址:127.0.0.1 (这样,就只有本机可以利用 exim4)
(5)其它可接受的邮件目的地址:(empty)
(6)为这些主机进行邮件转发:(empty)
(7)负责处理从本机寄出的邮件的机器(smarthost):真正用来外发邮件的smtp地址
(我这里用smtp. gmail.com)
(8)要在寄出的邮件中隐藏本地邮件名称吗? 是
(9)本地用户的可视域名:同(3)
(10)保持最小 DNS 查询量吗(按需拔号 Dial-on-Demand)? 否
还要修改几个配置文件:
(1)/etc/ exim4/passwd.client,smtp的帐号密码设置,加入:
smtp.gmail.com:someone@gmail.com:password
gmail-smtp.l.google.com:someone@gmail.com:password
后一个地址非常重要,当 exim 联向 smtp. gmail.com 时它会以类似重定向的方式联向 gmail-smtp.l.google.com,所以也要给它写上认证信息。
(2)/etc/email-addresses,系统邮箱地址,加入:
user: josephpei@gmail.com
(3)/etc/ exim4/ exim4.conf.template, exim4配置文件
### transport/30_exim4-config_remote_smtp_smarthost
#################################
# This transport is used for delivering messages over SMTP connections
# to a smarthost. The local host tries to authenticate and does some
# modification in headers and return-path.
# This transport is used for smarthost and satellite configurations.
remote_smtp_smarthost:
debug_print = "T: remote_smtp_smarthost for $local_par