No buffer overflows, zero C dependencies, clean cargo audit.
hypermail-rs
A complete Rust rewrite of Hypermail — converts UNIX mbox files into cross-referenced, browsable HTML archives. Drop-in replacement for C hypermail 2.4.0.
About
hypermail-rs reads one or more UNIX mbox files (or stdin) and
produces a set of interlinked HTML pages: one page per email message, plus index
pages sorted by date, subject, author, and thread. It is a
C hypermail 2.4.0
drop-in replacement — same .hmrc config format, same CLI flags,
existing scripts work without modification.
Written in safe Rust with no C dependencies. New additions include multilingual support, extended MIME handling, dark/light mode on generated pages, and a full-text search index.
Based on the original Hypermail by Tom Gruber, Kevin Hughes, Kent Landfield, Peter McCluskey and other contributors. Rust rewrite and maintainer Akis Karnouskos.
Installation
From source
git clone https://github.com/hypermail-rs/hypermail-rs.github.io.git
cd hypermail-rs.github.io
cargo build --release
# binary: target/release/hypermail
Requires a recent stable Rust toolchain. No external C libraries. See build requirements.
Usage
Common commands
# Convert a mailbox to an HTML archive
hypermail -m mailbox.mbox -d output/ -l "My Archive"
# Use a config file
hypermail -c archive.hmrc
# Read from stdin (pipe from fetchmail, procmail, etc.)
cat mailbox.mbox | hypermail -i -d output/ -l "Archive"
# Incremental update — append new messages only
hypermail -u -m new.mbox -d output/
# Overwrite an existing archive completely
hypermail -x -m mailbox.mbox -d output/ -l "Fresh Archive"
# Print version / show all config values
hypermail -V
hypermail -v -c archive.hmrc
CLI flags
All flags are compatible with the original C hypermail 2.4.0.
| Short | Long | Description |
|---|---|---|
| -a | --archives | URL for "Other mail archives" link |
| -A | --append | Append mbox output to a parallel mailbox file |
| -b | --about | URL for "About this archive" link |
| -c | --config | Configuration file (.hmrc) |
| -d | --dir | Output directory |
| -g | --gdbm | Enable .hm2index header cache |
| -i | --stdin | Read from standard input |
| -l | --label | Archive title |
| -L | --language | Language code, e.g. en, de, ja |
| -m | --mbox | Input mailbox file |
| -M | --metadata | Use metadata files for attachments |
| -n | --hmail | List submission address |
| -N | --nonsequential | Hash-based filenames |
| -o | --set | Set a config option, e.g. -o showhtml=2 |
| -p | --progress | Show animated progress bar |
| -s | --suffix | HTML file suffix (default: html) |
| -T | --indextables | Use tables for index pages |
| -u | --update | Incremental update |
| -v | --verbose | Print all config variable values and exit |
| -V | --version | Print version and exit |
| -x | --overwrite | Overwrite existing message files |
| -X | --xml | Write HAOF XML archive overview |
| -1 | --readone | Single message in input |
| --no-generator | Suppress "Generated by hypermail-rs" footer | |
| --warnings | Show configuration warnings |
Config file
hypermail-rs reads .hmrc files in the same format as the original
C hypermail. CLI -o key=value overrides file settings.
Example archive.hmrc
mbox = /var/mail/list.mbox
dir = /var/www/archive/
label = Development Mailing List
language = en
defaultindex = thread
overwrite = 1
spamprotect = 1
showhtml = 2
indextable = 1
folder_by_date = %Y-%m
monthly_index = 1
Key options
| Option | Type | Description |
|---|---|---|
| mbox | string | Path to input mailbox |
| dir | string | Output directory |
| label | string | Archive title shown in pages |
| language | string | UI language code (189 supported) |
| defaultindex | string | date · subject · author · thread |
| overwrite | bool | Overwrite existing message files |
| spamprotect | bool | Obfuscate email addresses in output |
| showhtml | int | HTML parts: 0 = strip · 1 = proportional · 2 = full |
| folder_by_date | string | Date-based subfolders (strftime format) |
| msgsperfolder | int | Max messages per subdirectory |
| usegdbm | bool | Enable .hm2index header cache |
| monthly_index | bool | Per-month summary index pages |
| yearly_index | bool | Per-year summary index pages |
| linkquotes | bool | Link quoted text back to originals |
| nonsequential | bool | Hash-based filenames |
| htmlheaderfile | string | Path to HTML header file used for all pages (shorthand for ihtmlheaderfile + mhtmlheaderfile) |
| htmlfooterfile | string | Path to HTML footer file used for all pages (shorthand for ihtmlfooterfile + mhtmlfooterfile) |
| ihtmlheaderfile | string | Path to custom HTML header file for index pages |
| ihtmlfooterfile | string | Path to custom HTML footer file for index pages |
| mhtmlheaderfile | string | Path to custom HTML header file for message pages |
| mhtmlfooterfile | string | Path to custom HTML footer file for message pages |
| — | Deprecated — has no effect. Remove from your config file. | |
| — | Deprecated — has no effect. Remove from your config file. | |
| — | Deprecated — has no effect. Remove from your config file. |
Features
All ISO 639-1/2 codes plus IETF BCP 47 private-use subtags, compiled in at build time.
RFC 2047 headers, RFC 2231 filenames, RFC 3676 format=flowed, multipart.
Two-pass algorithm: header-based plus subject heuristics for maximum thread coverage.
HTML escaping, CSP meta tags, MIME allowlist, path traversal protection.
Dark/light mode, ARIA landmarks, skip links, responsive layout on every archive page.
.hm2index cache — append messages without rebuilding the full archive.
Extensive test suite validated on large real-world mbox corpora. CI on Linux, macOS, Windows.
Download
Source repository
Clone and build from the GitHub repository. Pre-built binaries will be published on GitHub Releases when available.
View on GitHub ↗From source
Clone and build with cargo. Requires Rust 1.91+.
git clone https://github.com/hypermail-rs/hypermail-rs.github.io.git
cd hypermail-rs.github.io
cargo build --release