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"