Mutt是一套文字模式(text mode)的Mail Client,而預設安裝是沒有POP3、SMTP的功能,也沒有郵件編輯器。這些功能 Mutt都委由其他軟體來完成。本文將介紹msmtp這個SMTP Client的套件。
首先,安裝需要的套件(mutt + msmtp)
> sudo apt-get install mutt msmtp
由於mutt是透過msmtp寄信的,因此我們需要再home目錄底下設定兩個config檔: .muttrc以及 .msmtprc,以下就是我的設定檔:
=============~/.muttrc=============
#編碼設定
set strict_mime=no
set assumed_charset="big5:gb2312:utf-8"
set move=no
set indent_str="> "
set charset="UTF-8" #UTF-8終端機
set sort=date-received
set pager_index_lines=5
set locale="zh_TW.UTF-8" #顯示中文日期
auto_view text/html application/msword #遇到html 與doc 使用.mailcap處理
#設定使用msmtp
set sendmail="/usr/bin/msmtp"
set use_from=yes
set from= "Name
# Mail of NTUST
account ntust
host your_mail_host
from your_mail@xxx.edu.tw
auth login
user Name
password secret
# Set a default account
account default : ntust
===================================
設定完成之後,可以將你要寄信的內容放在某個mail_content檔案裡面,接著使用一行指令,便可以完成寄信...
> mutt -s "subject" receiver@mail.xxxxx <>
0 意見:
張貼留言