matbic at gmail.com
2008-Jul-31 09:12 UTC
[Dovecot] Some help required - dovecot: IMAP(matthew): unlink(/home/matthew/Maildir/cur/new) failed: Operation not permitted
Hi all, I have tried very hard to solve this problem but turn to the mailing list as a last resort. In the log I get, for just one account: Jul 31 09:06:17 bickertons dovecot: imap-login: Login: user=<matthew>, method=PLAIN, rip=78.130.81.201, lip=168.143.5.18, TLS Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): Effective uid=1003, gid=1003, home=/home/matthew Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): maildir: data=/home/ matthew/Maildir Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): maildir: root=/home/ matthew/Maildir, index=/home/matthew/Maildir, control=, inboxJul 31 09:06:17 bickertons dovecot: IMAP(matthew): unlink(/home/ matthew/Maildir/cur/new) failed: Operation not permitted Jul 31 09:06:18 bickertons last message repeated 3 times All the other accounts work fine. I have tried removing the dovecote.index and the dovecote-keywords and uidlist files. This gets it working for a while but soon we are back to the same problem. I would really not like to lose all the mail in this account, its that of my boss, (slight note of panic) Matthew bickertons# dovecot --version 1.0.13 bickertons# dovecot -n # 1.0.13: /usr/local/etc/dovecot.conf protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_max_processes_count: 30 max_mail_processes: 50 verbose_proctitle: yes first_valid_gid: 0 mail_privileged_group: mail mail_location: maildir:~/Maildir mail_debug: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle netscape- eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): outlook-idle pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: passdb: driver: pam args: * userdb: driver: passwd
Matthias Andree
2008-Jul-31 09:23 UTC
[Dovecot] Some help required - dovecot: IMAP(matthew): unlink(/home/matthew/Maildir/cur/new) failed: Operation not permitted
On Thu, 31 Jul 2008, matbic at gmail.com wrote:> Hi all, I have tried very hard to solve this problem but turn to the > mailing list as a last resort. > > In the log I get, for just one account: > > Jul 31 09:06:17 bickertons dovecot: imap-login: Login: user=<matthew>, > method=PLAIN, rip=78.130.81.201, lip=168.143.5.18, TLS > Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): Effective uid=1003, > gid=1003, home=/home/matthew > Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): maildir: data=/home/ > matthew/Maildir > Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): maildir: root=/home/ > matthew/Maildir, index=/home/matthew/Maildir, control=, inbox> Jul 31 09:06:17 bickertons dovecot: IMAP(matthew): unlink(/home/ > matthew/Maildir/cur/new) failed: Operation not permitted > Jul 31 09:06:18 bickertons last message repeated 3 times > > All the other accounts work fine.This pretty much looks like a b0rked Maildir structure, and .../cur/new being a directory rather than a file - and you cannot unlink() a directory (rmdir would have to be used, but that's a different story). The layout should be: /home/matthew/Maildir/cur /home/matthew/Maildir/new /home/matthew/Maildir/tmp where cur and possibly new should contain some mail files, and folders being similar to: /home/matthew/Maildir/.somefolder/{cur,new,tmp,.maildirfolder} Check how the Maildir looks like and possibly correct it by moving cur/new or its contents into the right place, and check if the mail filtering/delivery rules designate the proper places to drop mail off. -- Matthias Andree
Matthias Andree
2008-Jul-31 10:55 UTC
[Dovecot] Some help required - dovecot: IMAP(matthew): unlink(/home/matthew/Maildir/cur/new) failed: Operation not permitted
Hi I hope you're not offended by posting a quote to the list... you sent the mail just to me. On Thu, 31 Jul 2008, matbic at gmail.com wrote:> Here here is an excerpt: > > ls -l home/matthew/Maildir/cur >...> drwx------ 2 matthew matthew 512 Jul 30 17:48 cur:2,ST > drwx------ 2 matthew matthew 512 Jul 31 06:55 new > drwx------ 2 matthew matthew 512 Jul 30 18:21 tmp:2,ST > > Is this to be expected or is this my problem?These (in .../Maildir/cur) are your problem - someone created a Maildir underneath Maildir/cur, and dovecot or some other software considered the three directories messages, and goofed up. Check your delivery recipes so that none deliver to .../Maildir/, if you find any, adjust them deliver to .../Maildir/ instead. I'd suggest to: cd /home/matthew/Maildir/cur # move potential messages out to the proper new/... directory # if mv complains about nonexistent .../*, all the better! mv 'cur:2,ST/'* 'new/'* 'tmp:2,ST/'* ../new/ # get rid of the bogus directories rmdir '???:2,ST/' new cd - and see if that fixes the problem. If rmdir fails because there are hidden files, see what they are and where to move them, if the {cur,tmp}:2,ST or new are empty, fine, someone accidentally ran maildirmake with bogus arguments. HTH Matthias