- 論壇徽章:
- 1
|
安裝mutt,msmtp和getmail,我用的是Ubuntu dapper,repository中有,直接apt-get install就可以了。
網(wǎng)站分別為:
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}
復(fù)制代碼
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
復(fù)制代碼
3,配置~/.msmtprc
內(nèi)容:
- account default
- tls on
- host smtp.gmail.com
- from mail_add@gmail.com
- user mail_add@gmail.com
- auth on
- port 587
- password 1234567
復(fù)制代碼
3,在~/.muttrc中加入:
- set folder=~/Mail
- mailboxes +inbox
- set sendmail="/usr/bin/msmtp"
復(fù)制代碼
原來的其他內(nèi)容如果不和上面沖突就不用改變。
4,用cron或者其他你喜歡的類似程序指定運行g(shù)etmail檢查gmail的頻率, getmail執(zhí)行方式為:
- $ getmail -r ~/.getmail/getmailrc.gmail
復(fù)制代碼
5,運行mutt查看信件
[ 本帖最后由 l4kernel 于 2006-6-28 21:40 編輯 ] |
|