[ mailsift · 0.1 · rust · imap peek ]

see what's in your inbox without opening it.

read-only imap cli. ls your last 30 messages, read one by uid, search "x", count unread. written in rust, tls out of the box, no browser, no login flow. good for shell prompts and doom-scrolling your inbox without actually answering anyone.

 ~/code  $ mailsift ls -n 6                                    
wed 14:03  felix@fastmail      ● re: friday?                
wed 12:44  github-noreply        [f4rkh4d/tempo] pr merged     
wed 11:02  hn digest             ask hn: what's your...        
wed 08:51  mom                 ● recipe                     
tue       stripe                your invoice                 
mon       arxiv digest          the 3 papers you saved...    

$ mailsift count
2 unread · 847 total in INBOX
[01]

ls. peek the last N messages

date, sender, subject, unread flag. default 30, tweak with -n. colored output when stdout is a tty, plain when you pipe it.

[02]

read <uid>. one message, plain text

headers at the top, body below. html parts are listed but not rendered (pass --html to dump raw). no re-fetching if you ran ls already.

[03]

search "query". imap-side

uses the server's SEARCH verb so you don't pull the whole mailbox over the wire. subject match for now.

[04]

count. fits in your shell prompt

prints "N unread · M total" in ~150ms against fastmail. drop it in your .zshrc if you want the inbox count next to the time.

[05]

doctor. setup check

verifies host, port, tls handshake, auth, folder select, capabilities. tells you which bit broke and why.

[06]

no plaintext passwords in config

password_cmd = "pass show fastmail/imap" preferred. mailsift runs your command, uses stdout, forgets. works with pass, op, keychain wrappers, whatever.

# ~/.mailsift.toml

[account]
host = "imap.fastmail.com"
port = 993
user = "you@example.com"
password_cmd = "pass show fastmail/imap"

[ui]
default_count = 30
date_format = "%b %d %H:%M"

mailsift is read-only right now. the full vim-bound tui client is cooking, but not shipped. if you clicked in expecting that, here's the honest breakdown:

v1
full tui with vim bindings (j/k, gg/G, /, :q)
v1
compose / reply / forward
v1
tags (notmuch-style). threads in multiple buckets
v1
offline cache via sqlite, sync on reconnect
v1
pgp sign + encrypt
v1
xoauth2 for gmail / office365
$ # coming with v0.1 tag · few days out
$ cargo install --git https://github.com/f4rkh4d/mailsift

# ship config at ~/.mailsift.toml (see above), then:
$ mailsift doctor   # verify connection
$ mailsift ls       # see what you've been ignoring

rust stable 1.75+. tested against fastmail, gmail (app password, not oauth), purelymail. repo goes public this week. ping if you want in sooner. xoauth2 not supported yet, see roadmap.