Mailcow-dockerized: How can I change SOGo colors?

Created on 26 Jun 2019  路  7Comments  路  Source: mailcow/mailcow-dockerized

I'd like to know how to change SOGo colors. I've seen old guides that no longer work and I really need to change the colors, so any help is appreciated. Thanks.

dunno

Most helpful comment

The css files are present here :

/var/lib/docker/volumes/mailcowdockerized_sogo-web-vol-1/_data/WebServerResources/css

I simply edited the theme-default.css to change the colours. Used sublime text to find and replace whichever colors I wanted after picking out the colours from chrome inspector.

Had to add this at the end to change the login color.

.md-default-theme.md-accent.md-bg {
    background-color: rgba(142,15,90,.34) !important;
    color: rgb(255, 255, 255) !important;
}

All 7 comments

Yeah, of course I did, it's the first thing I've read. But it doesn't answers my question. I'm not asking how to switch pre-made themes. I'm asking how to make my own or just change the CSS styles directly somehow.

Well my point is that it looks like old ways of adjusting the theme by yourself were mostly removed. You'd need to change the way how the SOGo container is built to restore this functionality.

The last commit that had self-built SOGo with css files you could adjust was this here:
https://github.com/mailcow/mailcow-dockerized/tree/fbe46e39e57b11ebc78603fe5f4c73cb5f899397/data/Dockerfiles/sogo

The commit removing this was this one:
https://github.com/mailcow/mailcow-dockerized/tree/e84dec3b564a38fe796996489679e21a007ea9c2/data/Dockerfiles/sogo

I had hoped that the bit in the documentation would help you looking at the commits reflecting this change.

Maybe @andryyy might reconsider customizing the CSS again, I don't know, but for now it looks like this is no part of the current mailcow-dockerize by default.

Check this out: https://sogo.nu/files/docs/SOGoDevelopersGuide.html#_defining_an_alternate_color_theme
Path in the SOGo container: /usr/lib/GNUstep/SOGo/WebServerResources/js/ and /usr/lib/GNUstep/SOGo/WebServerResources/css/

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

The css files are present here :

/var/lib/docker/volumes/mailcowdockerized_sogo-web-vol-1/_data/WebServerResources/css

I simply edited the theme-default.css to change the colours. Used sublime text to find and replace whichever colors I wanted after picking out the colours from chrome inspector.

Had to add this at the end to change the login color.

.md-default-theme.md-accent.md-bg {
    background-color: rgba(142,15,90,.34) !important;
    color: rgb(255, 255, 255) !important;
}

So, after every mailcow update, we could run a little script to restore custom colors. For me is enough with the login color. Sogo logo is changed using official documentation

Create /opt/mailcow-dockerized/sogologincolor.sh containing:

#!/bin/bash

echo ".md-default-theme.md-accent.md-bg {
    background-color: rgba(224,37,29,1) !important;
    color: rgb(255, 255, 255) !important;
}" >> /var/lib/docker/volumes/mailcowdockerized_sogo-web-vol-1/_data/WebServerResources/css/theme-default.css

Replace "rgba(224,37,29,1)" with your own custom color.
Make it exec (chmod +x sogologincolor.sh) and run it (./sogologincolor.sh) after every update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrick7 picture patrick7  路  3Comments

Braintelligence picture Braintelligence  路  3Comments

K2rool picture K2rool  路  3Comments

thannaske picture thannaske  路  3Comments

CrAazZyMaN21 picture CrAazZyMaN21  路  3Comments