Replication stalled by failed attemts to read attachments (mail_attachment_dir)

Ralf Becker rb at egroupware.org
Mon Aug 9 17:08:04 EEST 2021


Thanks for the explanation Timo :)

As the migrated server with dbox and mail_attachment_dir is only a 
temporary step, to replicate into our regular server with mdbox, I have 
now a script listening on the errors and creating symlinks for the 
change mailbox guids.

Sending a periodic "doveadm replicator replicate -f '*'" triggers the 
errors and the script fixes them. Only a matter of a little time and I 
should be done with it.

Ralf


Am 09.08.21 um 11:08 schrieb Timo Sirainen:
> On 9. Aug 2021, at 10.41, Ralf Becker <rb at 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"
>

-- 
Ralf Becker
EGroupware GmbH [www.egroupware.org]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 631 31657-0




More information about the dovecot mailing list