D
drhm

  • Jan 22, 2022
  • Joined Jun 7, 2020
  • 2 discussions
  • 4 posts
  • 2 best answers
  • Post posted... wait what? You got the answer!
    • Ddrhm

        Moolevel 0
      • Edited
      • Best Answerset by drhm

      drhm

      In the meantime I’ve successfully updated my server with the following steps:

      1. Stopping the service:
        sudo docker-compose down

      2. Get updates/changes

        git fetch origin master

      3. Add all changed files to local clone

        sudo git add -A

      4. Commit changes, ignore git complaining about username and mail address

        sudo git commit -m "Local config at $(date)"

      5. Merge changes, prefer mailcow repository, replace “theirs” by “ours” to change merge strategy

        sudo git merge -Xtheirs -Xpatience

      6. If it conflicts with files that were deleted from the mailcow repository, just run…

        sudo git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | sudo xargs rm -v

      7. Add all changed files to local clone

        sudo git add -A

      8. Commit changes, ignore git complaining about username and mail address

        sudo git commit -m "Local config at $(date)"

      9. Pull new images (if any) and recreate changed containers:

        sudo docker-compose pull

      10. Needed bug fixes:
        a. Change entry of the smtp port from 587 to 25 (of mailman-core) and add a return after the last entry in the file:
        emacs ~/docker/mailcow-mailman3-dockerized/data/mailman/core/mailman-extra.cfg
        After the change the new lines are:

        #smtp_port: 587
        smtp_port: 25

        b. Give the container rspamd-mailcow a static ip address. Otherwise the container may get the ip address of the container mailman-core. This is a conflict, which will avoid the start of mailman-core.:

        emacs ~/docker/mailcow-mailman3-dockerized/docker-compose.yml

        • Add an entry “ipv2adress:” under “networks:”, “mailcow-network:” in the part for the container “rspamd-mailcow” (It maybe that also other containers must have a static ip!):

          networks:

           mailcow-network:
          
                pv4_address: ${IPV4_NETWORK:-172.19.199}.200
                aliases:
      1. First Start of the container

        sudo docker-compose up -d --remove-orphans

      • Ddrhm

          Moolevel 0
        • Best Answerset by drhm

        Ich habe die Lösung selbst gefunden.
        Die Ursache war die Definition der Variable COMPOSE_PROJECT_NAME in der Datei mailcow.conf. Sie war - warum auch immer - auf dem Internetserver auf mailcow-dockerized anstatt mailcowdockerized gesetzt.
        Dadurch konnte das Startscript im Container php-fpm-mailcow die Container Id des Containers mysql-mailcow nicht ermitteln und ging deshalb in eine Endlosschleife ohne den eigentlichen Hauptprozess im Container zu starten.

        • Ddrhm

            Moolevel 0

          Hallo, ich habe gerade ein Update auf die aktuelle Version von Mailcow und Mailman gemacht. Beides läuft bei mir in Docker Containern. Da meine Ursprungsversion schon sehr alt war, habe ich das Update manuell durchgeführt und die Schritte zuvor auf meinem PC getestet. Dort hatte ich am Anfang Probleme mit Mailman, die ich aber beheben konnte. Danach hat alles (Mailcow Gui, Emails senden und empfangen, Emaillistenversand und Konfiguration) auf dem PC funktioniert.
          Anschließend habe ich nach dem gleichen Schema meinen Server im Internet upgedatet. Das Lesen und Versenden von Emails einzeln oder über Listen funktioniert genauso wie die Konfigurationsschnittstelle für die Listen. Allerdings musste ich zunächst das Volume mysql-vol-1 durch das Volume vom PC ersetzen, da es am Anfang Schwierigkeiten mit dem Service gab. Auf dem PC hatte ich diese Probleme nicht.

          Was nicht funktioniert, ist der Webzugriff auf die Mailcow Gui. Hier erhalte ich nur eine Fehlermeldung. Auch rspamd-mailcow hat Probleme.

          In den Logs ist folgendes zu sehen:
          nginx-mailcow:

          nginx-mailcow_1      | 31.18.248.111 - - [07/Mar/2021:04:25:26 +0100] "GET / HTTP/1.1" 502 1076 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
          nginx-mailcow_1      | 31.18.248.111 - - [07/Mar/2021:04:25:26 +0100] "GET /bower_components/bootstrap/dist/css/bootstrap.min.css HTTP/1.1" 404 146 "https://mail.muenkel.cc/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
          nginx-mailcow_1      | 2021/03/07 04:25:28 [error] 23#23: *23 connect() failed (111: Connection refused) while connecting to upstream, client: 31.18.248.111, server: mail.muenkel.cc, request: "GET / HTTP/1.1", upstream: "fastcgi://172.19.199.203:9002", host: "mail.muenkel.cc"

          php-fpm-mailcow (nur eine Zeile!):

          php-fpm-mailcow_1    | Uptime: 1  Threads: 7  Questions: 1  Slow queries: 0  Opens: 18  Flush tables: 1  Open tables: 11  Queries per second avg: 1.000

          mysql-mailcow:

          mysql-mailcow_1      | 2021-03-07 04:24:50+01:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.28+maria~focal started.
          mysql-mailcow_1      | 2021-03-07 04:24:51+01:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
          mysql-mailcow_1      | 2021-03-07 04:24:51+01:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.28+maria~focal started.
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] mysqld (mysqld 10.3.28-MariaDB-1:10.3.28+maria~focal) starting as process 1 ...
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Using Linux native AIO
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Uses event mutexes
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Number of pools: 1
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Using SSE2 crc32 instructions
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Initializing buffer pool, total size = 24M, instances = 1, chunk size = 24M
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Completed initialization of buffer pool
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
          mysql-mailcow_1      | 2021-03-07  4:24:51 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
          mysql-mailcow_1      | 2021-03-07  4:24:52 0 [Note] InnoDB: 10.3.28 started; log sequence number 91994324; transaction id 731095
          mysql-mailcow_1      | 2021-03-07  4:24:52 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
          mysql-mailcow_1      | 2021-03-07  4:24:52 0 [Note] Server socket created on IP: '::'.
          mysql-mailcow_1      | 2021-03-07  4:24:52 0 [Warning] 'proxies_priv' entry '@% root@2d7299054d78' ignored in --skip-name-resolve mode.
          mysql-mailcow_1      | 2021-03-07  4:24:52 6 [Note] Event Scheduler: scheduler thread started with id 6
          mysql-mailcow_1      | 2021-03-07  4:24:52 0 [Note] mysqld: ready for connections.
          mysql-mailcow_1      | Version: '10.3.28-MariaDB-1:10.3.28+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
          mysql-mailcow_1      | 2021-03-07  4:24:52 0 [Note] InnoDB: Buffer pool(s) load completed at 210307  4:24:52

          rspamd-mailcow (wiederholend immer die gleiche Zeile):

          rspamd-mailcow_1     | Waiting for PHP on port 9001...`

          Um den Fehler einzukreisen habe ich IP6 in mailcow.conf disabled und alle Einträge in mailcow.conf und docker-compose.yml auskommentiert. Das hat aber nichts gebracht.

          Hier ist die Datei docker-compose.yml:

          docker-compose.txt
          23kB
            • Best Answerset by drhm

            Ich habe die Lösung selbst gefunden.
            Die Ursache war die Definition der Variable COMPOSE_PROJECT_NAME in der Datei mailcow.conf. Sie war - warum auch immer - auf dem Internetserver auf mailcow-dockerized anstatt mailcowdockerized gesetzt.
            Dadurch konnte das Startscript im Container php-fpm-mailcow die Container Id des Containers mysql-mailcow nicht ermitteln und ging deshalb in eine Endlosschleife ohne den eigentlichen Hauptprozess im Container zu starten.

        • Hi,
          I’m running a mailcow docker server on Ubuntu 18.04. The command “git log” shows, that the last commit was from ShadowGhost at Sun Dec 16 11:22:09 2018 +0100. Therefore I had no update.sh script for updating.
          At first I’ve tried the old manual update process described on https://mailcow.github.io/mailcow-dockerized-docs/i_u_m_update/

          . After the update every container was running, but I wasn’t able to send an email. It seemed, that the database was in a bad state.
          At second, I’ve recovered the old installation, downloaded the update.sh script and started it, but also with no full success. The “git merge” failed. I tried to move all own files to another place and after adding a special option ( –allow-unrelated-histories) to the merge command, I was able to finish the update process. But the result was similar to the first update process. I’m not able to send any emails.

          Is my mailcow server to old for a direct update? Should I try to update at first to an older version?

          If so, what commit should I use at first?

          Thanks in advance,
          Heiko

          • drhm replied to this.
            • Best Answerset by drhm

            drhm

            In the meantime I’ve successfully updated my server with the following steps:

            1. Stopping the service:
              sudo docker-compose down

            2. Get updates/changes

              git fetch origin master

            3. Add all changed files to local clone

              sudo git add -A

            4. Commit changes, ignore git complaining about username and mail address

              sudo git commit -m "Local config at $(date)"

            5. Merge changes, prefer mailcow repository, replace “theirs” by “ours” to change merge strategy

              sudo git merge -Xtheirs -Xpatience

            6. If it conflicts with files that were deleted from the mailcow repository, just run…

              sudo git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | sudo xargs rm -v

            7. Add all changed files to local clone

              sudo git add -A

            8. Commit changes, ignore git complaining about username and mail address

              sudo git commit -m "Local config at $(date)"

            9. Pull new images (if any) and recreate changed containers:

              sudo docker-compose pull

            10. Needed bug fixes:
              a. Change entry of the smtp port from 587 to 25 (of mailman-core) and add a return after the last entry in the file:
              emacs ~/docker/mailcow-mailman3-dockerized/data/mailman/core/mailman-extra.cfg
              After the change the new lines are:

              #smtp_port: 587
              smtp_port: 25

              b. Give the container rspamd-mailcow a static ip address. Otherwise the container may get the ip address of the container mailman-core. This is a conflict, which will avoid the start of mailman-core.:

              emacs ~/docker/mailcow-mailman3-dockerized/docker-compose.yml

              • Add an entry “ipv2adress:” under “networks:”, “mailcow-network:” in the part for the container “rspamd-mailcow” (It maybe that also other containers must have a static ip!):

                networks:

                 mailcow-network:
                
                      pv4_address: ${IPV4_NETWORK:-172.19.199}.200
                      aliases:
            1. First Start of the container

              sudo docker-compose up -d --remove-orphans