mailcow 2026-11a: the update script no longer breaks itself

mailcow 2026-11a fixes the update script that deleted its own NAT rule since 2024, the IPv6 check that switched IPv6 off on dual-stack hosts, and rspamd's 50 MiB size cap. I ran both versions of the code against fixed inputs.

mailcow 2026-11a: the update script no longer breaks itself

mailcow shipped 2026-11a on 18 November, and the release notes lead with security: nginx 1.30.7, ClamAV 1.4.7, and a rebuilt Postfix 3.10.13 for a brotli flaw that reached CISA's known-exploited list. All of that is worth the upgrade on its own.

The part I want to talk about sits lower down the page. Three fixes in this release touch things that break quietly: the update script's firewall handling, its IPv6 detection, and the size limit rspamd applies to your mail. Each one shows up as a broken host if you don't know where to look.

What changed in 2026-11a

The version numbers worth knowing: nginx 1.30.7, ClamAV 1.4.7, Postfix 3.10.13, rspamd 4.2.3-2, dovecot 2.3.21.1-5. Two security fixes earn the update by themselves. force_tfa did not actually stop a user from removing their second factor, and the Dovecot trim_logs output printed the Redis password in clear text.

Then there are the update script items, which is where this post lives. I pulled the real scripts from both tags and ran them against fixed inputs. Two of the three bugs below reproduce in under a minute, and one has been deleting a firewall rule since 2024.

Trap 1: the update deleted mailcow's own NAT rule

Before this release, the bridge cleanup in update.sh looked like this:

echo -e "\e[32mChecking for conflicting bridges...\e[0m"
MAILCOW_BRIDGE=$($COMPOSE_COMMAND config | grep -i com.docker.network.bridge.name | cut -d':' -f2)
while read NAT_ID; do
  iptables -t nat -D POSTROUTING "$NAT_ID"
done < <(iptables -L -vn -t nat --line-numbers | grep "$IPV4_NETWORK" | grep -E 'MASQUERADE.*all' | grep -v "${MAILCOW_BRIDGE}" | cut -d' ' -f1)

Look at the second line of that block. cut -d':' -f2 on a compose line like com.docker.network.bridge.name: br-mailcow returns br-mailcow, with a leading space. That space then travels into grep -v " br-mailcow". The rule mailcow wants to keep, though, prints in the NAT table as !br-mailcow. The bang sits where the space would be, so the filter never matches, and the MASQUERADE rule for mailcow's own 172.22.1.0/24 network lands in the deletion list.

Here is a real slice of that table:

num   pkts bytes target     prot opt in     out          source         destination
32     333 25075 MASQUERADE  all  --  *      !br-mailcow  172.22.1.0/24  0.0.0.0/0
39       7   420 MASQUERADE  all  --  *      !br-fake     172.22.1.0/24  0.0.0.0/0

No outbound NAT for the mailcow network means unbound cannot reach its upstreams, its healthcheck ping fails, and the dependent containers sit in Created while Postfix does nothing useful. Restarting Docker fixes it, because Docker puts the rule back. The pull request traces this to 2024-08a, and issue #6042, "2024-08a break dns resolution", was closed as a host problem at the time.

I copied the block verbatim from each tag, stubbed iptables so it prints a fixed table and logs every -D call, and ran both:

----- 2026-11  OLD
MAILCOW_BRIDGE=[ br-mailcow]
DELETED rule 32     # mailcow's own MASQUERADE
DELETED rule 39
DELETED rule 41

----- 2026-11a NEW
MAILCOW_BRIDGE=[br-mailcow]
DELETED rule 39
DELETED rule 41

The fix strips the whitespace and then matches the interface as a whole token:

MAILCOW_BRIDGE=$($COMPOSE_COMMAND config | grep -i com.docker.network.bridge.name | cut -d':' -f2 | tr -d "[:space:]\"'")
if [[ -n "${MAILCOW_BRIDGE}" ]]; then
  while read NAT_ID; do
    iptables -t nat -D POSTROUTING "$NAT_ID"
  done < <(iptables -L -vn -t nat --line-numbers | grep "$IPV4_NETWORK" | grep -E 'MASQUERADE.*all' | grep -vE "[[:space:]]!?${MAILCOW_BRIDGE}[[:space:]]" | cut -d' ' -f1)
fi

Rule 39 and rule 41 still get deleted in both versions. Those belong to other bridges on the same subnet, and clearing them is the job this block exists to do.

Trap 2: the update switched IPv6 off on a dual-stack host

