Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
No. 3707Tools index

Previous survey · No. 3492 ·

Pricing
Open Source
Type
TOOL
Use case
Coding
Interfaces
Web
GitHub
1 stars
Date

About

git2imap is a self-hosted proxy that presents Git repositories as read-only IMAP mailboxes, mapping each branch to a mailbox and each commit to an email containing the corresponding patch, so commit history can be browsed from an ordinary email client. It supports mirroring public/authenticated HTTP(S) and SSH remotes and includes an admin web UI for adding, refreshing, and managing proxied repos.

What it does

A small Go server that lets you read a Git project's history in whatever mail reader you already use. You register a remote in a password-protected control panel; it keeps a local mirror, and every change turns up as a message whose body is the full diff. The main line lands in the inbox, other lines get their own folders. Each project gets its own generated mail login. Nothing can be pushed back: the mail side refuses every write, and outgoing mail is accepted and thrown away.

Why it's ranked here

The idea is a joke and the README says so, but the engineering underneath is careful. Stored credentials are sealed with AES-GCM under a 32-byte master key, login passwords are hashed with Argon2id, the admin panel has CSRF tokens, login rate limiting and strict cookies, and remote URLs that point at local paths or odd transports are rejected before Git ever runs. It also has a use the author names: watching a project from a plane without paying for the premium internet plan.

What's good

Updates are incremental. When a line only moves forward, new changes are appended without renumbering, so a mail client does not redownload everything; a rewritten history bumps the folder's validity marker so clients know to resync. Secrets that Git prints during a clone are redacted from logs, and a test checks it. SSH host keys are pinned on first use. State lives in one embedded SQLite file, so there is no database server to run.

Tradeoffs

The README itself warns that syncing a very large project such as the Linux kernel can take a long time, and nothing is writable yet. Losing the master key makes every stored Git and mail credential unrecoverable. The author openly questions running it in production. Every message is marked unread and has no flags, so read state does not stick. Plain-text login is allowed by default on loopback addresses when no certificate is set.

How to use it well

Run it on a box you control, feed the two secrets through environment variables, and keep the master key backed up. Put certificates on the mail and web listeners and turn off insecure login before exposing it beyond localhost. It suits following a few small or medium projects from a mail client, or reading history from a connection too limited for the web. It is not a code review tool and cannot send changes back.

Technical notes+

Entry point cmd/git2imap/main.go wires a SQLite store (internal/store/store.go, modernc.org/sqlite, WAL mode, one connection), an AES-GCM box (internal/secure/secure.go), the Git CLI wrapper (internal/gitbackend/git.go) and three listeners built on emersion go-imap v2 beta and go-smtp. internal/service/repository.go deduplicates concurrent refreshes per repo and computes old..new revision ranges when the old head is an ancestor; ReplaceMailboxes otherwise deletes messages and increments uid_validity. The IMAP session in internal/imapserver/server.go returns read-only errors for Store, Copy, Append and Expunge; the SMTP Data handler in internal/smtpserver/server.go discards the body. Commits are rendered with git show --patch --binary --cc. internal/gitbackend/git_test.go covers remote validation, an HTTP mirror lifecycle and secret redaction. Defaults in config.example.yaml: 30m clone timeout, 1m fetch timeout, 10 MB SMTP message cap.

Observed

Language
Go, requires Go 1.27 or newer to build
Runtime requirements
Git CLI; OpenSSH client for SSH remotes; a persistent 32-byte encryption key
Interfaces
IMAP and IMAPS, SMTP and SMTPS (accepts and discards mail), HTTP admin web UI
Packaging
Built from source with go run; Docker Compose file for local development
Supported remotes
Public HTTP(S), authenticated HTTP(S), SSH and SCP-style SSH; local paths, file:// and git:// rejected
Storage
Embedded SQLite via modernc.org/sqlite, plus bare mirror clones on disk
Credential handling
AES-GCM encryption of stored secrets, Argon2id password hashing
Write support
None; IMAP write commands return read-only errors
Tests
Go test files in the tree, including Git backend tests

Read from README.md, go.mod, config.example.yaml, cmd/git2imap/main.go, internal/imapserver/server.go, internal/smtpserver/server.go, internal/gitbackend/git.go, internal/service/repository.go, internal/secure/secure.go, internal/store/store.go, internal/web/server.go, internal/gitbackend/git_test.go.

What it can do

  • Mirror Git repositories over HTTP(S) or SSH, including authenticated remotes

    Git repository URL and credentials → Locally mirrored repository

  • Present each branch of a mirrored repository as an IMAP mailbox

    Git branch → IMAP mailbox

  • Convert each commit into an email containing the corresponding patch

    Git commit → Email with patch content

  • Serve repository commit history over the IMAP protocol for browsing in an email client

    IMAP client connection → Browsable commit history

  • Provide an admin web UI to add new repositories for proxying

    Repository details → Newly added proxied repo

  • Refresh proxied repositories via the admin web UI

    Repository selection → Updated mirrored repository

  • Manage existing proxied repositories via the admin web UI

    Repository management action → Updated repository configuration

Tags

gitimapemailproxyself-hosteddeveloper-toolsgo

Tech Stack

GoDocker

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.