# Home
URL: https://golubmail.com/
## Fast, private webmail for your own mail server.
Golub is an open-source webmail client that runs next to Dovecot, Postfix or any IMAP and SMTP server. One small container, no PHP, no database, and nothing that tracks your users.
Try the live demo
Install on
cPanel
OpenPanel
Standalone
Golub 0.4.1 , 3 December 2026
Free software, GPL-3.0
Docker image
Dark
Light
Threads
Compose
Search
7.1 MB container image
4.6 MB memory at idle
1 IMAP connection per user
320 ms to open a message
## Everything your users expect from their mailbox.
Threads, search, encryption and contacts in the browser. Settings, contacts and signatures are saved in the user's own mailbox, so the server keeps nothing .
Inbox 1–50 of 50,000
Priya Natarajan · Q3 report draft 10:32
Sam Okafor · Design review moved 09:14
Opened in 0.22 s
## Fast on any folder
Sorting and paging run on the mail server, so a folder of 50,000 messages opens in a fraction of a second.
invoice
All folders Attachments Unread Since May
## Search that finds it
Subjects, addresses or the full text, in one folder or all of them, narrowed by date, flags and attachments.
Weekend hiking trip 3
Maya Chen: What a day! Here is the photo… 3 h
Jordan Blake: Yes to the stove. Fri
## Threads
Replies grouped under the first message, opened with one click, or a plain list for those who prefer it.
3 images blocked Show images
2 tracking pixels removed
## Private by default
Remote images wait for permission and load through a proxy, so senders never see the reader's IP address.
Signed by Maya, signature valid
Encrypted to 2 recipients PGP/MIME
## OpenPGP built in
Encrypt, sign and decrypt in the browser. Works with Thunderbird, Mailvelope and other PGP/MIME clients.
jordan@example.org hik
Hiking 2 people
## Contacts and groups
Addresses suggested from contacts, groups and people you wrote to. vCard import and export.
q3-report.pdf 840 B lake.png 2.4 kB
## Attachments in place
Preview images, PDF and text without leaving the message, or download anything with one click.
Moved to Archive Undo
Drag to a folder, select many, swipe on touch
## Undo every move
Moves and deletes can be taken back. Drag and drop, multi-select and keyboard shortcuts for the busy inbox.
Archive Parcelwise Your package is on the way
Swipe a message to archive or delete it
## Made for phones
A real mobile layout with swipe gestures and a folder drawer. No app to install.
System Light Dark
Aa Aa
## Light and dark
Follows the system or a choice of its own. HTML mail turns dark too, with pictures kept as they are.
/sso?token=YWxleEBnb2x1Yi5leGFtcGxl…
Signed in as alex@golub.example
## Single sign-on
Control panels log users straight into their mailbox with a signed, single-use token.
A Acme Mail
Compose
## Your brand
Your own name, logo and accent colour from three environment variables. Text colour on buttons is picked for contrast.
## And what it does differently.
Choices that make Golub easier to run, move and trust than a typical webmail.
golub-settings hidden
golub-contacts hidden
golub-pgp hidden
## Settings live in the mailbox
Settings, signatures, contacts and PGP keys are kept in hidden folders on the IMAP server, not in the webmail. Move the account to another server and they come along.
alex@golub.example 1 connection
2,000 requests, 10 users 10 logins
## One IMAP connection per user
The connection stays open and is reused, instead of a new IMAP login on every click. Less load on the mail server and no "too many connections" with several tabs open.
Database none
Files written none
Session encrypted cookie
## Nothing to back up
No database and no files written at runtime. Updating is replacing the container; there is no migration to run and no user data on the webmail server.
ghcr.io/stefanpejcic/golub
7.1 MB · amd64, arm64 · signed
## One small container
A single Go binary with the interface built in. No PHP, no web server in front, signed with cosign and shipped with an SBOM.
HTML cleaned Sandboxed
On the server, no scripts, strict CSP
## Mail shown safely
HTML is sanitized on the server before the browser sees it, then shown in a sandboxed frame. Unsubscribe requests are sent by the server, not the reader's browser.
User-Agent, X-Mailer not added
Read receipt asked each time
## Nothing about the sender leaks
Outgoing mail carries no webmail headers, read receipts are never sent silently, and the site loads nothing from third parties.
10 ×
## A tenth of the memory Roundcube needs.
4.6 MB at idle, where Roundcube needs 47 MB and Afterlogic 478 MB with its database.
## A tenth of the memory Roundcube needs.
4.6 MB at idle, where Roundcube needs 47 MB and Afterlogic 478 MB with its database.
Memory at idle smaller is better
- Golub 4.6 MB
- Roundcube 47 MB
- SnappyMail 72 MB
- Afterlogic Lite 478 MB
## Ten times faster inbox loading.
502 inbox loads a second for 10 users at once, against 49 for Roundcube and 15 for Afterlogic.
Inbox loads per second, 10 users at once bigger is better
- Golub 502 req/s
- Roundcube 49 req/s
- SnappyMail 44 req/s
- Afterlogic Lite 15 req/s
## A 73rd of the disk space Afterlogic takes.
17.7 MB unpacked, where Afterlogic needs 1.3 GB with its database: no PHP, no web server and no database inside Golub.
Size on disk, unpacked smaller is better
- Golub 17.7 MB
- Roundcube 795 MB
- SnappyMail 252 MB
- Afterlogic Lite 1.3 GB
## One IMAP connection per user, kept open.
Golub reuses each user's connection. The mail server sees 10 connections where the others open 2,000.
IMAP connections for 2,000 requests smaller is better
- Golub 10
- Roundcube 2,000
- SnappyMail 2,000
- Afterlogic Lite 2,000
Same mailbox, same server, official images, November 2026. Afterlogic includes the MySQL it needs. Method .
## Questions
More in the documentation , or ask on GitHub .
What is Golub?
A self-hosted webmail client: a web app that lets people use their email account in the browser. It connects to an existing IMAP and SMTP mail server; it is not a mail server itself.
Is Golub a Roundcube alternative?
Yes. Golub covers the everyday Roundcube features, such as folders, search, threads, compose, contacts, identities, signatures and PGP, in a single Go binary instead of a PHP application with a database. Roundcube has a large plugin ecosystem for features beyond everyday mail.
Which mail servers does Golub work with?
Any server that speaks IMAP and SMTP submission. It is built and tested against Dovecot and Postfix, including docker-mailserver. Single sign-on needs a Dovecot master user.
Does Golub need a database?
No. Sessions live in an encrypted cookie, and settings, contacts and signatures are stored in the user's own mailbox in hidden IMAP folders. Restart it whenever you like.
Can I use Golub on cPanel?
Yes. On a cPanel & WHM server Golub installs as a plugin and shows up in cPanel webmail next to Roundcube, already signed in with the cPanel session. Administrators change its settings and update it in WHM. See Golub on cPanel .
Can I use Golub on OpenPanel?
Yes. OpenPanel ships Golub as one of its webmail clients, so there is nothing to install: choose Golub as the webmail client in OpenAdmin under Emails > Settings. See Golub on OpenPanel .
Does it work on phones?
Yes. The interface adapts to small screens and supports swipe gestures. There is no separate app to install.
Is Golub free?
Yes. It is open source under GPL-3.0-or-later, with no paid edition and no telemetry.
---
# About
URL: https://golubmail.com/about/
## About Golub
Golub is a free, open-source webmail client written in Go. It puts a modern mailbox on top of the mail server you already run.
0.4.1 latest release, 3 December 2026
4 languages, right to left too
GPL-3.0 free software, no paid edition
Go and Svelte, one small binary
## How it works
Golub is a web client, not a mail server. It sits between the browser and your existing IMAP and SMTP server, and keeps no data of its own.
Browser desktop, tablet or phone
HTTPS ⟷
Golub one 7 MB container
IMAP · SMTP ⟷
Your mail server Dovecot, Postfix or any other
- Each signed-in user gets one IMAP connection, kept open and reused, instead of a new login on every click.
- The session is an encrypted cookie. Restart or replace the container whenever you like; there is nothing to migrate.
- Settings, contacts, signatures and PGP keys are saved in hidden folders of the user's own mailbox, so they move with the account.
## Features
## Mail
- Three-pane layout with resizable columns and a mobile layout
- Folders with unread counts, sizes and quota; create, rename, delete, empty and subscribe
- Server-side sorting and paging, fast on folders with tens of thousands of messages
- Threaded view as an option
- Search in subject and addresses or the full text, in one folder or all, with filters
- Live updates through IMAP IDLE
- Drag and drop, multi-select, swipe on touch screens, undo for moves and deletes
- Keyboard shortcuts
## Reading
- Plain text and sanitized HTML, inline images
- Attachment download and preview for images, PDF and text
- HTML mail shown dark in the dark theme, switchable per message
- Legacy charsets, broken MIME and Unicode addresses handled
- Unsubscribe button, read receipt prompts, priority markers
- Raw message and all headers
## Contacts and folders
- Address book with groups and collected recipients
- vCard import and export
- Import .eml and .mbox , export any folder as .mbox
## Writing
- Rich text or plain text
- Several identities, each with its own signature
- Canned responses
- Reply, reply all, forward inline or as an attachment
- Drafts with autosave
- Address autocomplete from contacts, groups and past recipients
- Priority, read receipt requests and browser spell check
- Unicode domains (IDNA) and mailboxes (SMTPUTF8)
## Encryption
- OpenPGP encryption and signatures, compatible with Thunderbird, Mailvelope and other PGP/MIME clients
- Create or import keys, export them, import other people's keys from a file, a paste or an attachment
- Decrypt in the browser after unlocking with the passphrase; keys lock again after 15 minutes
- Signed mail shows who signed it and whether the signature checks out
## Privacy and security
- Nothing stored on the server. No database and no files written at runtime.
- No tracking, no analytics, no third-party requests. There is no telemetry.
- Remote images blocked by default. When allowed, they load through Golub's proxy, so senders never see the reader's IP address. The proxy refuses private and internal addresses.
- Tracking pixels removed , even when remote images are allowed.
- HTML sanitized on the server and shown in a sandboxed frame with no scripts and a strict Content Security Policy.
- One-click unsubscribe sent from the server , not from the reader's browser.
- End-to-end encryption. Private keys are stored only passphrase protected.
- Read receipts never sent silently , and no User-Agent or X-Mailer in outgoing mail.
- Signed images. Every release is signed with cosign and ships with an SBOM and build provenance.
## For hosting providers
- cPanel : a plugin puts Golub next to Roundcube in cPanel webmail, signed in with the cPanel session, with settings and updates in WHM.
- OpenPanel : switch the webmail client from Roundcube to Golub in OpenAdmin, and set its domain there.
- Single sign-on from any other control panel with a signed, single-use token.
- Your own name, logo and accent colour through three environment variables.
- Far fewer IMAP connections and far less memory than PHP webmail, which matters with many users on one server.
- Accounts can move between servers with their settings and contacts, because those live in the mailbox.
## Languages
Golub speaks English, Arabic, Serbian (Latin) and Swedish. Arabic switches the whole interface to right to left, and message text picks its own direction in every language. Help translate .
Language Code Translated
English en 100%
العربية Arabic ar 100%
Srpski Serbian (Latin) sr-Latn 100%
Svenska Swedish sv 100%
## Requirements
- An IMAP server and an SMTP submission server. Golub is built and tested against Dovecot and Postfix, including docker-mailserver.
- Docker or any container runtime, on linux/amd64 or linux/arm64 . On cPanel, the plugin runs without one.
- A reverse proxy for HTTPS, or Golub's own TLS with a certificate and key.
- Single sign-on needs a Dovecot master user, unless the panel hands Golub the mailbox login.
- Users need a current Chrome, Firefox, Safari or Edge. No app to install.
## License
Golub is free software under the GNU General Public License, version 3 or later , the same license as Roundcube. There is no paid edition and no feature held back.
## The name
Golub is Serbian for pigeon , as in the carrier pigeon that delivered messages long before email.
---
# Golub vs Afterlogic WebMail Lite
URL: https://golubmail.com/alternatives/afterlogic/
## Golub vs Afterlogic WebMail Lite
Afterlogic WebMail Lite is the free PHP webmail from Afterlogic. Golub covers the everyday features without PHP or MySQL. Here is an honest comparison.
55× smaller image to download
100× less memory at idle
33× more inbox loads per second
200× fewer IMAP connections
## Choose Golub if
- You want little to run. One 7 MB container, no PHP, no web server, no database to back up or upgrade.
- You host many mailboxes. One IMAP connection per user and a fraction of the memory per server.
- Your users want a modern mailbox that works the same on a phone and a desktop, with dark mode and OpenPGP built in.
- You log users in from a panel. Single sign-on and branding are built in, set with a few environment variables.
## Choose Afterlogic WebMail Lite if
- You want an admin panel in the browser. Afterlogic is set up from a web admin page; Golub is set with environment variables.
- You may move to Afterlogic's paid editions, which add more than mail.
- You already run it and it does what your users need.
## Measured side by side
Golub 0.3.0 and Afterlogic WebMail Lite 9.8.7 reading the same mailbox on the same server, each from its official image. Bars are drawn to scale.
Image download smaller is better
- Golub 7.1 MB
- Afterlogic WebMail Lite 392 MB
Memory at idle smaller is better
- Golub 4.6 MB
- Afterlogic WebMail Lite 478 MB
Inbox loads per second, 10 users bigger is better
- Golub 502
- Afterlogic WebMail Lite 15
Golub Afterlogic WebMail Lite
Image download 7.1 MB 392 MB
Image unpacked 17.7 MB 1.3 GB
Memory at idle 4.6 MB 478 MB
Peak memory, 10 users 17 MB 720 MB
Message list, 10 users 502 req/s, 19 ms 15 req/s, 655 ms
Message list, 50,000 messages 70 req/s, 138 ms 6 req/s, 1,705 ms
IMAP connections, 2,000 requests 10 2,000
Sign in to inbox shown 0.86 s 1.83 s
Open the 50,000-message folder 0.22 s 1.35 s
Open a message 0.32 s 0.82 s
Afterlogic ran with MySQL 8.4, as in its own compose file; its image and memory figures include MySQL, which it needs. Its own container is 161 MB to download. Method and scripts . Afterlogic WebMail Lite is a trademark of its owners; this page is not affiliated with the Afterlogic WebMail Lite project.
## Features
What each client offers out of the box.
Golub Afterlogic WebMail Lite
Folders and search Yes Yes
Rich text and plain text, drafts Yes Yes
Contacts and groups, vCard Yes Yes
OpenPGP encryption Built in, in the browser Built in
Admin panel in the browser No, environment variables Yes
Single sign-on from a control panel Built in Through its API
Your own name, logo and colour Three settings Admin panel and skins
Phone layout Yes Yes
Languages 4 Many more
License GPL-3.0 AGPL-3.0
## How they are built
Both are web clients for an existing IMAP and SMTP server. The difference is everything around them.
Golub Afterlogic WebMail Lite
Written in Go Svelte PHP JavaScript
Runs as One binary or container PHP a web server
Database None MySQL, required
Settings and contacts In the user's own mailbox In the database
IMAP connections One per user, kept open A new one per request
Updating Replace the container Update files and the database
## Switching from Afterlogic WebMail Lite
Mail stays on your IMAP server, so nothing moves. You can run Golub next to Afterlogic WebMail Lite while your users try it.
- Start Golub with the same IMAP and SMTP server Afterlogic WebMail Lite uses. Installation
- Let users sign in with the same address and password. Folders and mail are there as they were.
- Bring contacts over. Export them from Afterlogic WebMail Lite as vCard and import the file in Golub's address book.
- Set up identities and signatures again in Golub's settings; they are saved in the mailbox from then on.
- Point your panel's webmail link at Golub, or use single sign-on .
## Questions
Is Golub a drop-in replacement for Afterlogic WebMail Lite?
For reading and writing mail, yes: it talks to the same IMAP and SMTP server and users sign in the same way. Afterlogic WebMail Lite plugins and its admin panel settings do not carry over.
Can Golub and Afterlogic WebMail Lite run on the same server?
Yes. Both are only clients of your mail server, so they can run side by side on different addresses or ports while you compare them.
Will users lose mail or folders when switching?
No. Mail and folders live on the IMAP server and both clients show the same mailbox. Only Afterlogic WebMail Lite's own settings and contacts stay in its database; contacts can be exported as vCard.
Why is Golub so much smaller and faster?
It is one Go binary with no PHP runtime, web server or database, and it keeps each user's IMAP connection open instead of logging in again on every request.
---
# Golub vs Roundcube
URL: https://golubmail.com/alternatives/roundcube/
## Golub vs Roundcube
Roundcube is the most widely used open-source webmail. Golub covers the everyday features in a much smaller package. Here is an honest comparison.
40× smaller image to download
10× less memory at idle
10× more inbox loads per second
200× fewer IMAP connections
## Choose Golub if
- You want little to run. One 7 MB container, no PHP, no web server, no database to back up or upgrade.
- You host many mailboxes. One IMAP connection per user and a fraction of the memory per server.
- Your users want a modern mailbox that works the same on a phone and a desktop, with dark mode and OpenPGP built in.
- You log users in from a panel. Single sign-on and branding are built in, not plugins.
## Choose Roundcube if
- You rely on plugins such as calendars, CardDAV sync or two-factor sign-in. Roundcube has a large plugin ecosystem.
- You need an LDAP address book or one of the many languages Roundcube is translated into.
- You already run it and it does what your users need.
## Measured side by side
Golub 0.3.0 and Roundcube 1.7.7 reading the same mailbox on the same server, each from its official image. Bars are drawn to scale.
Image download smaller is better
- Golub 7.1 MB
- Roundcube 281 MB
Memory at idle smaller is better
- Golub 4.6 MB
- Roundcube 47 MB
Inbox loads per second, 10 users bigger is better
- Golub 502
- Roundcube 49
Golub Roundcube
Image download 7.1 MB 281 MB
Image unpacked 17.7 MB 795 MB
Memory at idle 4.6 MB 47 MB
Peak memory, 10 users 17 MB 173 MB
Message list, 10 users 502 req/s, 19 ms 49 req/s, 205 ms
Message list, 50,000 messages 70 req/s, 138 ms 23 req/s, 425 ms
IMAP connections, 2,000 requests 10 2,000
Sign in to inbox shown 0.86 s 1.24 s
Open the 50,000-message folder 0.22 s 0.31 s
Open a message 0.32 s 0.88 s
Roundcube ran with its defaults (Apache and SQLite). Method and scripts . Roundcube is a trademark of its owners; this page is not affiliated with the Roundcube project.
## Features
What each client offers out of the box. “Plugin” means it is available through a Roundcube plugin, bundled or third-party.
Golub Roundcube
Folders, search, threads Yes Yes
Rich text and plain text, drafts Yes Yes
Identities and signatures Yes Yes
Contacts and groups, vCard Yes Yes
LDAP address book No Yes
OpenPGP encryption Built in, in the browser Plugin
Calendar, CardDAV, two-factor sign-in No Plugins
Single sign-on from a control panel Built in Plugins
Your own name, logo and colour Three settings Config and skins
Phone layout and dark mode Yes Yes
Remote images through a privacy proxy Yes No
Live updates over IMAP IDLE Yes Polling
Languages 4 Many more
License GPL-3.0 GPL-3.0
## How they are built
Both are web clients for an existing IMAP and SMTP server. The difference is everything around them.
Golub Roundcube
Written in Go Svelte PHP JavaScript
Runs as One binary or container PHP a web server
Database None MySQL PostgreSQL SQLite
Settings and contacts In the user's own mailbox In the database
IMAP connections One per user, kept open A new one per request
Updating Replace the container Update files and the database
## Switching from Roundcube
Mail stays on your IMAP server, so nothing moves. You can run Golub next to Roundcube while your users try it.
- Start Golub with the same IMAP and SMTP server Roundcube uses. Installation
- Let users sign in with the same address and password. Folders and mail are there as they were.
- Bring contacts over. Export them from Roundcube as vCard and import the file in Golub's address book.
- Set up identities and signatures again in Golub's settings; they are saved in the mailbox from then on.
- Point your panel's webmail link at Golub, or use single sign-on .
## Questions
Is Golub a drop-in replacement for Roundcube?
For reading and writing mail, yes: it talks to the same IMAP and SMTP server and users sign in the same way. Roundcube plugins do not carry over.
Can Golub and Roundcube run on the same server?
Yes. Both are only clients of your mail server, so they can run side by side on different addresses or ports while you compare them.
Will users lose mail or folders when switching?
No. Mail and folders live on the IMAP server and both clients show the same mailbox. Only Roundcube's own settings, contacts and signatures stay in its database; contacts can be exported as vCard.
Why is Golub so much smaller and faster?
It is one Go binary with no PHP runtime, web server or database, and it keeps each user's IMAP connection open instead of logging in again on every request.
---
# Golub vs SnappyMail
URL: https://golubmail.com/alternatives/snappymail/
## Golub vs SnappyMail
SnappyMail is a fast PHP webmail that grew out of RainLoop. Golub covers the everyday features with no PHP at all. Here is an honest comparison.
13× smaller image to download
15× less memory at idle
11× more inbox loads per second
200× fewer IMAP connections
## Choose Golub if
- You want little to run. One 7 MB container, no PHP, no web server, no database to back up or upgrade.
- You host many mailboxes. One IMAP connection per user and a fraction of the memory per server.
- Your users want a modern mailbox that works the same on a phone and a desktop, with dark mode and OpenPGP built in.
- You log users in from a panel. Single sign-on and branding are built in, set with a few environment variables.
## Choose SnappyMail if
- You want an admin panel in the browser. SnappyMail is set up from a web admin page; Golub is set with environment variables.
- You rely on its extensions or one of the many languages SnappyMail is translated into.
- You already run it and it does what your users need.
## Measured side by side
Golub 0.3.0 and SnappyMail 3.1.4 reading the same mailbox on the same server, each from its official image. Bars are drawn to scale.
Image download smaller is better
- Golub 7.1 MB
- SnappyMail 95.5 MB
Memory at idle smaller is better
- Golub 4.6 MB
- SnappyMail 72 MB
Inbox loads per second, 10 users bigger is better
- Golub 502
- SnappyMail 44
Golub SnappyMail
Image download 7.1 MB 95.5 MB
Image unpacked 17.7 MB 252 MB
Memory at idle 4.6 MB 72 MB
Peak memory, 10 users 17 MB 95 MB
Message list, 10 users 502 req/s, 19 ms 44 req/s, 223 ms
Message list, 50,000 messages 70 req/s, 138 ms 26 req/s, 382 ms
IMAP connections, 2,000 requests 10 2,000
Sign in to inbox shown 0.86 s 0.86 s
Open the 50,000-message folder 0.22 s 0.31 s
Open a message 0.32 s 0.83 s
SnappyMail ran from its official image with a domain file pointing at the mail server. Method and scripts . SnappyMail is a trademark of its owners; this page is not affiliated with the SnappyMail project.
## Features
What each client offers out of the box.
Golub SnappyMail
Folders, search, threads Yes Yes
Rich text and plain text, drafts Yes Yes
Identities and signatures Yes Yes
Contacts and vCard Yes Yes, with CardDAV sync
OpenPGP encryption Built in, in the browser Built in
Admin panel in the browser No, environment variables Yes
Extensions No Yes
Single sign-on from a control panel Built in Extensions
Your own name, logo and colour Three settings Themes and admin panel
Phone layout and dark mode Yes Yes
Languages 4 Many more
License GPL-3.0 AGPL-3.0
## How they are built
Both are web clients for an existing IMAP and SMTP server. The difference is everything around them.
Golub SnappyMail
Written in Go Svelte PHP JavaScript
Runs as One binary or container PHP a web server
Database None Optional, for contacts: MySQL PostgreSQL SQLite
Settings In the user's own mailbox In files on the server
IMAP connections One per user, kept open A new one per request
Updating Replace the container Replace the files
## Switching from SnappyMail
Mail stays on your IMAP server, so nothing moves. You can run Golub next to SnappyMail while your users try it.
- Start Golub with the same IMAP and SMTP server SnappyMail uses. Installation
- Let users sign in with the same address and password. Folders and mail are there as they were.
- Bring contacts over. Export them from SnappyMail as vCard and import the file in Golub's address book.
- Set up identities and signatures again in Golub's settings; they are saved in the mailbox from then on.
- Point your panel's webmail link at Golub, or use single sign-on .
## Questions
Is Golub a drop-in replacement for SnappyMail?
For reading and writing mail, yes: it talks to the same IMAP and SMTP server and users sign in the same way. SnappyMail plugins and its admin panel settings do not carry over.
Can Golub and SnappyMail run on the same server?
Yes. Both are only clients of your mail server, so they can run side by side on different addresses or ports while you compare them.
Will users lose mail or folders when switching?
No. Mail and folders live on the IMAP server and both clients show the same mailbox. Only SnappyMail's own settings and contacts stay on its server; contacts can be exported as vCard.
Why is Golub so much smaller and faster?
It is one Go binary with no PHP runtime, web server or database, and it keeps each user's IMAP connection open instead of logging in again on every request.
---
# Contribute
URL: https://golubmail.com/contribute/
## Contribute
Golub is built in the open. Bug reports, code, translations and documentation are all welcome.
## Report bugs
Tell us what broke, with the steps to see it again.
## Write code
Go on the server, Svelte in the browser, a test first.
## Translate
One JSON file per language. Add yours or fix one.
## Improve the docs
Fix what was unclear the first time you read it.
## Report bugs
Found something that does not work? Open an issue with the Golub version, your mail server, the steps to reproduce it and what you expected. A message that renders wrong is most useful as an .eml file with private details removed.
## Write code
Golub is Go on the server and Svelte in the browser. The rules are short: small focused changes, a test first, and no state on the server.
development Copy
cd web && npm ci && npm run build && cd ..
go test -race ./...
go run ./cmd/golub
- Fork the repository and send a pull request against main .
- Commit messages follow the conventional style, like fix(mime): handle a missing boundary .
- Every user-visible text goes through the translations and every colour through a theme token.
- End-to-end tests run Playwright against docker-mailserver; see e2e/ .
## Translate
Each language is one JSON file in web/src/locales , with English as the source. Fixing a translation is a one-file pull request; adding a language takes a few more lines, described in the translation guide .
Language Code Translated
English en 100%
العربية Arabic ar 100%
Srpski Serbian (Latin) sr-Latn 100%
Svenska Swedish sv 100%
Run node scripts/check-locales.mjs in web/ to find missing keys and plural forms. The Arabic translation was made without a native speaker, so corrections are especially welcome.
## Improve the docs
The documentation explains installation, configuration and every page of the interface. If a page was unclear or wrong for you, open an issue or suggest the fix.
## Spread the word
Star the project on GitHub , tell your hosting provider about it, or write about how you run it. It helps other people find Golub.
---
# Download
URL: https://golubmail.com/download/
## Download Golub
Golub ships as a signed container image for amd64 and arm64 . The current release is 0.4.1 , published 3 December 2026.
7.1 MB image download
ghcr.io image for amd64 and arm64
★ 6 source code on GitHub
0 vulnerabilities in the Trivy scan
## Docker Compose
The recommended way to run Golub. Set the name of your mail server as it appears on its TLS certificate, and a secret key.
- GOLUB_IMAP_TLS and GOLUB_SMTP_TLS : implicit for ports 993 and 465, starttls for 143 and 587.
- GOLUB_SECRET_KEY encrypts sessions. Create one with openssl rand -base64 32 .
- Put Golub behind your reverse proxy for HTTPS and set GOLUB_TRUST_PROXY to its address.
Every configuration option →
compose.yaml Copy
services:
golub:
image: ghcr.io/stefanpejcic/golub:stable
restart: unless-stopped
ports:
- "8080:8080"
environment:
GOLUB_IMAP_HOST: mail.example.com
GOLUB_IMAP_TLS: implicit
GOLUB_SMTP_TLS: implicit
GOLUB_SECRET_KEY: "..."
docker run Copy
docker run -d --name golub -p 8080:8080 \
-e GOLUB_IMAP_HOST=mail.example.com \
-e GOLUB_IMAP_TLS=implicit -e GOLUB_SMTP_TLS=implicit \
-e GOLUB_SECRET_KEY="$(openssl rand -base64 32)" \
ghcr.io/stefanpejcic/golub:stable
## Image tags
All images live at ghcr.io/stefanpejcic/golub . Pin an exact version in production.
On GitHub Packages →
Tag Points to Use it for
0.4.1 Exactly this release Production, with deliberate updates
0.4 The newest patch of a minor version Getting fixes without new features
stable The newest release Trying Golub, small setups
beta The newest beta or release candidate Testing what is coming
Platforms: linux/amd64 and linux/arm64 . Image size about 7 MB to download. GET /healthz reports the running version.
## Verify the image
Every release is built on GitHub Actions, signed with keyless cosign, and carries an SBOM and build provenance. Check the signature before you run it:
cosign Copy
cosign verify ghcr.io/stefanpejcic/golub:0.4.1 \
--certificate-identity-regexp \
'^https://github.com/stefanpejcic/Golub/\.github/workflows/release\.yml@' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
## Build from source
You need Go and Node.js. The web interface is built first, then embedded in the Go binary.
Source archives for every release →
shell Copy
git clone https://github.com/stefanpejcic/Golub.git
cd Golub/web && npm ci && npm run build && cd ..
go build -o golub ./cmd/golub
## Next steps
## Installation guide
Connecting to your mail server, HTTPS and reverse proxies, step by step.
## Single sign-on
Log users in from a control panel without a second password.
## Branding
Your own name, logo and accent colour.
## Updating
Pull the new image and recreate the container. Nothing to migrate, ever.
There are no native mobile apps: Golub is made to work well in the phone's browser.
---
# License
URL: https://golubmail.com/license/
## License
Golub is free software under the GNU General Public License, version 3 or later. There is no paid edition and no feature held back.
Use at no cost, for any purpose
Change read the source, run your version
Share copies, changed or not
GPL-3.0 or later, no paid edition
## In plain words
Running Golub for your users, including as part of a paid hosting service, needs nothing from you. If you distribute Golub, changed or not (for example in a product or an image you hand out), you pass on the source code under the same license and keep the copyright notices. This is not legal advice; the license text below is what counts.
Each source file carries an SPDX-License-Identifier: GPL-3.0-or-later line. Third-party libraries keep their own licenses, listed in the SBOM shipped with every container image.
## GNU General Public License, version 3
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
---
# News
URL: https://golubmail.com/news/
## News
Every Golub release and what changed. Follow along with the releases feed or by watching the repository on GitHub.
## Golub 0.4.1 Latest
3 December 2026
## Fixed
- Docs and Website are plain links on the WHM page
- Updates from WHM work on servers that mount /tmp noexec, Docs and Website buttons on the WHM page
- WHM page says Latest, docs list Service Manager monitoring
Release notes · ghcr.io/stefanpejcic/golub:0.4.1
## Golub 0.4.0
3 December 2026
## New
- CPanel plugin with Golub next to Roundcube in webmail, settings and updates in WHM, and Service Manager monitoring
- Run inside a control panel's webmail session, as Roundcube does on cPanel, and accept SSO tokens that carry the mailbox login
Release notes · ghcr.io/stefanpejcic/golub:0.4.0
## Golub 0.3.4
2 December 2026
## Fixed
- Save settings, contacts, keys and new folders on cPanel and other servers that keep every folder under INBOX.
Release notes · ghcr.io/stefanpejcic/golub:0.3.4
## Golub 0.3.3
30 November 2026
## New
- Take the look of golubmail.com: cyan accent, the five-colour band and coloured folder icons
- Draw the hero waves as SVG, with envelopes flowing along them on the home page
## Fixed
- Open a folder clicked on the contacts page
Release notes · ghcr.io/stefanpejcic/golub:0.3.3
## Golub 0.3.2
29 November 2026
## New
- Link to golubmail.com from the About page
- Figures on the download page, project facts on about, a tighter closing band
- A fan of app screenshots beside the closing call
- FAQ, a closing band on every page and livelier inner pages
- The mascot peeks out and comes out on a click
- Rebuild golubmail.com in the app's style
- Add the golubmail.com website
- Add a static demo build with an in-browser API
- Swedish
## Fixed
- Add the demo strings to Swedish
Release notes · ghcr.io/stefanpejcic/golub:0.3.2
## Golub 0.3.1
28 November 2026
## Fixed
- Hide PGP/MIME structure from attachments, keep search dates inside the panel
Release notes · ghcr.io/stefanpejcic/golub:0.3.1
## Golub 0.3.0
28 November 2026
## Faster
- Load folders, quota and inbox once after sign-in
- Load only the active language
Release notes · ghcr.io/stefanpejcic/golub:0.3.0
## Golub 0.2.0
27 November 2026
## New
- PGP in the browser
- PGP crypto and PGP/MIME building in the browser with OpenPGP.js, loaded on first use
- PGP keyring in a hidden folder, PGP/MIME messages from the browser, PGP detection
- Arabic, the first right-to-left language
- Right-to-left text and layout
- Dark view for HTML mail
Release notes · ghcr.io/stefanpejcic/golub:0.2.0
## Golub 0.1.0
27 November 2026
## New
- Import and export buttons per folder in settings
- Import .eml and .mbox into a folder, export a folder as mbox
- Search options for body text, all folders, unread, flagged, attachments and dates
- Advanced search with body text, dates, unread, flagged, attachments and all folders
- Threaded view with IMAP THREAD REFERENCES
- Contacts page, recipient autocomplete with groups and collected addresses
- Esc closes the open message and compose
- Arrow keys walk settings sections, Esc returns to mail
- Address book with groups, collected recipients and vCard import/export
- Browser spell check with a setting to turn it off
- Preview image, PDF and text attachments
- In-app confirm and prompt dialogs instead of the browser's
- and 62 more
## Fixed
- Wider leave dialog so its buttons stay visible
- Keep a typed subject when compose opens, priority badge outside the subject
- Sidebar content shrinks with a dragged width instead of overlapping; clearer settings gear
- Fresh theme and language cookies win over a lagging session
- Return an empty attachment list for compose sources
- Wrap long addresses in the identities list
- Keep search on top and show bulk actions in place of the list header
## Faster
- Reuse sorted UIDs per connection until the folder changes
- Precompressed static assets and gzip for larger API responses; benchmark script
Release notes · ghcr.io/stefanpejcic/golub:0.1.0
Releases follow semantic versioning . The full commit history is on GitHub .
---
# Screenshots
URL: https://golubmail.com/screenshots/
## Screenshots
The real interface, taken from the live demo with made-up mail. Click any picture to see it full size.
Desktop
Tablet
Phone
Mailbox Folders, the message list and the open message side by side.
Dark theme HTML mail turns dark too, with pictures kept as they are.
Threads Replies grouped under the first message, opened with one click.
Attachments Download or preview images, PDF and text files.
Preview Look at a photo without downloading it.
Compose Suggestions from contacts, groups and past recipients.
Search and filters Full text, all folders, unread, flagged, attachments and dates.
Contacts Groups, collected recipients, vCard import and export.
Settings Language, theme, mailbox, display and compose preferences.
Identities Several sender addresses, each with its own signature.
Encryption Create, import and manage OpenPGP keys.
Right to left Arabic mirrors the whole interface.
Your language Swedish, Serbian, Arabic and English so far.
Tablet The sidebar and the message share the screen in portrait.
Message list Swipe to archive or delete.
Reading Actions within reach of a thumb.
Folders A drawer with folders and contacts.
Compose The full editor, sized for small screens.
---
# Support
URL: https://golubmail.com/support/
## Support
Golub is a community project. Start with the documentation; if something is broken or missing, tell us on GitHub.
## Documentation
The documentation covers installation, every setting and every page of the interface, with screenshots.
## Installation
Docker, your mail server, HTTPS and reverse proxies.
## Configuration
Every environment variable, with defaults and examples.
## Single sign-on
Log users in from a control panel.
## Updating
Pull the new image, recreate the container, roll back if needed.
## Troubleshooting
Common errors and how to read the logs.
## Using Golub
The mailbox, search, threads, writing mail, contacts and mobile.
## Encryption
Keys, encrypted and signed mail.
## Get in touch
## Report a bug
Open an issue with your Golub version from /healthz , what you did and what happened. Leave out passwords and private mail.
## Questions and ideas
Search the existing issues first; ask or propose a feature in a new one.
## Security issues
Report vulnerabilities privately on GitHub, not in a public issue. SECURITY.md in the repository says what to include.
## Try it first
The live demo shows how something works without installing anything.
## Common questions
Golub cannot connect to my mail server
Use the host name on the server's TLS certificate in GOLUB_IMAP_HOST , and match GOLUB_IMAP_TLS to the port: implicit for 993, starttls for 143. Mail servers with a private certificate need GOLUB_TLS_CA . Unencrypted connections are only allowed to private addresses.
Golub stops at startup with an error
Every setting is checked when Golub starts, and a wrong value stops it with a message that names the variable. Fix that variable and start it again.
Users are logged out after a restart
Sessions are encrypted with GOLUB_SECRET_KEY . Keep the same key across restarts and updates, or every session becomes invalid.
Is there a mobile app?
No. Golub adapts to phones and tablets in the browser, with swipe gestures and a touch-friendly layout.
Is there paid support?
Golub has no paid edition. Help comes from the documentation and from the community on GitHub.
---
# Docs: Documentation
URL: https://golubmail.com/docs/
Golub is a fast, privacy-first webmail client: one small Go binary with no database, which works with any IMAP and SMTP server. Settings, contacts, signatures and PGP keys are stored in hidden folders of the user's own mailbox, so they survive a server migration and Golub itself keeps no state.
## For administrators
- Installation : run Golub with Docker, connect it to your mail server, HTTPS and reverse proxies
- Configuration : every environment variable, with defaults and examples
- Single sign-on : log users in from a control panel without a second password
- cPanel : add Golub to cPanel's webmail apps, next to Roundcube
- OpenPanel : switch OpenPanel's webmail from Roundcube to Golub
- Branding : your own name, logo and accent colour
- Updating
- Troubleshooting
## For users
- Using Golub : the mailbox, folders, message list, search, threads, reading and writing mail, contacts, mobile
- Settings : every settings page and what each option does
- Encryption (PGP) : keys, encrypted and signed mail
- Keyboard shortcuts
## For contributors
- Languages and translations
- Source code, issues and releases: github.com/stefanpejcic/Golub
- The screenshots on these pages come from invented demo mail and are made with e2e/screenshots/docs.mjs
---
# Docs: Installation
URL: https://golubmail.com/docs/installation/
Golub is published as a container image for linux/amd64 and linux/arm64 :
ghcr.io/stefanpejcic/golub
Tag Meaning
stable Latest release.
0.3 Latest 0.3.x release; gets fixes, never breaking changes.
0.3.0 One exact release. Recommended for production.
Images are signed with cosign and carry an SBOM and build provenance. Every build is scanned with Trivy.
## What you need
- An IMAP server (Dovecot or any other) and an SMTP submission server for sending.
- A random secret for session cookies: openssl rand -base64 32 .
Golub needs no database and writes no files, so it can run with a read-only file system and be restarted or moved at any time.
## Docker Compose
Point Golub at your mail server by the name on its TLS certificate:
services:
golub:
image: ghcr.io/stefanpejcic/golub:0.3.0
restart: unless-stopped
ports:
- "8080:8080"
environment:
GOLUB_IMAP_HOST: mail.example.com
GOLUB_IMAP_TLS: implicit # port 993
GOLUB_SMTP_TLS: implicit # port 465
GOLUB_SECRET_KEY: "paste the output of: openssl rand -base64 32"
Start it and open http://localhost:8080 . Sign in with a full mailbox address and its password.
## Mail server on the same Docker network
If Golub and the mail server share a private network, use the mail server's container name. When the server has no certificate for that name, turn TLS off; Golub only allows this for private and loopback addresses:
environment:
GOLUB_IMAP_HOST: mailserver
GOLUB_IMAP_TLS: none
GOLUB_SMTP_TLS: none
With docker-mailserver , starttls on ports 143 and 587 also works when the certificate matches the name you use.
## Mail server with a private certificate
Mount your CA certificate and point GOLUB_TLS_CA at it, so Golub can verify the server. There is deliberately no option to skip verification.
volumes:
- ./my-ca.pem:/etc/golub/ca.pem:ro
environment:
GOLUB_TLS_CA: /etc/golub/ca.pem
## HTTPS
## Behind a reverse proxy (recommended)
Let your proxy (nginx, Caddy, Traefik) handle certificates and forward to port 8080. Tell Golub which addresses the proxy uses, so it trusts X-Forwarded-For and X-Forwarded-Proto from them and nobody else:
environment:
GOLUB_TRUST_PROXY: 172.16.0.0/12
Golub then marks its cookie Secure whenever the proxy says the request came over HTTPS.
nginx example:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# new mail is pushed over a long-lived stream
proxy_buffering off;
proxy_read_timeout 1h;
}
proxy_buffering off matters for live updates: Golub pushes new mail over Server-Sent Events at /api/events . When the stream can't get through, Golub still checks for new mail on the interval set in Settings .
## Golub serves HTTPS itself
Mount a certificate and key and set both variables:
ports:
- "443:8443"
volumes:
- /etc/letsencrypt/live/mail.example.com:/certs:ro
environment:
GOLUB_LISTEN: ":8443"
GOLUB_TLS_CERT: /certs/fullchain.pem
GOLUB_TLS_KEY: /certs/privkey.pem
Golub reloads the certificate when the files change (checked at most once a minute) and on SIGHUP , so renewals by certbot or another ACME client need no restart. If a reload fails, the old certificate keeps working and an error is logged. TLS 1.2 is the minimum and HSTS is sent.
## Checking that it runs
curl http://localhost:8080/healthz
{"status":"ok","version":"0.3.0"}
## Next steps
- Configuration lists every option.
- Single sign-on lets a control panel log users in directly.
- Branding puts your own name and logo on the login page.
---
# Docs: Configuration
URL: https://golubmail.com/docs/configuration/
Golub is configured only with environment variables. They are all checked at startup; if one is wrong or missing, Golub exits and names the variable, for example:
GOLUB_SECRET_KEY: must decode to 32 bytes, got 9
To check settings without starting Golub, run golub -check . It prints configuration ok or names the variable that is wrong, and exits with status 1 if one is.
## Required
Variable Description
GOLUB_IMAP_HOST Host name of the IMAP server. Use the name on its certificate.
GOLUB_SECRET_KEY Key that encrypts session cookies: 32 random bytes, base64. Create it with openssl rand -base64 32 . Changing it signs everyone out.
## Mail server
Variable Default Description
GOLUB_IMAP_TLS starttls implicit (TLS from the start), starttls or none .
GOLUB_IMAP_PORT 993 with implicit , otherwise 143
GOLUB_SMTP_HOST same as GOLUB_IMAP_HOST Submission server for sending.
GOLUB_SMTP_TLS starttls Same values as GOLUB_IMAP_TLS .
GOLUB_SMTP_PORT 465 with implicit , otherwise 587
GOLUB_TLS_CA Path to an extra CA bundle, for mail servers with a private certificate.
none is only accepted when the host resolves to a loopback or private address, so passwords never cross the internet unencrypted. Certificates are always verified.
Golub saves a copy of every sent message to the Sent folder over IMAP.
## Web server
Variable Default Description
GOLUB_LISTEN :8080 Address and port to listen on.
GOLUB_TLS_CERT Certificate file (PEM, full chain). Set together with GOLUB_TLS_KEY to serve HTTPS.
GOLUB_TLS_KEY Private key file (PEM).
GOLUB_TRUST_PROXY Comma-separated CIDRs of reverse proxies, like 127.0.0.1/32,172.16.0.0/12 . Only these may set X-Forwarded-For and X-Forwarded-Proto .
See Installation for both HTTPS setups.
## Sessions
Variable Default Description
GOLUB_SESSION_TTL 12h How long a sign-in lasts, as a Go duration: 30m , 8h , 168h .
The session lives only in an encrypted cookie. There is no session store on the server, so restarting Golub does not sign anyone out.
## Single sign-on
Variable Default Description
GOLUB_SSO_SECRET Shared secret for SSO tokens, at least 32 characters. Setting it turns SSO on.
GOLUB_MASTER_USER Dovecot master user name, for tokens that carry only the address. Not needed when every token carries the mailbox login.
GOLUB_MASTER_PASSWORD Dovecot master user password. Set with GOLUB_MASTER_USER .
How it works and how to create tokens: Single sign-on .
## Control panels
Variable Default Description
GOLUB_EMBED_SECRET Shared secret, at least 32 characters, for a control panel that serves Golub under its own session and passes each request on to Golub with the user's mail login. Golub accepts it only on requests from 127.0.0.1 or ::1 . The cPanel installer sets it.
## Defaults for new users
Variable Default Values
GOLUB_DEFAULT_LOCALE en en , sr-Latn , ar
GOLUB_DEFAULT_THEME system system , light , dark
The language is picked in this order: the SSO token, the user's own choice, the browser's languages, then GOLUB_DEFAULT_LOCALE . Users can change both in Settings or on the login page.
## Branding
Variable Default Description
GOLUB_BRAND_NAME Golub Name in the browser tab and on the login page, up to 64 characters.
GOLUB_BRAND_LOGO Path to a .png , .jpg , .svg or .webp file, up to 512 KB.
GOLUB_BRAND_ACCENT Accent colour as #rrggbb , for example #2563eb .
More in Branding .
## Logging
Variable Default Values
GOLUB_LOG_LEVEL info debug , info , warn , error
Logs are JSON lines on standard output.
## Complete example
services:
golub:
image: ghcr.io/stefanpejcic/golub:0.3.0
restart: unless-stopped
read_only: true
ports:
- "127.0.0.1:8080:8080"
volumes:
- ./logo.svg:/etc/golub/logo.svg:ro
environment:
GOLUB_IMAP_HOST: mail.example.com
GOLUB_IMAP_TLS: implicit
GOLUB_SMTP_TLS: implicit
GOLUB_SECRET_KEY: ${GOLUB_SECRET_KEY} # in .env, created once with: openssl rand -base64 32
GOLUB_TRUST_PROXY: "127.0.0.1/32"
GOLUB_SESSION_TTL: 8h
GOLUB_DEFAULT_LOCALE: en
GOLUB_DEFAULT_THEME: system
GOLUB_BRAND_NAME: "Example Mail"
GOLUB_BRAND_LOGO: /etc/golub/logo.svg
GOLUB_BRAND_ACCENT: "#0f766e"
---
# Docs: Single sign-on
URL: https://golubmail.com/docs/single-sign-on/
With SSO, a control panel or portal can send its users straight into their mailbox, without asking for the mailbox password again. Golub verifies a short-lived signed token, then signs in to the mail server in one of two ways:
- through a Dovecot master user , when the token carries only the address (steps 1 to 3 below);
- with a mailbox login the panel hands over inside the token, encrypted, when the panel has one, such as the temporary session login cPanel gives its webmail apps. No master user is needed: see Tokens with the mailbox login .
On cPanel you don't need SSO: the cPanel plugin serves Golub inside the webmail session, the way cPanel serves Roundcube.
## 1. Create a Dovecot master user
A master user can log in as any mailbox: user@example.com*mastername with the master password.
With docker-mailserver:
docker exec -it mailserver setup dovecot-master add golub 'a-long-random-password'
This writes config/dovecot-masters.cf . Dovecot also has to accept * in login names, so add this line to config/dovecot.cf and restart the mail server once:
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@*
On other Dovecot installations, see the Dovecot documentation for master users; the separator must be * .
## 2. Configure Golub
environment:
GOLUB_SSO_SECRET: "at least 32 random characters, shared with the panel"
GOLUB_MASTER_USER: golub
GOLUB_MASTER_PASSWORD: "a-long-random-password"
Tokens with the mailbox login need only GOLUB_SSO_SECRET .
Normal sign-in with a password keeps working next to SSO.
## 3. Create tokens in your panel
The panel builds a payload of five fields separated by | :
email|expires|nonce|lang|theme
Field Rules
email The mailbox to sign in to.
expires Unix timestamp, at most 60 seconds in the future.
nonce Random, at least 16 characters. Each token works only once.
lang Optional: en , sr-Latn or ar . Leave empty to keep the user's choice.
theme Optional: system , light or dark . Leave empty to keep the user's choice.
The token is base64url(payload) + "." + base64url(HMAC-SHA256(secret, payload)) , both without = padding. The panel then redirects the browser to:
https://mail.example.com/sso?token=
Empty optional fields still keep their separators: ana@example.com|1764300000|3f9a…|| .
## PHP
$payload = implode('|', [$email, time() + 60, bin2hex(random_bytes(16)), 'en', 'system']);
$b64 = fn ($s) => rtrim(strtr(base64_encode($s), '+/', '-_'), '=');
$token = $b64($payload) . '.' . $b64(hash_hmac('sha256', $payload, $secret, true));
header('Location: https://mail.example.com/sso?token=' . $token);
## Python
import base64, hashlib, hmac, secrets, time
def golub_token(email: str, secret: str, lang: str = "", theme: str = "") -> str:
payload = f"{email}|{int(time.time()) + 60}|{secrets.token_hex(16)}|{lang}|{theme}".encode()
b64 = lambda b: base64.urlsafe_b64encode(b).rstrip(b"=").decode()
return b64(payload) + "." + b64(hmac.new(secret.encode(), payload, hashlib.sha256).digest())
## Go
func golubToken(email, secret, lang, theme string) string {
nonce := make([]byte, 16)
rand.Read(nonce)
payload := fmt.Sprintf("%s|%d|%x|%s|%s", email, time.Now().Add(time.Minute).Unix(), nonce, lang, theme)
mac := hmac.New(sha256.New, []byte(secret))
mac.Write([]byte(payload))
enc := base64.RawURLEncoding
return enc.EncodeToString([]byte(payload)) + "." + enc.EncodeToString(mac.Sum(nil))
}
## Tokens with the mailbox login
When the panel knows a login for the mailbox, it can put it in the token instead of relying on a master user. Golub then signs in to IMAP and SMTP with that login, like a normal password login, and keeps it only in the encrypted session cookie. GOLUB_MASTER_USER is not needed; leave it unset if every token carries a login, so the SSO secret alone opens no mailbox.
The payload gets a sixth field:
email|expires|nonce|lang|theme|credentials
credentials is login , a NUL byte, and password , encrypted with AES-256-GCM:
- key: HKDF-SHA256 of GOLUB_SSO_SECRET , no salt, info golub sso credentials , 32 bytes;
- a random 12-byte IV;
- associated data: the first five fields with their separators, email|expires|nonce|lang|theme ;
- the field is base64url(IV + ciphertext + tag) without padding.
The HMAC is then computed over the whole six-field payload, as before. login may be empty to sign in as email ; email is still the address the user sends from.
$payload = implode('|', [$email, time() + 60, bin2hex(random_bytes(16)), '', '']);
$key = hash_hkdf('sha256', $secret, 32, 'golub sso credentials');
$iv = random_bytes(12);
$sealed = openssl_encrypt($login . "\0" . $password, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv, $tag, $payload);
$b64 = fn ($s) => rtrim(strtr(base64_encode($s), '+/', '-_'), '=');
$payload .= '|' . $b64($iv . $sealed . $tag);
$token = $b64($payload) . '.' . $b64(hash_hmac('sha256', $payload, $secret, true));
header('Location: https://mail.example.com/sso?token=' . $token);
If the login is refused, the user lands on the login page as with any other bad token, and Golub logs sso login rejected .
## What happens on errors
If the token is expired, reused, badly signed or malformed, or the mail server refuses the master login or the login in the token, the browser lands on the login page with "The sign-in link is invalid or has expired. Please sign in again." The reason is logged as sso token rejected or sso login rejected . If the mail server can't be reached, the login page says so instead.
## Security notes
- Keep GOLUB_SSO_SECRET and the master password only on the panel and in Golub's environment.
- Tokens are single use: Golub remembers each nonce until the token expires. The nonces live in memory, so if you run several Golub instances behind a load balancer, send /sso requests for one user to the same instance. All instances need the same GOLUB_SECRET_KEY , so a session started on one works on the others.
- Signing out of an SSO session only ends the Golub session. With a master user, no mailbox password is stored in the cookie; with a login in the token, that login is stored, encrypted, as for a password login.
---
# Docs: cPanel
URL: https://golubmail.com/docs/cpanel/
On a cPanel & WHM server, Golub installs as a plugin and shows up in cPanel webmail next to Roundcube. Users open it the same way they open Roundcube, already signed in. Administrators change its settings and update it in WHM.
## How it works
Golub runs the way cPanel runs Roundcube:
- It opens at https://your-server:2096/cpsess…/3rdparty/golub/ on the webmail port, inside the user's cPanel webmail session. There is no extra port to open and no extra certificate.
- It signs in to Dovecot and Exim with the temporary login cPanel gives every webmail app for that session. There is no master user and no stored password. When the user logs out of cPanel webmail, Golub's session ends too.
- The Golub service itself listens only on 127.0.0.1 . A small PHP script that cpsrvd runs as the cPanel user passes each request on to it.
- Mail, settings, contacts and PGP keys live in each mailbox on the IMAP server, as they do everywhere else Golub runs.
New mail shows up on the list's refresh interval (Settings > Preferences, every minute by default), not instantly: cPanel's webmail server can't hold a connection open for live updates.
## Requirements
- cPanel & WHM with the Jupiter theme, and root access
- x86-64, the only architecture cPanel supports
- cPanel's own Dovecot and Exim (the default)
## Install
As root:
curl -fsSLO https://github.com/stefanpejcic/Golub/releases/latest/download/golub-linux-amd64.tar.gz
tar xzf golub-linux-amd64.tar.gz
sh cpanel/install.sh
The plugin comes in the same archive as the golub binary.
The installer:
- puts the binary and plugin files in /usr/local/golub ;
- creates the system user golub and the systemd service golub ;
- writes its settings to /etc/golub.env , with new random secrets;
- adds Golub to cPanel's webmail apps and to the webmail home page;
- adds Plugins > Golub Webmail to WHM;
- adds Golub to WHM's Service Manager , which checks it every few minutes and restarts it when it stops answering.
Running it again upgrades Golub and keeps the settings already in /etc/golub.env .
## Settings in WHM
WHM > Plugins > Golub Webmail edits the same settings you would set in Docker Compose (see Configuration ): mail server, defaults for new users, branding and log level. Save and restart checks them with Golub first. If Golub refuses them, nothing changes. If Golub doesn't start with the new settings, the old ones are restored.
The page also shows whether the service is running and the installed version next to the latest release on GitHub. Below the settings is the service log.
Golub runs as the user golub , which can't read files under /home , so put a custom logo in /etc/golub/ .
## On the webmail page
Golub gets its own panel under Open your inbox , the same size as Roundcube's. Open my inbox when I log in under either panel makes that app open right after login, as cPanel does for Roundcube.
The panels come from the file /var/cpanel/customizations/webmail/jupiter/includes/home_banner.html.tt . If that file already exists and isn't Golub's, the installer leaves it alone. Golub is then only listed under Change your webmail client .
## Updating
When a newer release is out, the WHM page shows an Update button. It downloads the release for this server, checks it against the release's SHA256SUMS and runs the installer from it. If any step fails, the installed version keeps running.
From the shell:
/usr/local/golub/cpanel/bin/golub-update --check # installed and latest version
/usr/local/golub/cpanel/bin/golub-update # update to the latest release
## Uninstall
sh /usr/local/golub/cpanel/uninstall.sh # keeps /etc/golub.env
sh /usr/local/golub/cpanel/uninstall.sh --purge # removes the settings too
Mail, settings and contacts stay in the mailboxes either way.
## Troubleshooting
- "Golub webmail is not available right now" : the Golub service isn't answering. Run systemctl status golub and journalctl -u golub , or look at the log in WHM.
- Settings Golub refuses : run /usr/local/golub/cpanel/bin/golub-envrun /usr/local/golub/golub -check . It names the setting that is wrong.
- Golub is missing from the webmail page : run /usr/local/golub/cpanel/bin/golub-webmail as root to add it again. It does this after every save in WHM too.
More in Troubleshooting .
---
# Docs: OpenPanel
URL: https://golubmail.com/docs/openpanel/
OpenPanel ships Golub as one of its webmail clients. There is nothing to install: the administrator switches from Roundcube to Golub in OpenAdmin, and users find their mail at the same webmail address as before.
## Switch to Golub
- In OpenAdmin, open Emails > Settings .
- Under Webmail , choose Golub as the Webmail client .
- Click Save client .
OpenAdmin stops Roundcube and starts Golub in its place; only one of the two runs at a time. The first switch downloads the Golub image, so it can take a minute or two. Current software and Status in the same section show which client is running.
To go back, choose Roundcube and save again. Mail, folders and contacts stay on the mail server, so nothing is lost either way. Golub's own settings and contacts live in each mailbox too, and are there again the next time you switch to Golub.
## Webmail domain
Webmail domain in the same section sets the address of the webmail, for example webmail.example.net . Golub is served on that domain, and /webmail on every user's domain redirects to it. Click Save domain to apply it.
The domain is the same for Roundcube and Golub, so switching the client doesn't change the address users open.
## From the command line
opencli email-webmail client golub # switch to Golub
opencli email-webmail client roundcube # switch back to Roundcube
opencli email-webmail domain webmail.example.net
## Settings
OpenPanel connects Golub to its mail server and keeps Golub's secrets in its own configuration, so Golub works without further setup. For branding, defaults for new users and the other options, see Configuration .
---
# Docs: Branding
URL: https://golubmail.com/docs/branding/
Three variables put your own name, logo and colour on Golub. All are optional.
Variable Example Where it shows
GOLUB_BRAND_NAME Example Mail Browser tab title and the login page heading. Up to 64 characters.
GOLUB_BRAND_LOGO /etc/golub/logo.svg In place of the pigeon: on the login page, in the empty message pane and in Settings → About. .png , .jpg , .svg or .webp , up to 512 KB.
GOLUB_BRAND_ACCENT #0f766e Buttons, links and highlights, in the light and dark themes. Must be #rrggbb . Button text turns black or white automatically, whichever reads better on the colour.
The logo file is read once at startup, so mount it into the container read-only:
services:
golub:
image: ghcr.io/stefanpejcic/golub:0.3.0
volumes:
- ./logo.svg:/etc/golub/logo.svg:ro
environment:
GOLUB_BRAND_NAME: "Example Mail"
GOLUB_BRAND_LOGO: /etc/golub/logo.svg
GOLUB_BRAND_ACCENT: "#0f766e"
Without these, the login page shows the Golub name and pigeon:
Tips:
- A square logo with a transparent background works best; SVG stays sharp at every size.
- To change the logo, replace the file and restart the container.
---
# Docs: Updating
URL: https://golubmail.com/docs/updating/
Golub keeps no state of its own, so an update never needs a migration: pull the new image and recreate the container.
docker compose pull golub
docker compose up -d golub
curl http://localhost:8080/healthz # {"status":"ok","version":"0.3.0"}
- Pin an exact version ( 0.3.0 ) in production and update on purpose; 0.3 gets fixes automatically, stable follows every release.
- Releases and their changes are listed on GitHub Releases .
- Users stay signed in across updates as long as GOLUB_SECRET_KEY stays the same.
- To roll back, set the previous version and recreate the container.
Golub follows semantic versioning : 0.3.x releases only fix things.
If something goes wrong after an update, see Troubleshooting .
---
# Docs: Troubleshooting
URL: https://golubmail.com/docs/troubleshooting/
Start with the logs:
docker logs golub
Set GOLUB_LOG_LEVEL=debug for more detail.
## Golub exits right after starting
The log names the variable that is wrong, for example GOLUB_SECRET_KEY: must decode to 32 bytes . Check it against Configuration . The secret key must come from openssl rand -base64 32 ; a word like change-me is refused.
## GOLUB_IMAP_TLS: none is only allowed for loopback or private hosts
You turned TLS off for a mail server on a public address. Use implicit or starttls with the host name on the server's certificate.
## "The mail server is not reachable right now"
Golub can't connect to IMAP. Check GOLUB_IMAP_HOST , the port and the TLS mode, and that the container can reach the server (same Docker network, firewall). A certificate error shows in the logs; for a private CA set GOLUB_TLS_CA .
## Sign-in says the password is wrong, but it works elsewhere
Golub signs in with the full email address as the user name. Check that your IMAP server accepts that form.
## Single sign-on sends users to the login page
See Single sign-on . The usual causes are clocks out of sync between the panel and the Golub host (tokens live only 60 seconds), a different GOLUB_SSO_SECRET on the two sides, or Dovecot not accepting the master user.
## New mail only appears after a while
Golub pushes new mail over a long-lived connection to /api/events . A reverse proxy that buffers responses holds it back; turn buffering off for Golub ( proxy_buffering off; in nginx), see Installation . Golub still checks on the interval set in Settings either way.
## Sending fails
Check GOLUB_SMTP_HOST , GOLUB_SMTP_PORT and GOLUB_SMTP_TLS . If sending works but the Sent copy is missing, the notice says "Message sent, but the copy could not be saved to Sent"; check that the Sent folder exists or pick it in Settings → Special folders .
## Users are signed out after every restart
GOLUB_SECRET_KEY changes between restarts. Set a fixed value instead of generating one at startup.
## Reporting a bug
Open an issue on GitHub with the Golub version from /healthz , what you did, and the relevant log lines. Please report security problems privately to the maintainer, not in a public issue.
---
# Docs: Using Golub
URL: https://golubmail.com/docs/using-golub/
## Signing in
Open Golub and sign in with your full email address and mailbox password. The language and theme can be changed on the login page before signing in. If your hosting panel has a "Webmail" button, it may sign you in directly ( single sign-on ).
You stay signed in until you click Sign out at the bottom of the folder column, or until the session ends (12 hours by default).
## The mailbox
The screen has three columns:
- Folders on the left, with your address, the settings cog, Compose and Contacts at the top, and Sign out and the theme switch (device, light, dark) at the bottom. Unread counts are shown next to each folder.
- The message list in the middle, with the Select and Options menus, Refresh , the search box and paging.
- The open message on the right.
Drag the borders between the columns to resize them; double-click a border to reset it. The sizes are remembered in your browser.
Inbox, Drafts, Sent, Spam, Trash and Archive are recognised automatically and shown in your language. If your server uses other names, pick them in Settings → Special folders .
## Folders
- Click a folder to open it. New mail shows up on its own while Golub is open.
- Drag messages onto a folder to move them there.
- Create, rename, delete, empty, hide, import and export folders in Settings → Folders .
## The message list
Each row shows the sender, subject, date, and icons for attachments, flags and high priority. A blue dot marks unread mail; click the dot to switch between read and unread. Hovering a row shows the message size and quick buttons to flag or delete it.
## Selecting messages
- Ctrl+click ( ⌘+click on a Mac) adds or removes a message from the selection, Shift+click selects a range, Ctrl+A selects the whole page.
- The Select menu selects all, unread, flagged, inverts or clears the selection, and can mark the whole folder as read.
- With several messages selected, the bar above the list marks them read or unread, flags, archives, deletes or moves them.
- On a phone, swipe a row right to archive it and left to delete it.
After a move, archive or delete, the notice at the bottom has an Undo button.
## Sorting and conversations
Options sorts the folder by date, arrival, subject, sender or size, in either order, and turns on Group messages into conversations . Click Save to apply. Sorting happens on the mail server, so it is just as fast in a folder of 50,000 messages.
With conversations on, replies are grouped under the first message; the number shows how many messages the conversation has, and the arrow expands it.
## Search
Type in the search box and press Enter. Golub searches subject, sender and recipients in the current folder. The filter button next to the box adds:
- Also search message text
- Search all folders : results then show which folder each message is in
- Unread only , Flagged only , With attachments
- From and To dates
The number on the filter button shows how many filters are active; Clear removes them. Press Esc in the search box to go back to the whole folder.
## Reading mail
The toolbar above a message has Reply , Reply all , Forward , Delete , Archive , Mark as read or unread and Flag . The icons at the top right switch between plain text and HTML, between the dark and light view, and show all headers.
More opens the rest:
- Print , Download (.eml) , Show source
- Edit as new : opens a copy of the message in compose
- Open in new window
- Move to… and Copy to…
## Remote images and trackers
To protect your privacy, images from other websites are hidden until you ask for them, and known tracking pixels are always removed. Click Show images to load the images of one message; they are fetched through Golub, so the sender doesn't see your IP address. To always show them, change Settings → Displaying messages .
## Attachments
Attachments are listed under the message header. Images, PDFs and text files open in a preview; everything can be downloaded.
## Also in the message view
- Unsubscribe appears for mailing lists that offer it.
- When the sender asked for a read receipt, Golub asks whether to send it. Nothing is sent automatically.
- High and low priority are shown next to the subject.
- HTML messages are shown darker in the dark theme. Turn this off with the moon icon above the message, or for all messages in Settings .
## Writing mail
Click Compose . Fill in the recipients: Golub suggests people from your contacts and people you wrote to before, and turns every finished address into a chip. Cc and Bcc are on the right.
- From chooses one of your identities ; its signature is added automatically.
- The toolbar has bold, italic, underline, lists, quotes, links and clear formatting. Plain text switches to plain text, Rich text back.
- Responses inserts one of your saved replies ( Settings → Responses ).
- Priority and Request read receipt are next to it.
- Attach adds files. A message can be up to 25 MB in total.
- Your browser checks spelling as you type.
- Drafts are saved automatically every minute, or with Save draft . Closing compose with unsaved changes asks whether to keep them.
- Encrypt and Sign appear once you have a PGP key: see Encryption (PGP) .
Press Ctrl+Enter to send. A message without a subject asks for confirmation first.
## Contacts
Contacts keeps names, email addresses, phone numbers, organization and notes, sorted into groups.
- New contact and New group are at the top; click a contact to edit it.
- Write email writes to one contact; Write to everyone in … writes to a whole group.
- Collected addresses are people you wrote to who are not in your contacts yet. They are suggested in compose; add them to your contacts or forget them. Collecting can be turned off in Settings → Composing messages .
- Import vCard and Export vCard move contacts to and from other programs.
Contacts are stored in your own mailbox, so they move with it to a new server.
## On a phone
Golub works on phones and tablets. The folder list opens from the menu button at the top left; the message list and the open message each take the full screen.
Message list Menu Message
## Dark theme
The theme switch at the bottom of the folder column follows your device, or forces light or dark.
See also: Keyboard shortcuts , Settings .
---
# Docs: Settings
URL: https://golubmail.com/docs/settings/
Open settings with the cog next to your address at the top of the folder column. Back to mail (or Esc) returns to your mailbox; the arrow keys move between sections.
Changes are saved as soon as you make them. Settings are stored in a hidden folder of your own mailbox, so they follow you to every browser and device, and survive a move to another server.
Group Sections
Preferences General , Mailbox view , Displaying messages , Composing messages , Special folders
Account Folders , Identities , Responses , Encryption (PGP)
Golub About , Keyboard shortcuts
## General
Option Choices Default What it does
Language English, Srpski, العربية your browser's language Language of the whole interface. Arabic also switches the layout to right to left.
Theme Same as device, Light, Dark Same as device Colours of the interface. Also on the switch at the bottom of the folder column.
Show today's mail with time only on / off on Today's messages show only the time; older ones show the date.
Check for new mail every Never, 30 s, 60 s, 5 min, 10 min 60 seconds A fallback check. When the mail server supports it, new mail shows up immediately anyway.
## Mailbox view
Option Choices Default What it does
Messages per page 25, 50, 100, 200 50 How many messages one page of the list shows.
Mark previewed messages as read Immediately, After a delay, Never Immediately When an opened message counts as read. After a delay adds a Delay choice: 1, 3, 5, 10 or 30 seconds (default 3).
When deleting Move to Trash, Delete permanently Move to Trash Deleting in Trash itself always deletes permanently.
Empty Trash when signing out on / off off Permanently deletes everything in Trash when you click Sign out .
The sort order and conversations are set from Options above the message list; see Using Golub .
## Displaying messages
Option Choices Default What it does
Prefer plain text on / off off Shows the plain-text version of messages that have one. You can still switch per message.
Show HTML messages dark in the dark theme on / off on Darkens HTML messages so they match the dark theme. Pictures keep their colours.
Remote images Ask every time, Always show Ask every time Whether images from other websites load. They always load through Golub, so senders never see your IP address. Tracking pixels are removed either way.
Show email addresses next to names on / off on Shows Name in the message header instead of only the name.
## Composing messages
Option Choices Default What it does
Compose in HTML on / off on New messages start as rich text; off starts them as plain text.
When replying Start new message above the quote, below the quote above Where your text goes in a reply.
Forward messages Inline, As attachment Inline As attachment forwards the original message as an .eml file.
Add signature to replies and forwards on / off on New messages always get the signature of the chosen identity.
Check spelling while writing on / off on Uses your browser's dictionary for the language set in the browser.
Remember the people I write to on / off on Adds new recipients to Collected addresses in Contacts, for suggestions.
Save drafts automatically every Never, 30 s, 60 s, 3 min, 5 min 60 seconds Encrypted messages are never saved as drafts.
## Special folders
Golub finds Drafts, Sent, Spam, Trash and Archive on its own, from the folder flags your mail server sets. Pick a folder here only if your server uses different names; Automatic goes back to detection.
## Folders
Every folder with its number of messages and size. The bar shows each folder's share of your quota, or of all your mail when the server sets no quota; with a quota, the total also shows the limit.
- Create : type a name at the top. Use your server's separator (usually . or / ) for subfolders, like Work/Projects .
- Show in list : hides or shows the folder in the folder column (IMAP subscription). Inbox is always shown.
- Rename , Delete (with all its messages), Empty (deletes all messages, keeps the folder).
- Import adds messages from .eml or .mbox files, up to 200 MB per import.
- Export downloads the whole folder as one .mbox file, which Thunderbird and most mail programs can open.
## Identities
An identity is a name and address you send from. Each has:
Field What it does
Display name Shown to recipients next to your address.
Email Sender address. Your mail server may refuse addresses other than your own or its aliases; compose warns about this.
Organization Added as an Organization header.
Reply-To Where replies should go, if not to the sender address.
Bcc Always sends a hidden copy to this address.
Signature Added to new messages, and to replies and forwards if that option is on. Tick Signature is HTML to write it as HTML.
Default identity Used for new messages. Replies use the identity the original was sent to.
Choose the identity per message with From in compose.
## Responses
Saved replies you use often. Each has a name and text; insert them in compose from the Responses menu.
## Encryption (PGP)
Create or import your own key, import other people's public keys, export or delete keys, and lock unlocked keys. Everything about PGP is on its own page: Encryption (PGP) .
## About
The Golub version, license, link to the source code, and the open source projects Golub is built with.
## Keyboard shortcuts
The full list is also on Keyboard shortcuts .
---
# Docs: Encryption (PGP)
URL: https://golubmail.com/docs/pgp/
Golub can encrypt and sign mail with OpenPGP, compatible with Thunderbird, GnuPG, Proton Mail, Mailvelope and other OpenPGP programs (PGP/MIME, RFC 3156).
All encryption happens in your browser. The server never sees the text of an encrypted message or your unlocked private key.
- Your private key is stored in a hidden folder of your own mailbox, always protected by your passphrase.
- Unlocking a key keeps it in the memory of that browser tab only. It locks again after 15 minutes without use, when you close the tab, or with Lock keys now .
- Nobody can recover a forgotten passphrase, not even the server administrator. Export your private key and keep it somewhere safe.
## Setting up your key
Open Settings → Encryption (PGP) .
Create a new key: pick the identity under Create key , type a passphrase of at least 8 characters twice, and click Create key . Golub creates a modern Curve25519 key.
Or import your existing key: paste it into Import key , or click Choose file… to pick an .asc file. A private key without a passphrase gets one before it is stored.
Each key has Export public key , Export private key and Delete . Send your public key to the people who should write to you encrypted.
## Keys of other people
To send someone encrypted mail you need their public key. Import it in the same Import key box. When a message has a key attached (an .asc file), it gets an Import key button right in the message.
## Sending encrypted or signed mail
Once you have a key, compose shows two more options:
- Encrypt : only the recipients can read the message, and so can you, because Golub also encrypts it to your own key so you can read your copy in Sent. Golub needs the public key of every recipient; if one is missing, it lists the addresses before sending.
- Sign : recipients can check that it came from you and was not changed. Signed messages without encryption stay readable for everyone.
If your key is locked, Golub asks for the passphrase when you send:
Limits:
- Encrypted messages are not saved as drafts, because the draft would sit unencrypted on the server.
- Attachments taken over from another message (when forwarding) can't be encrypted or signed; attach the files again.
## Reading encrypted and signed mail
Encrypted messages ask you to unlock your key, then show the decrypted text and attachments. The badge above the text shows the result of the signature check:
Badge Meaning
Encrypted The message was encrypted.
Signed by … (green) The signature is valid and comes from a key you have.
Signed with a key you don't have Import the sender's public key to check it.
The signature does not match The message may have been changed after it was signed.
Messages that were not encrypted for any of your keys say so; Golub can't open them.
Both PGP/MIME and older inline PGP ( -----BEGIN PGP MESSAGE----- in the text) are understood.
---
# Docs: Keyboard shortcuts
URL: https://golubmail.com/docs/keyboard-shortcuts/
On a Mac, use ⌘ where this page says Ctrl . Shortcuts are off while you type in a field.
## Message list
Keys Action
↓ Open the next message
↑ Open the previous message
Ctrl + click Add or remove a message from the selection
Shift + click Select a range of messages
Ctrl + A Select all messages on the page
Esc Clear the selection, or close the open message
## Selected or open message
Keys Action
Delete Delete
A Archive
S Move to Spam
## Composing
Keys Action
Ctrl + Enter Send
Ctrl + S Save draft
Esc Close compose (asks to save unsaved changes)
## Settings
Keys Action
↓ Next section
↑ Previous section
Esc Close settings and go back to mail
The same list is in Golub under Settings → Keyboard shortcuts .
---
# Docs: Languages and translations
URL: https://golubmail.com/docs/languages/
Golub is available in:
Language Code
English en
Serbian (Latin) sr-Latn
Arabic ar
Users pick their language on the login page or in Settings → General . Without a choice, Golub follows the browser's languages, then the server default GOLUB_DEFAULT_LOCALE . A host panel can also pass the language in the single sign-on token.
Only the chosen language is downloaded, so adding languages doesn't make Golub slower to load.
## Right to left
Arabic switches the whole interface to right to left: the folder column moves to the right, and menus and icons are mirrored.
The text of every message picks its own direction, in any interface language, so an Arabic or Hebrew message reads correctly in the English interface too.
## How translations work
Each language is one JSON file in web/src/locales , keyed by message id. English ( en.json ) is the source:
"compose.send": "Send",
"folders.unread": { "one": "{count} unread message", "other": "{count} unread messages" }
- Words in braces such as {count} or {folder} are filled in by Golub. Keep them, but move them wherever your sentence needs them.
- Messages that depend on a number list every plural form your language has, the ones Intl.PluralRules reports: English has one and other , Serbian adds few , Arabic uses zero , one , two , few , many and other .
- Dates, times, numbers and file sizes are formatted by the browser for the language, so they need no translation.
## Fixing or finishing a translation
Edit the language file, then run the check, which reports missing or unknown keys and missing plural forms:
cd web && npm ci && node scripts/check-locales.mjs
## Adding a language
- Copy en.json to the new language code, for example de.json , and translate it.
- Add the language to loaders in web/src/lib/locale.svelte.ts .
- Add the code to Locales in internal/config/config.go .
- Add a language. entry with the language's own name (for example "language.de": "Deutsch" ) to every language file.
- Hebrew, Persian and Urdu are already known as right to left; for another right-to-left language, add its code to RTL in web/src/lib/i18n.ts .
- Run the check above and send a pull request.
The Arabic translation was made without a native speaker, so corrections there are especially welcome.