I can’t help with your problem, but I was wondering why mailcow contained an older version of Pigeonhole, especially since mailcow simply installs the Alpine Linux package of dovecot-pigeonhole-plugin
when building the Dovecot Docker image.
Also it is the lastest package available (see the .21):
root@mailcow# docker compose exec dovecot-mailcow apk info dovecot-pigeonhole-plugin
dovecot-pigeonhole-plugin-2.3.21-r17 description:
Sieve and managesieve plugin for Dovecot
But looking at the respective Alpine package souces, they are explicitly using dovecot-pigeonhole-0.5.19.tar.gz
to build the Pigeonhole sub-package for Dovecot.
According to the 0.5.21 release notes, Dovecot indeed fixed a problem with Message-ID headers.
0.5.20 (and even 0.5.19) were just releases to keep the version numbers synced between Dovecot and Pigeonhole.
Long story short: If this fix in 0.5.21 is the solution to your problems, either Alpine must update their package sources to .21 (which would also be less misleading regarding the version number) or mailcow should use a different way to install the current version of Pigeonhole.