Mark Zealey
2009-Feb-19 14:17 UTC
[Dovecot] Effects of going read-only on dovecot & pop/imap clients
Hi all, We need to set our filestore to read-only for quite a while, and I want to mitigate the effects for our clients. First issue; dovecot. If we just change the nfs mounts to read-only, dovecot complains: 2009-02-19T14:03:19+00:00 mail2 dovecot: pop3-login: Login: user=<test2 at markandruth.co.uk>, method=PLAIN, rip=10.15.10.95, lip=10.15.10.102:11002 2009-02-19T14:03:19+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): open() failed with file /var/spool/mail/supplier_2/ma/rk/an/markandruth.co.uk/te/st/2_/test2/Mai ldir/dovecot.index.log: Read-only file system 2009-02-19T14:03:19+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): open(/var/spool/mail/supplier_2/ma/rk/an/markandruth.co.uk/te/st/2_/test 2/Maildir/dovecot-uidlist.lock) failed: Read-only file system 2009-02-19T14:03:19+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): file_dotlock_create(/var/spool/mail/supplier_2/ma/rk/an/markandruth.co.u k/te/st/2_/test2/Maildir/dovecot-uidlist) failed: Read-only file system 2009-02-19T14:03:19+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2009-02-19 14:03:19] 2009-02-19T14:03:19+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): Mailbox init failed bytes=0/95, top=0/0, retr=0/0, del=0/0, size=0 Even when I use :INDEX=MEMORY, it's still complaining about creating .lock's or uidlist files and just issuing internal errors. Is there any way to make dovecot just do as much as it can under the circumstances ie allow read access to mails? Also, has anyone got experience of how clients handle mailboxes being read-only? My guess is that pop clients would probably break and download the same messages over and over? Thanks, Mark -- Mark Zealey -- Shared Hosting Team Leader Product Development * Webfusion 123-reg.co.uk, webfusion.co.uk, donhost.co.uk, supanames.co.uk This mail is subject to http://www.gxn.net/disclaimer
Timo Sirainen
2009-Feb-19 16:26 UTC
[Dovecot] Effects of going read-only on dovecot & pop/imap clients
On Thu, 2009-02-19 at 14:17 +0000, Mark Zealey wrote:> 2009-02-19T14:03:19+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): > open() failed with file > /var/spool/mail/supplier_2/ma/rk/an/markandruth.co.uk/te/st/2_/test2/Mai > ldir/dovecot.index.log: Read-only file system..> Even when I use :INDEX=MEMORY, it's still complaining about creating > .lock's or uidlist files and just issuing internal errors. Is there any > way to make dovecot just do as much as it can under the circumstances ie > allow read access to mails?Are you talking about only POP3 clients? I suppose in theory it should be possible, but it's such a special case that I'm not going to bother making Dovecot support that. Dovecot really wants to create dovecot-uidlist files. But I suppose you could just have it create them to some temp directories: mail_location = maildir:~/Maildir:CONTROL=/tmp/%u:INDEX=MEMORY And be sure to use: pop3_uidl_format = %f> Also, has anyone got experience of how clients handle mailboxes being > read-only? My guess is that pop clients would probably break and > download the same messages over and over?If client has configured to leave mail on server it should work, but if not it probably breaks. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090219/91635052/attachment-0002.bin>
Mark Zealey
2009-Feb-19 17:10 UTC
[Dovecot] Effects of going read-only on dovecot & pop/imap clients
> Are you talking about only POP3 clients? I suppose in theory it should > be possible, but it's such a special case that I'm not going to bother > making Dovecot support that. Dovecot really wants to create > dovecot-uidlist files. But I suppose you could just have it > create them > to some temp directories: > > mail_location = maildir:~/Maildir:CONTROL=/tmp/%u:INDEX=MEMORYBoth IMAP and pop3 - I got the same errors with imap, but thanks to the CONTROL= parameter that's fixed now. I get a weird error the first time I log in: 2009-02-19T16:48:14+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): Disconnected: Mailbox is in inconsistent state. bytes=0/56, top=0/0, retr=0/0, del=0/0, size=0 2009-02-19T16:48:14+00:00 mail2 dovecot: POP3(test2 at markandruth.co.uk): Couldn't init INBOX: Mailbox was deleted under us But second login is fine - must be something to do with the CONTROL param.> And be sure to use: > > pop3_uidl_format = %fOut of interest, why do we have to use that uidl format, or are you just saying we have to use some uidl format? We migrated from courier and so use "UID%u-%v".> > Also, has anyone got experience of how clients handle > mailboxes being > > read-only? My guess is that pop clients would probably break and > > download the same messages over and over? > > If client has configured to leave mail on server it should > work, but if > not it probably breaks.Hmm, weirdly enough (or perhaps not) dovecot looks successful if I delete the message (chmod -r): dele 1 +OK Marked to be deleted. quit +OK Logging out, messages deleted. Do you think IMAP clients would handle the read-only situation better? I can see that it correctly reports the mailbox as read-only if we chmod -r files, however if the filesystem itself is mounted read-only, dovecot reports the mailbox as being read-write (dovecot 1.1.6) Thanks, Mark
Seemingly Similar Threads
- Panic: IMAP: Trying to allocate 2273345672 bytes
- assertion failed: (seq >= t->first_new_seq && seq <= t->last_new_seq)
- Dovecot 1.1rc3 "Out of Memory" crashes from pop3-login?
- LDAP Filters as defined for dovecot UserDB and passDB
- Dovecot auto vacation with sieve doesn't work