Anand Kumria
2013-Jul-21 14:12 UTC
[Dovecot] attachments not with email causing FETCH BODY[] failed
Hi, 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 My dovecot.conf attachment related config is: mail_attachment_dir = /home/%d/%n/attachments mail_attachment_min_size = 128k mail_attachment_fs = sis posix mail_attachment_hash = %{sha1} So, questions: - anyone else experiencing this? - how might this occurred? - what is the best way to find the corrupted message? - how should I go about fixing this? Any help or pointers would be appreciated. Thanks, Anand
Charles Marcus
2013-Jul-22 12:09 UTC
[Dovecot] attachments not with email causing FETCH BODY[] failed
On 2013-07-21 10:12 AM, Anand Kumria <wildfire at progsoc.org> wrote:> My dovecot.conf attachment related config is:No, please don't provide copy/pastes of config files. Always provide FULL doveconf -n output (and postfix -n output when it may be related to postfix)... -- Best regards, Charles
Timo Sirainen
2013-Aug-05 18:19 UTC
[Dovecot] attachments not with email causing FETCH BODY[] failed
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=86389I 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*