1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 |
# Hx by MuradCorp
A fully client-side webmail that talks IMAP and SMTP straight from the browser over
WebSockets. There is no webmail backend: the whole session lives in your browser.
**Hx is a fork of [cock-mail](https://mail.cock.li/cock-mail/), made by the people behind
[cock.li](https://cock.li).** All the hard work is theirs. This fork only adds a few
compatibility fixes and a different name. If you like it, please
[support cock-mail's development](https://cock.li/donate.php).
## Based on
| Hx | cock-mail |
|---|---|
| 0.5.2-hx1 | [0.5.2](https://mail.cock.li/cock-mail/dist/cock-mail-0.5.2.tar.gz) |
The unmodified upstream releases are in the history, tagged `upstream-0.5.1` and
`upstream-0.5.2`, so every change in this fork can be read with
`git diff upstream-0.5.2 main`.
## What this fork changes
Compatibility (useful for any server that is stricter than Dovecot/Postfix, such as [Mox](https://github.com/mjl-/mox)):
- **IMAP greeting:** any `* OK` greeting is accepted. Upstream required the word "ready"
and hung on "Connecting..." with servers that greet differently.
- **SMTP envelope:** `MAIL FROM:<addr>` and `RCPT TO:<addr>` use angle brackets, as
RFC 5321 requires. Stricter servers reject the bare form.
- **Multiple tabs:** if another tab holds the local database during a storage upgrade, the
user is told to close it instead of the app freezing on "Migrating your storage".
Configuration and branding:
- `official: false`, since this is not the official cock.li deployment.
- Name, login heading, placeholder, EHLO name (`hx`) and User-Agent (`Hx/0.5.2`).
Everything else is upstream cock-mail.
## How it works
- `public/` is the whole app: one `index.html` and a favicon. Serve it as static files.
- The browser opens WebSockets to `/imap` and `/smtp` on the same host (configurable in
`window.config` at the end of `index.html`).
- A WebSocket-to-TCP bridge (such as [websockify](https://github.com/novnc/websockify))
forwards those to your IMAPS and SMTPS ports.
- HTML mail is shown as plain text with the links extracted, never rendered.
See [docs/deploy.md](docs/deploy.md) for a working nginx + websockify setup.
## License
The original cock-mail license applies and is kept in full, both at the top of
`public/index.html` and in [LICENSE](LICENSE).
|