Chinaunix
标题:
用mutt+getmail+msmtp收发gmail
[打印本页]
作者:
l4kernel
时间:
2006-06-28 04:24
标题:
用mutt+getmail+msmtp收发gmail
安装mutt,msmtp和getmail,我用的是Ubuntu dapper,repository中有,直接apt-get install就可以了。
网站分别为:
http://www.mutt.org/
http://msmtp.sourceforge.net/
http://pyropus.ca/software/getmail/
getmail是个类似于fetchmail的程序,为什么作者要写这个程序请参见:
http://pyropus.ca/software/getmail/faq.html#faq-about-why
1,建Mail目录
建一个~/Mail目录,然后:
$ mkdir -m 700 ~/Mail/inbox/{,tmp,new,cur}
复制代码
2,配置getmail
建~/.getmail,在此目录下编辑getmailrc.gmail:
[retriever]
type = SimplePOP3SSLRetriever
server = pop.gmail.com
port = 995
username = mail_add@gmail.com
password = 1234567
[destination]
type = Maildir
path = ~/Mail/inbox/
[options]
verbose = 0
delete = true
message_log = ~/.getmail/getmail.log
复制代码
3,配置~/.msmtprc
内容:
account default
tls on
host smtp.gmail.com
from mail_add@gmail.com
user mail_add@gmail.com
auth on
port 587
password 1234567
复制代码
3,在~/.muttrc中加入:
set folder=~/Mail
mailboxes +inbox
set sendmail="/usr/bin/msmtp"
复制代码
原来的其他内容如果不和上面冲突就不用改变。
4,
用cron或者其他你喜欢的类似程序指定运行getmail检查gmail的频率, getmail执行方式为:
$ getmail -r ~/.getmail/getmailrc.gmail
复制代码
5,运行mutt查看信件
$ mutt -y
复制代码
[
本帖最后由 l4kernel 于 2006-6-28 21:40 编辑
]
作者:
guixujun
时间:
2006-06-28 14:38
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2