Re: [Dovecot] Dot Lock timestmap, users disconnections from roundcube
This could be the problem. Double check the time also on your host system(s), not only on guest. Bye, gc Il 03/11/2011 11.30, Maria Arrea ha scritto: We use ntpd daemon, all our systems are configured equal. Another thing, this is VM on vmware vsphere 4.1 Regards Maria - Original Message - From: Ed W Sent: 11/03/11 11:25 AM To: dovecot@dovecot.org Subject: Re: [Dovecot] Dot Lock timestmap, users disconnections from roundcube Hi We are running dovecot 2.0.13 with mdbox+zlib on RHEL 5.7 x64, ext4. We use NTP. Quick check, but by NTP you mean the background daemon and you don't have some cron job running ntpdate or similar every so often? No idea, but since it looks like a clock related curiousity, then knowing if the clock is spot on accurate or drifting would be interesting to know? Simple comparison against other machines over a similar period to you having problems might be accurate enough? Good luck Ed W -- Giulio Casella giulio at dsi.unimi.it System and network manager Computer Science Dept. - University of Milano
Re: [Dovecot] BestPractice to migrate imap mailbox from one machine to another
Have you tried dsync (part of dovecot)? I don't know if it works for migration to a different (major) version of dovecot, but it's a nice tool. And it works also over ssh. Giulio Hope this helps. Il 09/09/2011 15.34, Tobias Hachmer ha scritto: On Fri, 09 Sep 2011 15:22:54 +0200, Robert Schetterer wrote: Am 09.09.2011 15:14, schrieb Tobias Hachmer: What is the best way to copy the existing mailboxes from the older machine running dovecot v1.2.15 to the new naked machine? i used imapsync in a bash script http://ks.lamiral.info/imapsync/ at a massive migration ok, but this tool is not free of charge. Are there any known problems just copying the mailboxes with scp or rsync? Tobias -- Giulio Casella giulio at dsi.unimi.it System and network manager Computer Science Dept. - University of Milano
Re: [Dovecot] BestPractice to migrate imap mailbox from one machine to another
This is working for me: root@oldserver # dsync -v -D -u $user backup ssh newserver dsync -u $user where $user is a username. oldserver and newserver can also have different mailbox format (in my case was mbox - maildir) Regards, gc Messaggio originale Oggetto: Re: [Dovecot] BestPractice to migrate imap mailbox from one machine to another Data: Fri, 09 Sep 2011 15:50:49 +0200 Mittente: Tobias Hachmer tob...@hachmer.de A: dovecot@dovecot.org On Fri, 09 Sep 2011 15:42:57 +0200, Giulio Casella wrote: Have you tried dsync (part of dovecot)? I don't know if it works for migration to a different (major) version of dovecot, but it's a nice tool. And it works also over ssh. Yeah, I read the sections in the dovecot v2 wiki, but I don't get how to use for migration. As far as I understood it's to keep several dovecot server at a unique data bank. An well, can I use it between dovecot v1.2 and v2? Tobias -- Giulio Casella giulio at dsi.unimi.it System and network manager Computer Science Dept. - University of Milano
[Dovecot] dsync and compressed folders
I'm trying to migrate my old dovecot server (mbox based) to a new one (maildir based), both are version 2.0.13. I'm using dsync: oldserver# dsync -u username backup ssh root@newserver dsync -u username Everything is working like a charm but when it tries to convert compressed folder I got an error: dsync-local(username): Error: Failed to sync mailbox OldMails/2008.gz: Mailbox isn't a valid mbox file. Both old and new installations support compressed folder via zlib plugin. If I'm not wrong dsync doesn't support compressed folder, does it? And, if so, are there any chances to have dsync support gzip'ed folders in the (near) future? Many thanks in advance, gc -- Giulio Casella giulio at dsi.unimi.it System and network manager Computer Science Dept. - University of Milano
[Dovecot] compressed folder bug
I found a strange behaviour in dovecot compressed folder, maybe a bug. It happens only if you have one (and just one!) email in a gz compressed folder. I'm talking about a mbox server. Step to reproduce: - create a new folder, using any client (I think this step is not important, it happens also if tou create this folder server-side). - copy one message (any message) into newly created folder (using your favourite drag-n-drop gesture, saving in that folder using you character client (mutt,...), etc.) - if your client automatically subscribe to newly created folders, unsubscribe from it - On your server gzip newfolder - On your client subscribe newfolder.gz - Try to access you newfolder This is what I get in logfiles: Jul 11 14:08:08 myhostname dovecot: imap(giulio): Error: Next message unexpectedly lost from mbox file /home/giulio/Mail/testfolder.gz at 9082 (cached) Jul 11 14:08:08 myhostname dovecot: imap(giulio): Error: read(/home/giulio/Mail/testfolder.gz) failed: Invalid argument (uid=1) Jul 11 14:08:08 myhostname dovecot: imap(giulio): Disconnected: Internal error occurred. Refer to server log for more information. [2011-07-11 14:08:08] bytes=2045/23657 The funniest thing is that if I have a folder with more than one message it works like a charm. Some info about me: - dovecot version 2.0.13 - gentoo linux, with kernel 2.6.38-gentoo-r6 - system running on a VMWare virtual machine (32bit) - reiserfs filesystem my dovecot -n output: # 2.0.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.38-gentoo-r6 i686 Gentoo Base System release 2.0.2 auth_mechanisms = plain login disable_plaintext_auth = no listen = * mail_gid = mail mail_location = mbox:~/Mail:INBOX=/var/mail/%u:INDEX=~/ mail_privileged_group = mail 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 passdb { args = * driver = pam } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } service imap-login { inet_listener imap { address = imap.mydomain.it } inet_listener imaps { address = imap.mydomain.it } } service pop3-login { inet_listener pop3 { address = pop.mydomain.it } inet_listener pop3s { address = pop.mydomain.it } } ssl_cert = /etc/ssl/dovecot/server.pem ssl_key = /etc/ssl/dovecot/server.key syslog_facility = local6 userdb { driver = passwd } protocol lda { mail_plugins = sieve } protocol imap { mail_plugins = zlib plugin { zlib_save = gz zlib_save_level = 6 } } local imap.dsi.unimi.it { disable_plaintext_auth = no } local pop.dsi.unimi.it { disable_plaintext_auth = no } local imap.dsi.unimi.it { protocol imap { ssl_cert = /etc/pki/CA/certs/imap.mydomain.it.pem ssl_key = /etc/pki/CA/certs/imap.mydomain.it.key } } local pop.dsi.unimi.it { protocol pop3 { pop3_uidl_format = %08Xv%08Xu ssl_cert = /etc/pki/CA/certs/pop.mydomain.it.pem ssl_key = /etc/pki/CA/certs/pop.mydomain.it.key } } Any ideas? TIA, gc -- Giulio Casella giulio at dsi.unimi.it System and network manager Computer Science Dept. - University of Milano
Re: [Dovecot] Dovecot NFS locking issue
Look at mbox_read_locks and mbox_write_locks parameters. From http://wiki2.dovecot.org/MailboxFormat/mbox: There are at least four different ways to lock a mbox: • dotlock: mailboxname.lock file created by almost all software when writing to mboxes. This grants the writer an exclusive lock over the mbox, so it's usually not used while reading the mbox so that other processes can also read it at the same time. So while using a dotlock typically prevents actual mailbox corruption, it doesn't protect against read errors if mailbox is modified while a process is reading. • flock: flock() system call is quite commonly used for both read and write locking. The read lock allows multiple processes to obtain a read lock for the mbox, so it works well for reading as well. The one downside to it is that it doesn't work if mailboxes are stored in NFS. • fcntl: Very similar to flock, also commonly used by software. In some systems this fcntl() system call is compatible with flock(), but in other systems it's not, so you shouldn't rely on it. fcntl works with NFS if you're using lockd daemon in both NFS server and client. • lockf: POSIX lockf() locking. Because it allows creating only exclusive locks, it's somewhat useless so Dovecot doesn't support it. With Linux lockf() is internally compatible with fcntl() locks, but again you shouldn't rely on this. but: - lockf is unsupported by dovecot - flock doesn't work over NFS - fcntl works over NFS only if lockd is running on both sides (useful only if you can setup lockd on your storage appliance) - dotlock is not so performing, and sometimes could give read errors, but should work (and protect you from mailbox corruption) Anyway take a look also to maildir format (almost entirely lockless). Hope this helps. Bye, gc Il 11/07/2011 15.56, satish patel ha scritto: Anyone ? From: satish...@hotmail.com To: dovecot@dovecot.org Date: Fri, 8 Jul 2011 17:08:40 + Subject: [Dovecot] Dovecot NFS locking issue Hi All, We had 15 imap/pop UW-imap servers behind load balancer and mail storage was NFS for almost around ~30,000 users on it. Currently we migrate UW-imap to dovecot with fcntl NFS locking. After migration on dovecot it started error related locking see following error Error: fcntl() failed with mbox file /home/w/a/wahmed/.inbox: No locks available Error: fcntl() failed with mbox file /home/e/d/edurand/.inbox: No locks available Look like my NFS locking getting overload or something its (netapps NFS server) what you suggest to fix this issue ? how uw-imap was working with NFS before ? Appreciate your help. -S -- Giulio Casella giulio at dsi.unimi.it System and network manager Computer Science Dept. - University of Milano