mutt+fetchmail+exim配置

本文详细介绍了如何在Debian系统中,使用Exim4作为邮件传输代理,fetchmail收取gmail邮件,以及配置mutt进行邮件发送。步骤包括:设置exim4的smarthost外发邮件,配置exim4相关文件,如passwd.client和email-addresses,更新exim4配置并重启服务;配置mutt的邮件发送设置,如envelope_from、sendmail、from等;最后,进行openssl证书验证,生成并更新CA文件,配置fetchmail以使用SSL和指定的CA路径。完成上述配置后,通过fetchmail收信,mutt发送邮件,实现邮件系统的完整搭建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目标:Debian环境下,用Exim4 + fetchmail + mutt来收发gmail电子邮件。

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
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值