Cock-mail — yeah it's webmail with cocks

est. 2026

About

Cock-mail is the world's first fully client-side webmail client. It's what webmail should have been. Cock-mail connects directly to IMAP and SMTP over WebSockets and manages the entire session in your browser from start to finish. This approach eliminates a broad stroke of security risks you take every time you use a server-side webmail application. Instead of relying on a crusty PHP or C backend to log in for you and manage client state, cock-mail speaks mail protocols natively and skips the middleman.

Another problem with webmail is the issue of how to convert an HTML e-mail into something that can be safely displayed in browsers. This is a hard problem and has been the source of innumerable XSS vulnerabilities in existing webmail applications. Cock-mail addresses this by refusing to convert HTML to anything other than plaintext. More specifically its HTML converter uses DOMParser to parse HTML message parts, extract links, and convert the untrusted code to plaintext with innerText. This way the features of modern browsers designed to handle untrusted input are used for their intended purpose.

This is not a hobby project; it's developed so our own users can access webmail. We shut down our previous choice of software after we briefly audited it and decided it was too dangerous to use. If we had another option we would have deployed it as a replacement. Extensive research over several months came up with nothing that met our requirements and so we started writing cock-mail instead.

Cock-mail's developers strongly believe the best e-mail client is a desktop client and aim to replicate one.

Features

Cock-mail is in beta state. It can send and receive mail but there's no filter support yet. Here's a list of interesting features:

Here's the rough order new features will arrive in:

These features will never be added to cock-mail:

Screenshots

Click on an image to enlarge it.

Download

Current version: 0.3.2 (beta)

Cock-mail is a single HTML file. If you are connecting to existing WebSocket endpoints all you need is view-source:https://mail.cock.li/. Configure your endpoints at the bottom of the file.

If you would like to deploy cock-mail for access to a mail server without existing WebSocket support, you can download the complete package. It uses docker to build a base image from scratch and docker compose to build and deploy a patched version of websockify which adds support for --haproxy=2 and --ssl-target-name=mail.example.com. Using docker isn't necessary and if you know what you like you're probably smart enough to figure it out.

cock-mail-0.3.2.tar.gz (270KB, 54KB compressed)

Complete build instructions can be found in README.txt.

Cock-mail is free to use under a broadly permissive license you can read at the top of index.html.

Updates

0.3.2 — 2026-02-22
0.3.1 — 2026-02-21
0.3.0 — 2026-02-18
0.2.0 — 2026-02-16
0.1.0 — 2026-02-12
0.0.6 — 2026-02-07
0.0.5 — 2026-01-29
0.0.4 — 2026-01-25
0.0.3 — 2026-01-24
0.0.2 — 2026-01-23
0.0.1 — 2026-01-20