Rust製のCLI電子メールクライアントのHimaraya

Rust製のCLI電子メールクライアントのHimarayaというものを見かけたので少し試してみました.

Himarayaは単体ではCLIのクライアントでバッチ的に利用できます.VIm/Neovimのプラグインを使うとTUIで直感的に操作できるようになるようです.
Windows/macOS/Linux(amd64)はリリースページからバイナリが入手できます.今回はLinux amd64環境で試しました.

$ wget https://github.com/soywod/himalaya/releases/download/v0.2.2/himalaya-linux.tar.gz (1)
$ tar tvf ./himalaya-linux.tar.gz (2)
-rwxr-xr-x runner/docker 9090192 2021-04-05 00:50 himalaya.exe
$ tar xf ./himalaya-linux.tar.gz (3)
$ sudo install -m 755 ./himalaya.exe /usr/local/bin/himaraya (4)
$ rm ./himalaya.exe
$ mkdir ~/.config/himalaya (5)
$ vi ~/.config/himalaya/config.toml (6)
$ cat ~/.config/himalaya/config.toml
name = "Kenichiro Matohara"
downloads-dir = "~/.config/himalaya/gmail/"
signature = "Regards,"

[matoken_gmail]
default = true
email = "matoken@gmail.com"

imap-host = "imap.gmail.com"
imap-port = 993
imap-login = "matoken@gmail.com"
imap-passwd-cmd = "gpg2 --no-tty -q -d ~/.msmtp-password-gmail2.gpg"

smtp-host = "smtp.gmail.com"
smtp-port = 487
smtp-login = "matoken@gmail.com"
smtp-passwd-cmd = "gpg2 --no-tty -q -d ~/.msmtp-password-gmail2.gpg"
  1. Linuxリリースバイナリのダウンロード
  2. アーカイブの内容確認
  3. アーカイブの展開
  4. /usr/local/binhimaraya として導入
  5. 設定ファイルディレクトリの作成
  6. 設定ファイル作成

設定ファイルは README.md にgmailの例が書かれているので,imap4/smtpの場合はそのまま真似すると良さそうです.
設定ファイルのパスワード部分の imap-passwd-cmd , smtp-passwd-cmd は平分でも書けるようですが,コマンドが書けるのでmsmtpで使っているgpg2のものを使いました.opensslなども使えます.パスワードマネージャを使っても良さそうです.

$ himaraya list

UID    |FLAGS |SUBJECT                                           |SENDER                     |DATE
403387 |       |[oss-security] CVE-2021-29136: umoci: malicious … |Aleksa Sarai               |2021-04-06 11:13:14
403386 |       |[oss-security] Django: CVE-2021-28658: Potential… |Mariusz Felisiak           |2021-04-06 09:10:32
403385 |       |Ingress Damage Report: Entities attacked by taar… |Niantic Project Operations |2021-04-06 07:52:16
403384 |       |Ingress Damage Report: Entities attacked by taar… |Niantic Project Operations |2021-04-06 07:52:14
403383 |       |Ingress Damage Report: Entities attacked by taar… |Niantic Project Operations |2021-04-06 07:52:15
403382 |      |CPUのコアを増やせば、コア間の通信が増え処理速度が上がらないのではありませんか?         |Quoraダイ
ジェスト                |2021-04-06 06:35:23
403381 |      |In October, you had 4.8K users visit your websit… |Google Analytics           |2021-04-05 22:44:18
403380 |      |Daily activity summary for Nextcloud              |Nextcloud                  |2021-04-05 21:30:06
403379 |       |Re: [oss-security] Risk of local privilege escal… |Leo Famulari               |2021-04-05 20:20:55
403378 |       |Re: [oss-security] Risk of local privilege escal… |Leo Famulari               |2021-04-05 20:19:15

いくつかのコマンドを使いバッチ的にメールボックスを操作できます.しかし普通のMUAとして使うには面倒です.

Vim/Neovimのプラグインを使うとTUIで利用できるらしいので試してみます.

Note
※前提条件として,vim-plugが使える状態になっている必要があります.
junegunn/vim-plug: Minimalist Vim Plugin Manager 🏛️
$ echo "Plug 'soywod/himalaya', {'rtp': 'vim'}" >> ~/.vimrc

Vimの設定ファイルの ~/.vimrc にHimaraya pluginを追記します.
vimを起動して, :PlugInstall を実行してHimaraya Pluginを導入します.

その後,Vimの中で :Himaraya で起動します.

Himarayaの設定ができていればそのままTUIで使えるようになります :)

今の時点ではあまり使いやすくはなくAlpineやMutt/NeoMuttのほうが良さそうです.でも開発も活発そうなのでこれからに期待したいです.

ところで名前の Himaraya は山つながりで Alpine のインスパイアなのでしょうか?

環境
$ himalaya --version
himalaya 0.2.2
$ dpkg-query -W vim gpg
gpg     2.2.27-1
vim     2:8.2.2434-3
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ arch
x86_64

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)