Mutt は高速で高度な設定が可能なメール クライアントとして知られており、テキストベースであるため、SSH 経由でメールをすばやくチェックするのに理想的です。
mutt のインストール
mutt は、次のように yum ユーティリティでインストールできます。
# yum install mutt .... Dependencies Resolved ======================================================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================================================== Installing: mutt x86_64 5:1.5.21-27.el7 base 1.4 M Installing for dependencies: mailcap noarch 2.1.41-2.el7 base 31 k tokyocabinet x86_64 1.4.48-3.el7 base 459 k urlview x86_64 0.9-15.20121210git6cfcad.el7 base 27 k Transaction Summary ======================================================================================================================================================================================================== Install 1 Package (+3 Dependent packages) Total download size: 1.9 M Installed size: 7.3 M Is this ok [y/d/N]: y
mutt の設定
1. mutt の構成ファイルは、各ユーザーのホーム ディレクトリに ~/.muttrc として配置されます。 .以下は、.muttrc ファイルの設定例です。 mutt を起動して実行するために必要なのはこれだけです。
# vi ~/.muttrc # About Me set from = "[email protected]" set realname = "Firstname Lastname" # My credentials set smtp_url = "smtp://[email protected]@smtp.domain.com:587/" set smtp_pass = "password" set imap_user = "[email protected]" set imap_pass = "password" # My mailboxes set folder = "imaps://imap.domain.com:993" set spoolfile = "+INBOX" # Where to put the stuff set header_cache = "~/.mutt/cache/headers" set message_cachedir = "~/.mutt/cache/bodies" set certificate_file = "~/.mutt/certificates" # Etc set mail_check = 30 set move = no set imap_keepalive = 900 set sort = threads set editor = "vim" # GnuPG bootstrap # source ~/.mutt/gpg.rc
2. 構成が完了したら、キャッシュ ディレクトリを作成します。
# mkdir -p ~/.mutt/cache
確認
すべてが正しく設定されていることを確認するには、サーバーからテスト メールを送信してください。
# echo "" | mutt -s "subject" -i body.txt -a attachment.txt [email protected]
-s used to specify subject of mail. -i used to specify file containing message body. -a used to specify attachment file.
mutt で一般的に使用されるその他のオプションは次のとおりです。
-b used to add Bcc address. -c used to add Cc address. -e if you want to specify sender's address (something other than default).Linux / UNIX :mutt を使用して添付ファイル付きメールを送信する
Linux / UNIX :mailx コマンドを使用して添付ファイル付きメールを送信する方法
solaris mailx コマンドを使用して添付ファイル付きメールを送信する方法