Muttはキーボードのみで操作できる、テキストベースのUNIX向け電子メールクライアント。
msmtpとofflineimapを使って、シンプルなメール環境を作ってみた。
必用なアプリケーションのインストール
# aptitude install mutt
# aptitude install msmtp
# aptitude install offlineimap
mutt: CUIベースのメールクライアント
msmtp: SMTPクライアント
offlineimap: OfflineIMAPは、インターネットに接続していなくてもIMAPのメールを読めるようにするツール
$ cp /usr/share/doc/offlineimap/examples/offlineimap.conf.minimal ~/.offlineimaprc
.offlineimaprcを以下のように編集する。
[general]
metadata = ~/.offlineimap
accounts = GmailMain
ui = Noninteractive.Quiet
[mbnames]
enabled = yes
filename = ~/.mutt/muttrc.mailboxes
header = "mailboxes "
peritem = =%(foldername)s
sep = " "
footer = "\n"
[Account GmailMain]
localrepository = GmailLocal
remoterepository = GmailRemote
[Repository GmailLocal]
type = Maildir
localfolders = ~/.mail/GMAIL
[Repository GmailRemote]
type = Gmail
remoteuser = yourname@gmail.com
remotepassfile = ~/.mailpass
.msmtprcをホームディレクトリに作成し、以下のように編集する。
account default
host smtp.gmail.com
port 587
from yourname@gmail.com
tls on
tls_starttls on
# you can google on how to find this
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user yourname@gmail.com
password yourpassword
logfile ~/.msmtp.log
$ chmod 600 .msmtprc
.muttrcをホームディレクトリに作成し、以下のように編集する。
set mbox_type=Maildir
set hostname=gmail.com
# GMAIL+OFFLINEIMAP settings
set imap_user=yourname@gmail.com
set folder=$HOME/.mail/GMAIL
set spoolfile=+/INBOX
set postponed="+[GMAIL].Drafts"
set record="+[GMAIL].Sent Mail"
# Mailboxes via offlineimap
source $HOME/.mutt/muttrc.mailboxes
set sendmail="/usr/bin/msmtp"
ディレクトリの作成
~/.mail
~/.mutt
offlineimapのパスワードファイルの作成
~/.mailpass
ここまでで設定は終了
$ offlineimap メールのローカルへの同期
$ mutt メールクライアントの起動
offlineimapでのメール取得の自動化をすれば、より便利になるが、とりあえずはこれでしばらく運用して、改善点を探してみることにする。
(参考)
http://www.webframp.com/2009/06/17/offlineimap-mutt-gmail-msmtp-crazy-delicious-email/
情報過多の時代、古いPCを蘇らせて、よりシンプルに使っていくために、Linuxを勉強してます
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