Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 知乎专栏 | 视频教程 | About

2.2. mutt - text-based mailreader supporting MIME, GPG, PGP and threading

install

		
$ sudo apt-get install mutt
		
		

how to use the Maildir format with the Mutt

		
$ vim ~/.muttrc

alias rooty Cron Daemony <root@netkiller>
set mbox_type=Maildir
set folder="~/Maildir"
set mask="!^\\.[^.]"
set mbox="~/Maildir"
set record="+.Sent"
set postponed="+.Drafts"
set spoolfile="~/Maildir"

mailboxes `echo -n "+ "; find ~/Maildir -maxdepth 1 -type d -name ".*" -printf "+'%f' "`
macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
macro compose A "<attach-message>?<toggle-mailboxes>" "attach message(s) to this message"

		
		

2.2.1. 发送邮件

同时携带附件.

mutt -s "helloworld" user@example.com -a /opt/backup/file.tar.gz
			

2.2.2. 设置自定义 From

			
#设置邮件编码方式
set charset="utf-8" 

#自定义发件人信息 
set envelope_from=yes
set use_from=yes 
set from=netkiller@netkiller.cn
set realname="Neo Chen"