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 Kevin Hughes (1994) and Kent Landfield (1997+). 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--archivesURL for "Other mail archives" link
-A--appendAppend mbox output to a parallel mailbox file
-b--aboutURL for "About this archive" link
-c--configConfiguration file (.hmrc)
-d--dirOutput directory
-g--gdbmEnable .hm2index header cache
-i--stdinRead from standard input
-l--labelArchive title
-L--languageLanguage code, e.g. en, de, ja
-m--mboxInput mailbox file
-M--metadataUse metadata files for attachments
-n--hmailList submission address
-N--nonsequentialHash-based filenames
-o--setSet a config option, e.g. -o showhtml=2
-p--progressShow animated progress bar
-s--suffixHTML file suffix (default: html)
-T--indextablesUse tables for index pages
-u--updateIncremental update
-v--verbosePrint all config variable values and exit
-V--versionPrint version and exit
-x--overwriteOverwrite existing message files
-X--xmlWrite HAOF XML archive overview
-1--readoneSingle message in input
--no-generatorSuppress "Generated by hypermail-rs" footer
--warningsShow 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
mboxstringPath to input mailbox
dirstringOutput directory
labelstringArchive title shown in pages
languagestringUI language code (189 supported)
defaultindexstringdate · subject · author · thread
overwriteboolOverwrite existing message files
spamprotectboolObfuscate email addresses in output
showhtmlintHTML parts: 0 = strip · 1 = proportional · 2 = full
folder_by_datestringDate-based subfolders (strftime format)
msgsperfolderintMax messages per subdirectory
usegdbmboolEnable .hm2index header cache
monthly_indexboolPer-month summary index pages
yearly_indexboolPer-year summary index pages
linkquotesboolLink quoted text back to originals
nonsequentialboolHash-based filenames

Features

Safe Rust

No buffer overflows, zero C dependencies, clean cargo audit.

189 languages

All ISO 639-1/2 codes plus IETF BCP 47 private-use subtags, compiled in at build time.

Full MIME

RFC 2047 headers, RFC 2231 filenames, RFC 3676 format=flowed, multipart.

Smart threading

Two-pass algorithm: header-based plus subject heuristics for maximum thread coverage.

Security

HTML escaping, CSP meta tags, MIME allowlist, path traversal protection.

Accessible output

Dark/light mode, ARIA landmarks, skip links, responsive layout on every archive page.

Fast incremental

.hm2index cache — append messages without rebuilding the full archive.

Thoroughly tested

Extensive test suite validated on large real-world mbox corpora. CI on Linux, macOS, Windows.

Download

Releases

Source archives and pre-built binaries (when available) are published on GitHub Releases.

View releases 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