红联Linux门户
Linux帮助

打造终端下mutt收发邮件环境(fbterm,fetchmail,msmtp,procmail,

发布时间:2015-09-17 15:29:06来源:linux网站作者:LunaW

实现mutt下收发邮件需要安装,mutt,fbterm,fetchmail,msmtp,procmail

以下是各配置文件,在home目录下,隐私信息有马赛克...

.muttrc : 其中Mail是我建立的邮件目录,还有比较舒适的界面配置


set editor="vim" 
set mbox="/home/xiaojunyu/Mail/inbox" 
set spoolfile="/home/xiaojunyu/Mail/inbox/xiaojunyu" 
set postponed="/home/xiaojunyu/Mail/postponed" 
set record="/home/xiaojunyu/Mail/send" 
set check_new=yes 
set timeout=600 
set sendmail="/usr/bin/msmtp" 
set envelope_from=yes 
set use_from=yes 
set realname="xiaojunyu" 
set from=xiaojunyu5201314@163.com 
set charset="UTF-8" 
set send_charset="us-ascii:iso-8859-1:GB2312:UTF-8" 
set rfc2047_parameters=yes 
 
#界面颜色 
color index yellow default ~p 
color index white default ~P 
color index brightyellow default ~N 
color index brightgreen default "~N ~p" 
color normal white black 
color attachment brightyellow black 
color hdrdefault cyan black 
color indicator black cyan 
color markers brightred black 
color quoted green black 
color signature cyan black 
color status black white 
color tilde blue black 
color tree red black 
color header brightgreen black ^From: 
color header brightcyan black ^To: 

color header brightcyan black ^Reply-To: 
color header brightcyan black ^Cc: 
color header brightgreen black ^Subject: 
color header brightyellow black ^Sender: 
color index brightyellow black ~N 

auto_view text/html 

macro index G "!fetchmail -v<enter>" 
macro index <esc>1 <change-folder>+inbox/xiaojunyu<enter> 
macro index <esc>2 <change-folder>+send<enter> 
 
alias xiaojunyu xiaojunyu5201314@163.com


.fetchmailrc : 第一个注释是设置后台运行,自动检测邮件的

#set daemon 600 
poll pop.163.com 
protocol POP3 
user "xiaojunyu5201314@163.com" 
password "xxxx" 
mda "/usr/bin/procmail -d %T" 


.procmailrc :

VERBOSE=yes 
MAILDIR=/home/xiaojunyu/Mail/inbox 
DEFAULT=/home/xiaojunyu/Mail/inbox/xiaojunyu 
LOGFILE=$MAILDIR/.procmail.log 
:0: 
*^T0mutt-user 
mutt 


.msmtprc : 这个是发邮件的

account default 
host smtp.163.com 
from xiaojunyu5201314@163.com 
auth plain 
user xiaojunyu5201314@163.com 
password xxxx 
logfile /home/xiaojunyu/.msmtp.log 


基本这个格式就行了,mutt是可以设置很多快捷键的,可以自己去摸索..


Ubuntu 14.04+Mutt+Msmtp配置Linux下命令行邮件客户端:http://www.linuxdiyf.com/linux/10286.html

mutt实现Linux下发送邮件:http://www.linuxdiyf.com/linux/4091.html

GNU/Linux下Gmail的mutt+msmtp+getmail解决方案:http://www.linuxdiyf.com/linux/8410.html