On 9. Aug 2021, at 10.41, Ralf Becker <r...@egroupware.org> wrote:
> 
> Made some progress, the attachments are not lost, the new Dovecot server (it 
> was a migration from 2.2.19 to 2.3.15 on a different host), searches them 
> under a partially different filename:
> 
> Aug 09 08:26:19 doveadm: Error: dsync(61c8ab10dbe7): 
> read(attachments-connector(/var/dovecot/imap/$domain/$user/mailboxes/INBOX/dbox-Mails/u.23306))
>  failed: 
> read(/var/dovecot/imap/attachments/99/93/999382f10d91c26e28f964efd3039f42041b73c00ea71da86481476e7adb1ce5a50653b2814ba57b9e8a4f5284203f1b4d3ec0c617de04d750a42b9d0cfb7855-7ca8b3186e43f560fa190000838cbfe1-e8584c2cf5a10b61640000007dc04144-23306[base64:19
>  b/l]) failed: 
> open(/var/dovecot/imap/attachments/99/93/999382f10d91c26e28f964efd3039f42041b73c00ea71da86481476e7adb1ce5a50653b2814ba57b9e8a4f5284203f1b4d3ec0c617de04d750a42b9d0cfb7855-7ca8b3186e43f560fa190000838cbfe1-e8584c2cf5a10b61640000007dc04144-23306)
>  failed: No such file or directory (last sent=mail, last recv=mail_request 
> (EOL))
..
> So the questions are:
> - what is that 3rd part

That's the mailbox GUID. dsync and replication is supposed to preserved them. 
You could check them with:

doveadm mailbox status -u user guid '*'

> - how could it have changed by the migration
> - is there a way to force it back to the existing file-names

Looks like they have changed. You could change the GUIDs afterwards also:

doveadm mailbox update -u user --guid <newguid> mailboxname

BTW. The GUID can also be used to see its creation timestamp:

578fed299419c150550c0000838cbfe1 = Fri  7 Dec 00:17:56 EET 2012
e8584c2cf5a10b61640000007dc04144 = Thu  5 Aug 11:31:49 EEST 2021

Using guid2date.sh:

#!/bin/bash

guid=$1
hex=`printf $guid|cut -c 9-16|sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/'`
dec=`printf "%d" 0x$hex`
time=`date -d "1970-01-01 UTC $dec seconds"`

printf "$guid\nhex: $hex\ndec: $dec\ntime: $time\n"

Reply via email to