as I’m working at the moment over a dsync solution for my mailserver reading a lot of documentation - that’s what I’ve found:
dsync is running at a per user base so you will see in the tachtler-script something like:
if [ ! -n "$FILE_USERLIST" ]; then
log "Check if the variable FILE_USERLIST is set ................[ NO ]"
log "Mailboxes to backup will be determined by doveadm user \"*\"."
for users in `doveadm user "*"`; do
VAR_LISTED_USER+=($users);
done
You can also find a warning concerning shared and public folder in the dovecot-wiki Wiki has been closed :
WARNING : Shared folder replication doesn’t work correctly right now – mainly it can generate a lot of duplicate emails. This is because there’s currently a per-user lock that prevents multiple dsyncs from working simultaneously on the same user. But with shared folders multiple users can be syncing the same folder. So this would need additional locks (e.g. shared folders would likely need to lock the owner user, and public folders would likely need a per-folder lock or a maybe a global public folder lock). Fixing this is currently low priority for Dovecot developers.
Nevertheless doveadm sync also knows the option -m for a mailbox-sync. The script then would have to be extended to also backup this mailbox.
It isn’t a solution yet, but perhaps the reason why the script won’t backup this mailbox.
I searched long time for a working solution and with several tests. But without success.
But now I reused the script above with success!
Each “shared IMAP” folder has an e-mail address. So I used the script with dedicated e-mail addresses (of the shared IMAP folder) without test of the e-mail address itself. And it is working!
# CUSTOM - Path and file name of a file with e-mail addresses to backup, if
# SET. If NOT, the script will determine all mailboxes by default.
# FILE_USERLIST='/path/and/file/name/of/user/list/with/one/user/per/line'
# - OR -
# FILE_USERLIST=''
FILE_USERLIST='**/usr/local/bin/mail_folder.cfg**'
# CUSTOM - Check when FILE_USERLIST was used, if the user per line was a
# valid e-mail address [Y|N].
FILE_USERLIST_VALIDATE_EMAIL='**N**'