i3-msg "exec urxvt -e mutt"
で起動すると、メールを編輯するエディタが環境變數 $EDITOR
ではなく nano で起動してしまふ
$editor
で解決はできる
對象バージョン:1.10.1-2.1+deb10u5
set
, toggle
, unset
, reset
) - Chapter 3. Configuration - The Mutt E-Mail Client Manual
boolean
型の變數は set
が yes
、unset
が no
として處理される(boolean variables can be set
(true) or unset (false).
)
folder-hook
) - Chapter 3. Configuration - The Mutt E-Mail Client Manual
If you use the “!” shortcut for $spoolfile at the beginning of the pattern,
you must place it inside of double or single quotes in order to
distinguish it from the logical not operator for
the expression.
利用できる認証処理がない
(No authenticators available
)とエラーが出た時は、libsasl2-modules
をインストールする
~/.muttrc
もしくは ~/.mutt/muttrc
もしくは $XDG_CONFIG_HOME/mutt/muttrc
:
set my_charset = "utf-8" # 文字エンコーディング
set my_editor = "kak" # テキストエディタ
###############
# 自分のアドレス
#
source ~/.mutt/alternates.rc
###############
# アドレス帳
#
source ~/.mutt/aliases.rc
set alias_file = "~/.mutt/aliases.rc"
###############
# メールボックス(フォルダ)
#
source ~/.mutt/mailboxes.rc
###############
# アカウント
#
source ~/.mutt/account.rc
###############
# MUA の挙動
#
set check_new # メールボックスを開いてゐる間、メールを確認 # mh, maildir のみ
set mail_check = 10 # ローカル・IMAP メールボックスのメール確認頻度(秒)
set pop_checkinterval = 10 # 選択してゐる POP メールボックスのメール確認頻度(秒)
set mail_check_stats # メール数を確認(未読・フラグ・総数)
set mail_check_stats_interval = 10 # メール数の更新頻度(秒)
set timeout = 10 # 入力の待ち時間(秒)
set sleep_time = 0 # フォルダへの移動時間
set quit = yes # Mutt 終了時に確認しない
set delete = yes # メールを削除する際、確認しない
set delete_untag # メールを削除する際、タグを外す
set mh_purge # 削除したメールをディスクに残さない
unset confirmappend # 既存のメールボックスへメールを保存する際、確認しない
unset confirmcreate # 存在しないメールボックスへメールを保存する際、作成を確認しない
set duplicate_threads # 同じ Message-Id を持つメールをスレッド化 # $sort = threads
set mbox_type = maildir # 新規フォルダの種類 # mbox, mmdf, mh, maildir
set copy = yes # 送信メールのコピーを保存
set ssl_force_tls # 通信を暗号化
unset ssl_starttls # STARTTLS を無効
###############
# POP の設定
#
set pop_delete = yes # 取得時にサーバからメールを削除
###############
# Index(メール一覧)
#
set sort = reverse-threads # 整列順
set index_format = "%?X?&? %Z %-20.20s From: %n on %d (%c)" # 書式
set date_format = "%F" # %Y-%m-%d # $index_format の書式(日附)
set to_chars = " 他寫自購" # 自分宛のメールの情報
unset arrow_cursor # カーソルをハイライトにする(矢印を無効)
###############
# Pager(メールエントリ)
#
ignore * # 非表示ヘッダ
unignore From Date To Cc Bcc Subject # 表示ヘッダ
set pager_stop # 最後のメールで <next-page> を無効
unset tilde # 空白行を ~ で埋めない
unset markers # 折返し行のマーカーを非表示
set header_cache = "~/.mutt/hcache" # ヘッダキャッシュを使用 # mkdir もしくは touch で作成
# HTML よりプレーンテキストを優先する
alternative_order multipart/mixed multipart/related text/plain
# Mailcap エントリの除外リスト
mime_lookup application/octet-stream
# 添附ファイルを指定プログラムで開く
# 要 Mailcap:~/.mailcap, copiousoutput フラグを附ける
# text/html; /usr/bin/sensible-browser %s; nametemplate=%s.html; copiousoutput
#auto_view text/html
###############
# メール編輯
#
set editor = $my_editor # 使用するエディタ
set edit_headers # 本文と一緒にヘッダを編輯
set autoedit # 件名と宛先の入力をスキップして、本文の編輯を始める # 要 $edit_headers # send-hooks に影響
set abort_nosubject = no # 無題でも中断しない
set include = no # 返信に引用を含めない
set use_from # From: ヘッダを生成
set reply_to = yes # Reply-to: ヘッダに記載されてゐるアドレスを返信の宛先にする
#set local_date_header # 送信メールの Date ヘッダを送信者のタイムゾーンに変換
set charset = $my_charset # 端末の表示・入力に使用する文字セット
set send_charset = $my_charset # 送信メールの文字エンコーディング
set assumed_charset = $my_charset # エンコーディングの指示が無いメールの文字エンコーディング
set attach_charset = $my_charset # テキストファイル添附用の文字エンコーディング
set content_type = "text/plain" # メール本文の Content-Type(プレーンテキストでメールを作成)
set mime_type_query_command = "xdg-mime query filetype" # 添附ファイルの MIME タイプ
###############
# GnuPG
#
source ~/.mutt/gpg.rc
###############
# サイドバー
#
source ~/.mutt/sidebar.rc
###############
# キーコンフィグ
#
source ~/.mutt/bind.rc
###############
# 配色
#
source ~/.mutt/color/00.rc
source
) - Chapter 3. Configuration - The Mutt E-Mail Client Manual
ignore
, unignore
) - Chapter 3. Configuration - The Mutt E-Mail Client Manual
alternative_order
, unalternative_order
) - Chapter 5. Mutt's MIME Support - The Mutt E-Mail Client Manual
mime_lookup
, unmime_lookup
) - Chapter 5. Mutt's MIME Support - The Mutt E-Mail Client Manual
auto_view
, unauto_view
) - Chapter 5. Mutt's MIME Support - The Mutt E-Mail Client Manual
~/.mutt/alternates.rc
:
set reverse_name # alternates にマッチするアドレスで返信
alternates "^yourusername@posteo\.net$"
alternates "@sinumade\.net$"
~/.mutt/aliases.rc
:
alias posteo yourusername@posteo.net (yourname)
alias sinumade hoge@sinumade.net (絲)
~/.mutt/mailboxes.rc
:
set folder = "~/Mail" # デフォルト
set spoolfile = "+inbox" # 受信箱
set record = "+sent" # 送信済
set trash = "+trash" # ゴミ箱
set postponed = "+draft" # 下書(未送信)
set my_hold = "+hold" # 保留
set my_mbox1 = "+inbox/sinumade"
mailboxes ! $my_mbox1 $my_hold $trash $record $postponed
~/.mutt/account.rc
:
source ~/.mutt/user/posteo.rc
folder-hook $folder 'source ~/.mutt/user/posteo.rc'
source ~/.mutt/user/sinumade.rc
folder-hook $my_mbox1 'source ~/.mutt/user/sinumade.rc'
~/.mutt/gpg.rc
:
set crypt_use_gpgme # GPGME バックエンドを使用
set crypt_autopgp # 署名・暗号化で PGP/MIME を使用
unset crypt_autosmime # 署名・暗号化で S/MIME を使用しない
unset smime_is_default # 署名・暗号化で S/MIME (OpenSSL) を使用しない
unset pgp_autoinline # PGP/inline 署名・暗号化を使用しない
set pgp_mime_auto = yes # PGP/inline が失敗した際、PGP/MIME で署名・暗号化
unset crypt_autoencrypt # 送信メールを常に暗号化しない
unset crypt_autosign # 送信メールへ常に署名しない
set crypt_replyencrypt # 暗号化されたメールの返信を暗号化
set crypt_replysignencrypted # 暗号化されたメールの返信へ署名
unset crypt_replysign # 署名されたメールの返信へ署名しない # 署名・暗号化されたメールには使へない
unset pgp_ignore_subkeys # 副鍵を無視しない
set postpone_encrypt # 暗号化するメールの送信を延期した際、暗号化
set crypt_confirmhook # crypt-hook を使用する際、鍵を確認
set crypt_verify_sig = yes # 署名の検証を試みる
set pgp_check_exit # 署名・暗号化の際、終了コードを確認
~/.mutt/sidebar.rc
:
set sidebar_visible # サイドバーを表示
set sidebar_width = 18 # 幅
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" # 書式
set sidebar_folder_indent # フォルダをインデント
set sidebar_indent_string = " ➤ " # インデントに使用する文字
set sidebar_short_path # フォルダ名を省略
~/.mutt/bind.rc
:
bind index,pager ] sidebar-next # 次のメールボックスを選択
bind index,pager [ sidebar-prev # 前のメールボックスを選択
bind index,pager } sidebar-open # 選択してゐるメールボックスを開く
bind index,pager { sidebar-toggle-visible # サイドバーを開閉
bind index,attach g first-entry # 最初のエントリへ移動
bind index,attach G last-entry # 最後のエントリへ移動
bind index l display-message # メールを開く
bind index i fetch-mail # POP サーバからメールを取得
bind index J next-new-then-unread # 次の新着・未読メールへ移動
bind index K previous-new-then-unread # 前の新着・未読メールへ移動
bind index,pager f next-page # 次のページへ移動
bind index,pager b previous-page # 前のページへ移動
bind pager g top # メールの一番上へ移動
bind pager G bottom # メールの一番下へ移動
bind pager j next-line # 一行下へスクロール
bind pager k previous-line # 一行上へスクロール
bind pager h exit # メニューを終了
bind pager l display-toggle-weed # ヘッダ抑止の切替
bind alias l select-entry # エントリを選択
bind compose l view-attach # 添附ファイルを開く
macro index 'c' '<change-folder>+' # 指定フォルダへ移動
macro index,pager 'C' '<copy-message>+' # メールを指定フォルダへコピー
macro index,pager 's' '<save-message>+' # メール・添附ファイルを指定メールボックス・ファイルへ保存
macro index 'I' '<change-folder>+inbox/sinumade<enter><fetch-mail><change-folder>+inbox<enter><fetch-mail>' # POP サーバからメールを取得
macro index,pager '0' '<sync-mailbox><change-folder>+trash<enter>' # ゴミ箱へ移動
macro index,pager '9' '<sync-mailbox><change-folder>+hold<enter>' # 保留へ移動
macro index,pager '1' '<sync-mailbox><change-folder>+inbox<enter>' # 受信箱へ移動
macro index,pager '2' '<sync-mailbox><change-folder>+inbox/sinumade<enter>'
~/.mutt/user/posteo.rc
:
set realname = "yourname" # 名前
set from = "yourusername@posteo.net" # 送信元
#set my_pass = "`pass show posteo | head -n1`" # サーバのパスワード # pass を使用
set my_pass = "`gpg --batch -qd ~/Mail/pass/posteo.gpg`" # サーバのパスワード
set my_key = "" # GPG 鍵
###############
# 規定のフォルダ
#
set spoolfile = "+inbox"
###############
# 既読メールを移動
#
set move = no
###############
# POP, SMTP の設定
#
set pop_host = "pops://yourusername@posteo.net@posteo.de:995" # [pop[s]://][username[:password]@]popserver[:port]
set pop_pass = $my_pass # POP サーバのパスワード
set smtp_url = "smtps://yourusername@posteo.net@posteo.de:465" # smtp[s]://[user[:pass]@]host[:port]
set smtp_pass = $my_pass # SMTP サーバのパスワード
###############
# GnuPG
#
set pgp_default_key = $my_key # 署名・暗号化に使用する鍵
###############
# アカウントフック
#
account-hook "!" 'set pop_user=yourusername@posteo.net \
pop_pass=$my_pass'
~/.mutt/user/sinumade.rc
:
set realname = "絲" # 名前
set from = "hoge@sinumade.net" # 送信元
set my_pass = "`gpg --batch -qd ~/Mail/pass/sinumade.gpg`" # サーバのパスワード
set my_key = "252B9FA5A500BB15" # GPG 鍵
###############
# 規定のフォルダ
#
set spoolfile = $my_mbox1
###############
# 既読メールを移動
#
set move = yes
set mbox = $my_hold # もしくは mbox-hook "!" $my_hold
###############
# POP, SMTP の設定
#
set pop_host = "pops://hoge@sinumade.net@pop.migadu.com:995" # [pop[s]://][username[:password]@]popserver[:port]
set pop_pass = $my_pass # POP サーバのパスワード
set smtp_url = "smtps://hoge@sinumade.net@smtp.migadu.com:465" # smtp[s]://[user[:pass]@]host[:port]
set smtp_pass = $my_pass # SMTP サーバのパスワード
###############
# GnuPG
#
set pgp_default_key = $my_key # 署名・暗号化に使用する鍵
###############
# アカウントフック
#
account-hook "!" 'set pop_user=hoge@sinumade.net \
pop_pass=$my_pass'
color
, uncolor
, mono
, unmono
) - Chapter 3. Configuration - The Mutt E-Mail Client Manual
~/.mutt/color/00.rc
:
color attachment color40 default # Pager: 添附ファイル、署名情報など
color bold color254 default # 太字
color error color126 default # エラー
color hdrdefault color244 default # Pager: メールヘッダ
color indicator color191 color235 # カーソル(ハイライトもしくは矢印)
#color markers color0 default # Pager: 折返し行の + マーカー # $markers
color message color39 default # Mutt からのメッセージ(status の下)
color normal color248 default # デフォルト
color prompt color40 default # プロンプト(status の下)
color quoted color246 color234 # Pager: $quote_regexp に一致するテキスト
#color quoted1 color0 default # Pager: 引用
#color quoted2 color0 default # Pager: 引用
color search color0 color189 # Pager: 検索語ハイライト
color signature color244 default # 署名
color status color245 color233 # 上下の情報バー
color tilde color28 default # Pager: 空白行 # $tilde
color tree color130 default # Index: スレッドツリー(矢印)
#color underline color0 default # メール本文の下線パターン
###############
# サイドバー
#
color sidebar_divider color238 default # 境界線
#color sidebar_flagged color0 default # フラグ附を含むメールボックス
color sidebar_highlight color247 color235 # カーソル # underline
#color sidebar_indicator color0 default # 開いてゐるメールボックス
color sidebar_new color87 default # 新着を含むメールボックス
#color sidebar_spoolfile color0 default # 受信箱
###############
# Index(メール一覧)
#
#color index color0 default ~A # 全てのメール
color index color251 color52 ~D # 削除済
#color index color0 default ~E # 期限切れ
#color index color0 default ~F # フラグ附
#color index color0 default ~g # 署名済
#color index color0 default ~G # 暗号化済
#color index color0 default ~k # PGP 鍵を含む
#color index color0 default ~l # メーリングリスト宛
color index color51 default ~N # 新着
#color index color0 default ~O # 既存
#color index color0 default ~p # 自分宛
#color index color0 default ~P # 自分発
#color index color0 default ~Q # 返信済
#color index color0 default ~R # 既読
#color index color0 default ~S # 上書済
color index color213 color233 ~T # タグ附 # bold
#color index color0 default ~u # 購読中のメーリングリスト宛
color index color119 default ~U # 未読
#color index color0 default ~v # 折畳んだスレッドの一部
#color index color0 default ~V # 検証済(暗号)
color index color124 default ~= # 重複 # $duplicate_threads
#color index color0 default ~$ # 未参照 # 要スレッド表示
###############
# Pager: メールヘッダ
#
color header color153 default "^Date:"
color header color112 default "^(To|From):"
color header color166 default "^Subject:"
color header color254 default "^(Reply-To|Organization|Content-Type|X-Mailer):"
###############
# Pager: メール本文
#
color body color39 default "(ftp|http)s*://[\-\.\+\(\)\?\,%&=~;:@_/0-9a-zA-Z]+" # URL
color body color93 default "[\.\+\-_a-z0-9]+@[\-\.a-z0-9]+" # メールアドレス
color body color168 default "^[ ]*[○●◎▽▼□■◇◆]+.+$" # 見出し
color body color222 default "(([0-9]{4}|[〇一二三四五六七八九十百千万]+)年[ ]*)*([0-9]{1,2}|[〇一二三四五六七八九十]+)月[ ]*([0-9]{1,2}|[〇一二三四五六七八九十]+)日" # 日附
color body color222 default "[12][0-9]{3}[\-/](0*[1-9]|1[0-2])[\-/](0*[1-9]|[1-3][0-9])" # 日附
color body color222 default "[(\(][月火水木金土日][)\)]|[月火水木金土日]曜日*" # 曜日
color body color222 default "((午[前後]|[AP]M)[ ]*)*([0-9]{1,2}|[〇一二三四五六七八九十]+)時[ ]*([0-9]{1,2}|[〇一二三四五六七八九十]+)分([ ]*([0-9]{1,2}|[〇一二三四五六七八九十]+)秒)*" # 時間
color body color222 default "[0-2]*[0-9][::][0-5][0-9]([::][0-5][0-9])*" # 時間
color body color222 default "[0-2]*[0-9]時*[ ]*[\-〜~][ ]*[0-2]*[0-9]時" # 時間
color body color222 default "[0-9,]+[ ]*[(\(]*円[)\)]*" # 金額
color body color222 default "[\\¥¥][ ]*[0-9,]+" # 金額
###############
# メール編輯
#
color compose header color93 default # ヘッダ項目
color compose security_encrypt color99 default # 暗号化
color compose security_sign color165 default # 署名
color compose security_both color165 default # 署名・暗号化
color compose security_none color0 default # 署名・暗号化なし
msmtp
を使用$smtp_url
は空にするか unset
にするか削除
~/.mutt/user/sinumade.rc
:
###############
# 配送プログラム
#
set sendmail = "/usr/bin/msmtp --account=sinumade"
set use_envelope_from # -f コマンドを渡す(送信者を設定)