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

    • diekuh

      • Community Hero
      • volunteer
      Moolevel 110

    Oh, that’s old.

    You can mail me to info@servercow.de, I will fix it for you, if you like. I’d need access though.

    Have something to say?

    Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

    a year later
    • 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

      No one is typing