GNU/Linux 下超酷又灵活的 Email 系统

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(fetchmail 取邮件)
(fetchmail 取邮件)
第11行: 第11行:
 
== fetchmail 取邮件 ==
 
== fetchmail 取邮件 ==
  
gmail 示例配置:
+
fetchmail 的默认配置文件位于当前用户主目录下,即:$HOME/.fetchmailrc,没有可自己建一个
 +
 
 +
例如,我的 gmail 账户的 $HOME/.fetchmailrc 例子:
  
 
<pre>
 
<pre>

2013年3月18日 (一) 10:07的版本

目录

1 概述

简单地说就是:fetchmail 从邮件服务器取邮件到本地,经 procmail 过滤分捡后写入相应的 mailbox 文件,邮件客户端 Mutt 读取 mailbox 文件并与用户交互,使用 ssmtp 联系邮件服务器发邮件

fetchmail + procmail + Mutt + Exim4 的方案个人用了 7 年多,效率高,非常适合 Hacker/Geeker

近来发现 sSMTP 更好用,配置简单,风格和 fetchmail 类似,很自然地切到了 sSMTP



2 fetchmail 取邮件

fetchmail 的默认配置文件位于当前用户主目录下,即:$HOME/.fetchmailrc,没有可自己建一个

例如,我的 gmail 账户的 $HOME/.fetchmailrc 例子:

set postmaster "root"
set bouncemail
set no spambounce
set properties ""
set daemon 60

poll imap.gmail.com protocol IMAP port 993 auth password
	user "YOUR_GMAIL_USERNAME@gmail.com" there
	with password 'YOUR_GMAIL_PASSWD'
	is 'root' here options no fetchall keep ssl
	mda "/usr/bin/procmail -f %F -d %T"



3 procmail 分捡邮件



4 Mutt 读邮件



5 sSMTP 发邮件

$ sudo apt-get install ssmtp
$ vim /etc/ssmtp/ssmtp.conf
mailhub=smtp.gmail.com:587             # SMTP server hostname and port
FromLineOverride=YES                   # Force the From: line
Hostname=jackslab.org                  # The name of this host
RewriteDomain=jackslab.org             # The host the mail appears to be coming from
Root=postmaster                        # Redirect mail for root@ to postmaster@
AuthUser=yourgmailname@gmail.com       # Your DreamHost mail account
AuthPass=password                      # The password for the mail account
UseTLS=YES                             # Secure connection (SSL/TLS)
UseSTARTTLS=YES









个人工具
名字空间

变换
操作
导航
工具箱