The IPv6 code lives in _modules/scripts/ipv6_controller.sh. In the old version, a host with a default IPv6 route gets a connectivity ping to 2001:4860:4860::8888 and 2606:4700:4700::1111. If both pings fail, the script decides the host has no IPv6 and writes ENABLE_IPV6=false into mailcow.conf. On a host with a public IPv6 address, that is a firewall change made for you by a mail server update.

The security angle is the part worth understanding. With IPv6 disabled in mailcow and Docker's userland proxy in play, connections that arrive over IPv6 get forwarded to the containers with an internal source address. Postfix trusts internal addresses. You end up with a server that relays mail for anyone who knows its IPv6 address. Issue #5242 covers this, and the new release prints a warning when it sees the combination.

The new controller keeps IPv6 on when the host holds a public address, and it only writes ENABLE_IPV6=false when you asked for that. I ran four scenarios inside a throwaway Debian container, with ping, ping6 and ip stubbed:

HostExternal pingENABLE_IPV6 after 2026-11after 2026-11a
public address, default routefailsfalsetrue
docker-internal onlyfailsfalsefalse

The second row shows the new script has not gone soft on hosts that genuinely lack IPv6. It still disables it there. The difference is the dual-stack case, where a blocked ICMP probe used to be enough to rewrite your config.

Trap 3: rspamd capped mail at 50 MiB while Postfix promised 100

Postfix in mailcow sets message_size_limit = 104857600. Rspamd's own default for max_message is 50 MB. Every mail between those two numbers was accepted by the front door and then temporarily rejected by the content filter, so the sending server retried until it gave up. Issue #7318 describes it well: mail stuck in outbound queues "because mailcow temporarily rejects these messages forever".

Rspamd states its default plainly in its own help output:

$ rspamadm confighelp -k options
Configuration element: max_message
    Description: Maximum size of the message to be scanned (50Mb by default)
    Type: size

2026-11a adds the override to data/conf/rspamd/local.d/options.inc:

+# Must not be lower than message_size_limit in postfix main.cf
+max_message = 134217728;

That is 128 MiB, comfortably above the 100 MiB Postfix limit. I confirmed the setting loads by mounting the new file into the rspamd image from the release and dumping the merged config, which printed max_message = 134217728; where the old release printed nothing at all.

The bit the release notes do not mention

Raising max_message changes what reaches the scanner, and the antivirus module has its own ceiling. mailcow sets max_size = 20971520 (20 MiB) in antivirus.conf, and that number is the same in both tags. Rspamd's source comment for the option says: "If max_size is set, messages > n bytes in size are not scanned".

So after this upgrade, a 60 MiB mail gets delivered, which is progress, and it skips ClamAV entirely. If large attachments matter to you, raise max_size in that file as well. It costs RAM and CPU per message, which is the reason the cap exists. I would rather know that before a client asks why a big attachment sailed through.

How I tested this

I did not spin up a full mailcow stack, and I want to be clear about what that leaves out. The firewall and IPv6 findings come from running the actual script code from both tags with stubbed system calls and a fixed NAT table, inside a disposable container. That proves the logic changed and shows which rule or setting each version writes. It does not prove how a live mailcow behaves end to end.

Size limits are read from the files at each tag, and the rspamd default is quoted from the binary mailcow ships. Everything ran on amd64. The IPv6 tests happened in a container, so nothing on my own host was touched, which matters because the old script writes /etc/docker/daemon.json when it thinks a host lacks IPv6.

Before you run update.sh

Back up /opt/mailcow-dockerized and its volumes first, as with any release. After the update finishes, check the two things this release fixes:

iptables -t nat -L POSTROUTING -vn | grep 172.22.1
grep '^ENABLE_IPV6=' /opt/mailcow-dockerized/mailcow.conf

You want the MASQUERADE rule for your mailcow subnet, and ENABLE_IPV6=true if the host has a public IPv6 address. If the rule is missing, docker compose up -d puts it back.

Small detail if you script your upgrades: update.sh now restarts itself after updating itself, --force included, so expect a second run in your logs.

What gets me is how long the NAT bug lived. It shipped in 2024-08a, it looked like a DNS problem, and the issue closed as a host problem. Two years is a long time for a mail server to break itself on update day. Updating is still the right call. Reading what your update script does to iptables is worth ten minutes.

Sources

I wrote this after pulling the scripts from both tags and running them in a throwaway container on my own server. Claude helped me draft and tighten the text; the tests and the measurements are mine.