r/u_Sub_S7v7n

Image 1 — I built a dark mode for SOGo in mailcow that survives updates (custom colors, resizable panes, text size per area)
Image 2 — I built a dark mode for SOGo in mailcow that survives updates (custom colors, resizable panes, text size per area)
▲ 10 r/u_Sub_S7v7n+2 crossposts

I built a dark mode for SOGo in mailcow that survives updates (custom colors, resizable panes, text size per area)

SOGo (the webmail in mailcow) still has no dark mode, and the CSS themes I found tend to break after SOGo updates. So I built one that doesn't touch SOGo's stylesheets at all.

GitHub: https://github.com/Sub-7/mailcow-sogo-darkmode

What it does

  • Dark mode for mail, calendar, contacts and preferences: Auto (follows your OS), Dark or Off. Toggle button in SOGo's toolbar, or Alt+Shift+D
  • Your own header and accent colors, shown exactly as picked in dark mode too
  • Resize folder pane, message list, header and user area by dragging the borders
  • Text size per area
  • Unread messages that actually stand out: bold, color bar, optional tinted background
  • Settings per browser, nothing is stored on the server

Why it survives updates

It's a single JavaScript file, mounted via docker-compose.override.yml onto the js/theme.js that SOGo already loads on every page. No mailcow file is modified (git diff stays empty), so mailcow's update.sh leaves it alone. An optional post_update_hook.sh keeps the mount path in sync.

Safe to try

  • Test it without touching the server: paste the file into the browser console on your SOGo page. It only affects that tab until you reload.
  • Installing only restarts the SOGo container for a few seconds. Mail delivery, IMAP and SMTP are not affected.
  • No network access at all: no fetch/XHR/WebSocket, no external resources, no eval, no cookies. It only stores its settings in localStorage. One unminified file, please read it before installing.
  • Uninstall in three steps. A checksum confirms that SOGo serves mailcow's original file again.
  • Updates via update.sh with checksum verification, backup and rollback. No auto-update.

Limitations

  • HTML emails with their own colors are inverted too (images keep their normal colors).
  • If you customized custom-theme.js, it won't load while this is installed.

Tested with SOGo 5.12 on my own mailcow server and in daily use. Built with the help of an AI assistant (Claude). Feedback, bug reports and translations are very welcome!

u/Sub_S7v7n — 12 days ago