nmh vs S-nail
nmh: The MH message handling system: separate shell commands to read, file, search and send mail stored one file per message.
S-nail: Command-line mail program that implements POSIX mailx, with MIME, IMAP, POP3, SMTP, Maildir and S/MIME support.
Differences
- Only S-nail has built-in IMAP.
- On Android, nmh runs through Termux and S-nail is not available.
- nmh has calendar support; S-nail does not.
- S-nail has S/MIME; nmh does not.
- S-nail has OAuth2 sign-in; nmh does not.
- S-nail has threaded views; nmh does not.
- Configuration: nmh uses ~/.mh_profile and mts.conf text files, and S-nail uses ~/.mailrc command file.
Side by side
| nmh | S-nail | |
|---|---|---|
| Interface | Command-line tools and prompts | Command-line tools and prompts |
| Language | C | C |
| License | BSD 3-Clause | ISC and BSD 2-Clause and BSD 3-Clause and BSD 4-Clause |
| Latest version | 1.8 | 14.9.25 |
| Linux | Native | Native |
| macOS | Native | Native |
| Windows | Through WSL | Through WSL |
| BSD | Native | Native |
| Android | Through Termux | No |
| IMAP | Through a separate tool | Yes |
| POP3 | Yes | Yes |
| SMTP | Yes | Yes |
| JMAP | No | No |
| Maildir | Yes | Yes |
| mbox | Yes | Yes |
| notmuch | No | No |
| OpenPGP | No | No |
| S/MIME | No | Yes |
| OAuth2 sign-in | No | via script |
| Threads | No | Yes |
| Search | pick command matches header fields and message text | built-in message specifications and the search command; IMAP SEARCH on IMAP folders |
| HTML mail | via mhshow with an external converter such as w3m | built-in tag-soup filter or external viewer via mailcap |
| Mouse | No | No |
| Multiple accounts | via per-command switches or separate profiles | Yes |
| Offline use | full; messages are stored as local files | IMAP cache with disconnected mode |
| Calendar | replies to invitations with mhical | No |
| Contacts | aliases via MailAliases and the ali command | aliases via the alias command |
| Vim-style keys | No | No |
| Configuration | ~/.mh_profile and mts.conf text files | ~/.mailrc command file |
Which to choose
Choose nmh for
- Every action is a shell command, so mail handling is easy to script.
- One file per message lets grep, find and other Unix tools work on mail.
- Built-in POP3 and SMTP with TLS and SASL; reads mbox and Maildir drops.
Watch out for
- No IMAP; IMAP mail must be synced to a Maildir first and then incorporated.
- No built-in OpenPGP or S/MIME, and no thread view.
- SMTP authentication needs nmh built with Cyrus SASL and its PLAIN or LOGIN plugin.
Choose S-nail for
- Drop-in POSIX mailx, so it works in existing shell scripts and cron jobs.
- Built-in SMTP, POP3 and IMAP with TLS; no separate sync or send tool needed.
- S/MIME signing and encryption are built in.
Watch out for
- Line-oriented prompt instead of a full-screen interface.
- No built-in OpenPGP; upstream documents a gpg pipe workaround only.
- IMAP support is kept at an older code level and upstream advises care.
Questions
What is the difference between nmh and S-nail?
Only S-nail has built-in IMAP. On Android, nmh runs through Termux and S-nail is not available. nmh has calendar support; S-nail does not.
Which runs on Windows, nmh or S-nail?
On Windows, nmh runs through WSL. On Windows, S-nail runs through WSL.
See also: nmh alternatives, S-nail alternatives.