mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.92k stars 1.17k forks source link

CKEditor5 paragraphs and line breaks look the same (paragraphs have no margins) #6138

Closed lkroll closed 14 hours ago

lkroll commented 1 day ago

Contribution guidelines

I've found a bug and checked that ...

Description

When composing a new email using the included CKEditor5 interface, new paragraphs do not have any margins and appear the same as line breaks. This is confusing for end users, as the email will look different when sent.

Essentially pressing "Enter" and "Shift+Enter" looks the same when writing the email.

The issue is likely a CSS override somewhere that sets the margins of paragraphs to 0. The issue only appeared after the recent update that included CKEditor5.

When inspecting a paragraph in the editor, this snippet is setting the margins to 0:

Bildschirmfoto_20241105_170432

As a workaround to "fix" the issue we added a custom CSS override at the end of the theme-default.css file located here /var/lib/docker/volumes/mailcowdockerized_sogo-web-vol-1/_data/WebServerResources/css/theme-default.css:

.ck-content p {margin: revert;}

After that paragraphs in the CKEditor5 have the correct spacing and look like you would expect.

Before:

Bildschirmfoto_20241105_173725

After:

Bildschirmfoto_20241105_173741

Logs:

N/A

Steps to reproduce:

1. Write a new email in the SOGo interface
2. Enter some text and press "Enter"
3. Enter some text and press "Shift+Enter"
4. See no difference between "Enter" and "Shift+Enter"

Which branch are you using?

master

Which architecture are you using?

x86

Operating System:

Debian 11

Server/VM specifications:

24 GB RAM, 10 CPUs

Is Apparmor, SELinux or similar active?

no

Virtualization technology:

VMware

Docker version:

27.2.1

docker-compose version or docker compose version:

v2.29.2

mailcow version:

2024-08a

Reverse proxy:

Nginx

Logs of git diff:

