You are missing a space after the '--' for a somewhat valid signature detection for various clients.
cb@obelix .._signature/grommunio_default_signature % \cat -A signatur_domain*
--$
<p style="padding: 0; margin: 0;">$
Here is some place for your html signature...$
</p>$
--$
<p style="padding: 0; margin: 0;">$
Here is some place for your html signature...$
</p>$
At least to RFC 3676 (i know it says usenet but thats where many stuff originated).
https://en.wikipedia.org/wiki/Signature_block#Standard_delimiter
And i would probably leave out the thumbnail or did you add that for some reason?
If so, then it might be a good idea to add a little README on how to generate one yourself.
I'm guessing something like this:
PIC=moo1.jpg; MIME=$(xdg-mime query filetype $PIC); BASE64="base64,$(base64 -w 0 "$PIC")"; THUMBNAIL="${MIME};${BASE64}" ; jq --null-input --arg thumbnail "$THUMBNAIL" '{"settings":{"zarafa":{"v1":{"main":{"thumbnail_photo": $thumbnail } } } } }'
Haven't tried the actual script yet tho 😛
EDIT: And that .settings.zarafa.v1.state.folders i'm not so sure about it 🤷
EDIT2: i would probably leave that state.folders.[] out as this long "0000..." differs for users as it seems.
EDIT3: and this is probably a MAC thing but i would suggest using an archive-thingy that doesn't write (imo useless) metadata or whatever into the archive.
cb@obelix /tmp/tmp.r5ZKG9ZsEz % unzip -l grommunio_default_signature.zip
Archive: grommunio_default_signature.zip
Length Date Time Name
--------- ---------- ----- ----
0 2026-05-29 15:56 grommunio_default_signature/
163 2026-05-29 15:56 __MACOSX/._grommunio_default_signature
1677 2026-05-29 15:54 grommunio_default_signature/neue_user_default_websettings_und_signatur.sh
163 2026-05-29 15:54 __MACOSX/grommunio_default_signature/._neue_user_default_websettings_und_signatur.sh
3139 2026-05-29 15:55 grommunio_default_signature/signatur_anwenden.sh
163 2026-05-29 15:55 __MACOSX/grommunio_default_signature/._signatur_anwenden.sh
89 2026-05-29 15:56 grommunio_default_signature/signatur_domain1.html
163 2026-05-29 15:56 __MACOSX/grommunio_default_signature/._signatur_domain1.html
3402 2026-05-29 15:56 grommunio_default_signature/websettings_defaults.json
163 2026-05-29 15:56 __MACOSX/grommunio_default_signature/._websettings_defaults.json
89 2026-05-29 15:56 grommunio_default_signature/signatur_domain2.html
163 2026-05-29 15:56 __MACOSX/grommunio_default_signature/._signatur_domain2.html
--------- -------
9374 12 files
EDIT4: I'm a bit confused about the # 2. Initiallauf
You are creating a list of all mailboxes, copy it to the db_file and then exit. Wouldn't this prevent any initial signature creation of any mailbox that existed on the first and second-run as those mailboxes will be treated as "already initialized" from what i can see from your comm -13 command?
working on some improvements right now...