[Dovecot] attachments not with email causing FETCH BODY[] failed

Timo Sirainen tss at iki.fi
Mon Aug 5 21:19:40 EEST 2013


On 21.7.2013, at 17.12, Anand Kumria <wildfire at progsoc.org> wrote:

> Anyone else experiencing this (Dovecot 2.2.4, attachments stored
> separately):
> 
> dovecot: imap(user at kamdha.com): Error: file_istream.open(/home/
> example.com/user/attachments/f5/f0/f5f0f2c08c4311fa404d090a703c3b492f2ea718-a52388285a04eb51820c0000d485234e-c92f64f79f0d1ed01e6d5b314f04886c-42501)
> failed: No such file or directory
> dovecot: imap(user at example.com): Error: read(BODY[]) failed: No such file
> or directory (FETCH  for mailbox INBOX UID 42501)
> dovecot: imap(user at example.com): Disconnected: FETCH failed in=186 out=86389

I can think of one reason why this would happen that doesn't involve an actual Dovecot bug:

First session starts fetching the message. It manages to open the sdbox file. Another sesssion deletes the mail and the attachment. The first session can still read the sdbox file, but can't access the attachment. But unless you were stress testing, this is quite unlikely.

> - how might this occurred?
> - what is the best way to find the corrupted message?
> - how should I go about fixing this?

I'd also like to know how it could have happened (other than accidental rm -rf). You could also later try again to read the mail, for example:

doveadm fetch -u user at kamdha.com text mailbox inbox uid 42501

Does that fail with the same error? Do you see anything with:

ls /home/example.com/user/attachments/f5/f0/f5f0f2c08c4311fa404d090a703c3b492f2ea718*



More information about the dovecot mailing list