diff --git a/data/conf/sogo/sogo.conf b/data/conf/sogo/sogo.conf
index d398eb05..0644ab02 100644
--- a/data/conf/sogo/sogo.conf
+++ b/data/conf/sogo/sogo.conf
@@ -1,11 +1,26 @@
 {
+    SOGoTimeZone = "Europe/Berlin";
+    SOGoSubscriptionFolderFormat = "%{UserName} (%{FolderName})";

     SOGoCalendarDefaultRoles = (
         PublicViewer,
         ConfidentialDAndTViewer,
         PrivateDAndTViewer
     );

-    WOWorkersCount = "20";
     SOGoACLsSendEMailNotifications = YES;
     SOGoAppointmentSendEMailNotifications = YES;
     SOGoDraftsFolderName = "Drafts";
@@ -46,20 +61,30 @@
     SOGoMailingMechanism = smtp;
     SOGoSMTPAuthenticationType = plain;

-    SxVMemLimit = 384;
-
-    SOGoMaximumPingInterval = 3540;
-
-    SOGoInternalSyncInterval = 45;
-    SOGoMaximumSyncInterval = 3540;
+    //active sync config by install guide, disabled: crazy loads & memory bloat
+    //SOGoInternalSyncInterval = 60;
+    //SOGoMaximumSyncInterval = 3540;
+    //SOGoMaximumPingInterval = 3540;
+    //WOWatchDogRequestTimeout = 60;
+    //WOWorkersCount = 40;
+    //SxVMemLimit = 256;
+
+    //middle ground sync enabled config
+    SOGoInternalSyncInterval = 30; //default 10 secs
+    SOGoMaximumSyncInterval = 290; //default 30 secs
+    SOGoMaximumPingInterval = 290; //default 10 secs
+    WOWatchDogRequestTimeout = 5; //default 10 minutes
+    WOWorkersCount = 8; //default 1
+    SxVMemLimit = 1024; //default 384 megabytes
+
+    //increased socket queue
+    WOListenQueueSize = 100; //default 5

     // 100 seems to break some Android clients
     //SOGoMaximumSyncWindowSize = 99;
     // This should do the trick for Outlook 2016
     SOGoMaximumSyncResponseSize = 512;

-    WOWatchDogRequestTimeout = 30;
-    WOListenQueueSize = 16;
     WONoDetach = YES;

     SOGoIMAPAclConformsToIMAPExt = Yes;
@@ -75,7 +100,12 @@
     SOGoTrashFolderName = "Trash";
     SOGoVacationEnabled = YES;

-    SOGoCacheCleanupInterval = 900;
+    //limit flood
+    //SOGoMaximumRequestInterval=5;
+    //SOGoMaximumRequestCount=5;
+
+    //SOGoCacheCleanupInterval = 43200;
+    SOGoCacheCleanupInterval = 300;
     SOGoMaximumFailedLoginCount = 10;
     SOGoMaximumFailedLoginInterval = 900;
     SOGoFailedLoginBlockInterval = 900;

diff --git a/docker-compose.yml b/docker-compose.yml
index cf0a028f..16e99abc 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -52,6 +52,7 @@ services:
         - "${REDIS_PORT:-127.0.0.1:7654}:6379"
       environment:
         - TZ=${TZ}
+      #command: redis-server --save ""
       sysctls:
         - net.core.somaxconn=4096
       networks:
@@ -132,7 +133,7 @@ services:
         - ./data/conf/dovecot/global_sieve_before:/global_sieve/before:z
         - ./data/conf/dovecot/global_sieve_after:/global_sieve/after:z
         - ./data/assets/templates:/tpls:z
-        - ./data/conf/nginx/:/etc/nginx/conf.d/:z
+        - ./data/conf/nginx:/etc/nginx/conf.d:z
       dns:
         - ${IPV4_NETWORK:-172.22.1}.254
       environment:
@@ -389,7 +390,8 @@ services:
         - ./data/web:/web:ro,z
         - ./data/conf/rspamd/dynmaps:/dynmaps:ro,z
         - ./data/assets/ssl/:/etc/ssl/mail/:ro,z
-        - ./data/conf/nginx/:/etc/nginx/conf.d/:z
+        - ./data/conf/nginx:/etc/nginx/conf.d:z
+        - ./data/conf/nginx.conf:/etc/nginx/nginx.conf:z
         - ./data/conf/rspamd/meta_exporter:/meta_exporter:ro,z
         - sogo-web-vol-1:/usr/lib/GNUstep/SOGo/
       ports:
@@ -613,42 +615,12 @@ services:
           aliases:
             - ofelia

             - ofelia

-    ipv6nat-mailcow:
-      depends_on:
-        - unbound-mailcow
-        - mysql-mailcow
-        - redis-mailcow
-        - clamd-mailcow
-        - rspamd-mailcow
-        - php-fpm-mailcow
-        - sogo-mailcow
-        - dovecot-mailcow
-        - postfix-mailcow
-        - memcached-mailcow
-        - nginx-mailcow
-        - acme-mailcow
-        - netfilter-mailcow
-        - watchdog-mailcow
-        - dockerapi-mailcow
-        - solr-mailcow
-      environment:
-        - TZ=${TZ}
-      image: robbertkl/ipv6nat
-      security_opt:
-        - label=disable
-      restart: always
-      privileged: true
-      network_mode: "host"
-      volumes:
-        - /var/run/docker.sock:/var/run/docker.sock:ro
-        - /lib/modules:/lib/modules:ro
-
 networks:
   mailcow-network:
     driver: bridge
     driver_opts:
       com.docker.network.bridge.name: br-mailcow
-    enable_ipv6: true
+    enable_ipv6: false
     ipam:
       driver: default
       config:

Logs of iptables -L -vn:

N/A

Logs of ip6tables -L -vn:

N/A

Logs of iptables -L -vn -t nat:

N/A

Logs of ip6tables -L -vn -t nat:

N/A

DNS check:

N/A
DerLinkman commented 15 hours ago

You sure this is a mailcow problem?

lkroll commented 14 hours ago

You are right, I wasn't too sure about the relation between SOGo and Mailcow. I just tried the SOGo Demo online (https://demo.sogo.nu) and could replicate the issue there. So I should probably report it over there.