Paolo Cravero
2015-Feb-26 13:47 UTC
mdbox + sis + altstorage: error in attachments-connector (file not found)
Hello, first time here. I am playing with Dovecot because of its mdbox storage, SIS feature and altstorage ability. I authenticate against LDAP (passdb), but I don't fetch operational data from LDAP (mail_locations are static from config files and "user_attrs = =uid=500, =gid=500, =home=/maildata1/home/%d/%1n/%n"). On a daily basis I run "doveadm altmove -A savedbefore 5d" Thunderbird apparently works 100%, but only apparently. When accessing one of those mailboxes through Open-Xchange IMAP I got an error for the first time. Then I could reproduce it with Thunderbird as well, I simply had to open the message mentioned in the log: Feb 26 14:06:02 tst-msg03 dovecot: imap(paolo.cravero at csi.it): Error: read(attachments-connector(/maildata1/altstorage/csi.it/p/paolo.cravero/storage/m.35)) failed: read(/maildata1/attachments/40/68/40683f07fcbf1f95f09b273e472b3c7067f43210641baf6e3cce333a27b36e11-4a235a29fd05db54fd6800001117ea21[base64:19 b/l]) failed: open(/maildata1/attachments/40/68/40683f07fcbf1f95f09b273e472b3c7067f43210641baf6e3cce333a27b36e11-4a235a29fd05db54fd6800001117ea21) failed: No such file or directory (uid=5940, box=INBOX) Feb 26 14:06:02 tst-msg03 dovecot: imap(paolo.cravero at csi.it): Error: read(attachments-connector(/maildata1/altstorage/csi.it/p/paolo.cravero/storage/m.35)) failed: read(/maildata1/attachments/40/68/40683f07fcbf1f95f09b273e472b3c7067f43210641baf6e3cce333a27b36e11-4a235a29fd05db54fd6800001117ea21[base64:19 b/l]) failed: open(/maildata1/attachments/40/68/40683f07fcbf1f95f09b273e472b3c7067f43210641baf6e3cce333a27b36e11-4a235a29fd05db54fd6800001117ea21) failed: No such file or directory (uid=5940, box=INBOX) Feb 26 14:06:02 tst-msg03 dovecot: imap(paolo.cravero at csi.it): Disconnected: Internal error occurred. Refer to server log for more information. [2015-02-26 14:06:02] in=182 out=1266 This happens on many messages sitting in the altstorage that had an attachment. The detached attachment file does not exist. Sometimes not even the path is there (anymore?). At some point in time I have run "doveadm purge" on the mailbox in error, but I am not sure that is the culprit. Have I hit a bug or done something wrong? Please suggest tests to verify where I stand. Config dump follows. Paolo # 2.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-431.el6.x86_64 x86_64 Red Hat Enterprise Linux Server release 6.5 (Santiago) ext3 auth_mechanisms = plain login disable_plaintext_auth = no imap_client_workarounds = tb-extra-mailbox-sep lmtp_save_to_detail_mailbox = yes mail_attachment_dir = /maildata1/attachments mail_attachment_hash = %{sha256} mail_debug = yes mail_gid = 500 mail_location mdbox:/maildata1/main/%d/%1n/%n:ALT=/maildata1/altstorage/%d/%1n/%n:INDEX=/maildata1/indexes/%d/%1n/%n mail_plugins = quota mail_log notify lazy_expunge mail_uid = 500 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave duplicate mbox_write_locks = fcntl mdbox_rotate_size = 50 M namespace { hidden = no list = yes location mdbox:/maildata1/main/%d/%1n/%n:INDEX=/maildata1/indexes/%d/%1n/%n:MAILBOXDIR=expunged prefix = .EXPUNGED/ subscriptions = no } namespace inbox { inbox = yes location mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { lazy_expunge = .EXPUNGED/ mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append mail_log_fields = uid box msgid size flags vsize quota = dict:User quota::file:%h/dovecot-quota quota_grace = 10%% quota_rule = *:storage=10G quota_rule2 = Trash:storage=+100M quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u } protocols = imap pop3 lmtp sieve service auth { unix_listener auth-userdb { group = vmail user = vmail } } service lmtp { inet_listener lmtp { address = 10.102.42.114 port = 24 } process_min_avail = 2 user = vmail } ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocol lmtp { mail_plugins = quota mail_log notify lazy_expunge sieve } protocol lda { mail_plugins = quota mail_log notify lazy_expunge sieve } protocol imap { mail_plugins = quota mail_log notify lazy_expunge imap_quota }