Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

60.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"

		
		

60.2.1. 發送郵件

同時攜帶附件.

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

60.2.2. 設置自定義 From

			
#設置郵件編碼方式
set charset="utf-8" 

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