Re: dovecot Apple Mail maildir lots of Mail

2014-12-11 Thread Thomas Klausner
On Fri, Nov 21, 2014 at 10:52:38PM +0100, Thomas Klausner wrote:
 I have dovecot 2.1.12 running on a mail server, and recently
 configured Apple Mail to connect to it using secure IMAP, for the
 first time.
 
 At the beginning it just showed the inbox and everything was fine, but
 then I wanted to look at some of my folders and found the 'subscribe'
 menu. When I opened it, Apple Mail went to discover what mailboxes
 there are, and that's where my trouble began.
 
 It seemed to make good progress for some time (though slow -- over
 days), and now lists the mailboxes from starting with letters a to d
 on the left hand side (filling all the visible space, so there might
 be more). However, whenever Apple Mail gets focus, the cursor becomes
 a spinning rainbow circle and I can't interact with it.
 
 I tried deleting the mail account and setting it up again. The inbox
 was shown again immediately and Apple Mail was usable, but the first
 time the cursor moved over the mailboxes on the left hand side, it
 froze again.
 
 There were two imap processes on the server, one rather idle, the
 other eating CPU for about two minutes, then idling, and some time
 later it disappeared too.
 
 My Mail directory is 31G with about 180 directories, each containing
 mails in maildir format.
 
 Has anyone had similar issues?
 
 Is my maildir too big for dovecot too handle?
 
 How can I debug this?

I finally found out what the problem was.

My mail is in the folder $HOME/Mail. For that reason, dovecot
assumed I must be using mboxes (even though it only contains
maildirs), and handled each mail = maildir file as a separate mbox.

I've renamed $HOME/Mail to $HOME/Maildir and configured procmail
and mutt to look there, and now it works fine even with Apple Mail.
 Thomas


Re: dovecot.index.log files: what are they?

2014-12-11 Thread Thomas Klausner
On Wed, Dec 10, 2014 at 09:19:11PM +0100, Thomas Klausner wrote:
 Hi!
 
 I have lots of these files:
 
 /home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log
 
 What are they for?
 Why are they here?
 Can I remove them?

This was a by-product of dovecot thinking that I had mbox mailboxes,
while they were maildir mailboxes. So dovecot created one of these
_for every single mail_, which is why I had so many of them.
 Thomas


dovecot.index.log files: what are they?

2014-12-10 Thread Thomas Klausner
Hi!

I have lots of these files:

/home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log

What are they for?
Why are they here?
Can I remove them?

 Thomas


Re: dovecot.index.log files: what are they?

2014-12-10 Thread Thomas Klausner
On Wed, Dec 10, 2014 at 09:26:31PM +0100, Reindl Harald wrote:
 
 Am 10.12.2014 um 21:19 schrieb Thomas Klausner:
 I have lots of these files:
 
 /home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log
 
 What are they for?
 Why are they here?
 Can I remove them?
 
 RTFM: http://wiki2.dovecot.org/IndexFiles

Thanks, but I had read this.

I still don't know what they are good for, why they stay there for
days and if I can remove them. After all, they are not the caches, but
some transaction logs (I don't know what this is).
 Thomas


Re: dovecot Apple Mail maildir lots of Mail

2014-12-07 Thread Thomas Klausner
On Fri, Nov 21, 2014 at 10:52:38PM +0100, Thomas Klausner wrote:
 I have dovecot 2.1.12 running on a mail server, and recently
 configured Apple Mail to connect to it using secure IMAP, for the
 first time.
 
 At the beginning it just showed the inbox and everything was fine, but
 then I wanted to look at some of my folders and found the 'subscribe'
 menu. When I opened it, Apple Mail went to discover what mailboxes
 there are, and that's where my trouble began.
 
 It seemed to make good progress for some time (though slow -- over
 days), and now lists the mailboxes from starting with letters a to d
 on the left hand side (filling all the visible space, so there might
 be more). However, whenever Apple Mail gets focus, the cursor becomes
 a spinning rainbow circle and I can't interact with it.
 
 I tried deleting the mail account and setting it up again. The inbox
 was shown again immediately and Apple Mail was usable, but the first
 time the cursor moved over the mailboxes on the left hand side, it
 froze again.
 
 There were two imap processes on the server, one rather idle, the
 other eating CPU for about two minutes, then idling, and some time
 later it disappeared too.
 
 My Mail directory is 31G with about 180 directories, each containing
 mails in maildir format.

One thing that happened twice now is that files like these appear:
/home/user/Mail/dir/cur/.imap/1312388125.11233_28123.host:2,S/dovecot.index.log
but they don't go away for days.

How can that happen?
Can/should I delete these files?
 Thomas


dovecot Apple Mail maildir lots of Mail

2014-11-21 Thread Thomas Klausner
Hi!

I have dovecot 2.1.12 running on a mail server, and recently
configured Apple Mail to connect to it using secure IMAP, for the
first time.

At the beginning it just showed the inbox and everything was fine, but
then I wanted to look at some of my folders and found the 'subscribe'
menu. When I opened it, Apple Mail went to discover what mailboxes
there are, and that's where my trouble began.

It seemed to make good progress for some time (though slow -- over
days), and now lists the mailboxes from starting with letters a to d
on the left hand side (filling all the visible space, so there might
be more). However, whenever Apple Mail gets focus, the cursor becomes
a spinning rainbow circle and I can't interact with it.

I tried deleting the mail account and setting it up again. The inbox
was shown again immediately and Apple Mail was usable, but the first
time the cursor moved over the mailboxes on the left hand side, it
froze again.

There were two imap processes on the server, one rather idle, the
other eating CPU for about two minutes, then idling, and some time
later it disappeared too.

My Mail directory is 31G with about 180 directories, each containing
mails in maildir format.

Has anyone had similar issues?

Is my maildir too big for dovecot too handle?

How can I debug this?

Thanks,
 Thomas


Re: fixes for quota support on NetBSD

2014-10-20 Thread Thomas Klausner
This patch still applies cleanly against 2.2.14, and is still needed.
 Thomas

On Fri, Oct 10, 2014 at 05:07:38PM +0200, Thomas Klausner wrote:
 Hi!
 
 dovecot-2.2.13 already has quota support for NetBSD, but it's buggy.
 The attached patches by Manuel Bouyer bou...@netbsd.org fix the
 issues.
 
 There is one thing that's not nice in them: one include is now for
 /usr/include/quota.h since dovecot comes with its own file quota.h
 which is earlier in the search path. Perhaps dovecot's copy can be
 renamed to dovecot-quota.h or to some other non-conflicting name?
 
 Cheers,
  Thomas

 $NetBSD: patch-src_plugins_quota_quota-fs.c,v 1.4 2013/08/05 23:12:42 bouyer 
 Exp $
 
 fix support for NetBSD's libquota
 
 --- src/plugins/quota/quota-fs.c.orig 2013-02-26 09:42:04.0 +0100
 +++ src/plugins/quota/quota-fs.c  2013-08-06 01:00:32.0 +0200
 @@ -672,34 +672,38 @@
  {
   struct quotakey qk;
   struct quotaval qv;
 + struct quotahandle *qh;
 + int ret;
  
 - if (root-qh == NULL) {
 - if ((root-qh = quota_open(root-mount-mount_path)) == NULL) {
 - i_error(cannot open quota for %s: %m,
 - root-mount-mount_path);
 - fs_quota_root_disable(root, group);
 - return 0;
 - }
 - } 
 + if ((qh = quota_open(root-mount-mount_path)) == NULL) {
 + i_error(cannot open quota for %s: %m,
 + root-mount-mount_path);
 + fs_quota_root_disable(root, group);
 + return 0;
 + }
  
   qk.qk_idtype = group ? QUOTA_IDTYPE_GROUP : QUOTA_IDTYPE_USER;
   qk.qk_id = group ? root-gid : root-uid;
   qk.qk_objtype = bytes ? QUOTA_OBJTYPE_BLOCKS : QUOTA_OBJTYPE_FILES;
  
 - if (quota_get(root-qh, qk, qv) != 0) {
 + if (quota_get(qh, qk, qv) != 0) {
   if (errno == ESRCH) {
   fs_quota_root_disable(root, group);
   return 0;
   }
   i_error(quotactl(Q_GETQUOTA, %s) failed: %m,
   root-mount-mount_path);
 - return -1;
 + ret = -1;
 + goto end;
   }
  
   *value_r = qv.qv_usage * DEV_BSIZE;
   *limit_r = qv.qv_softlimit * DEV_BSIZE;
  
 - return 1;
 + ret = 1;
 +end:
 + quota_close(qh);
 + return ret;
  }
  #endif
  

 $NetBSD: patch-src_plugins_quota_quota-fs.h,v 1.4 2013/08/05 23:12:42 bouyer 
 Exp $
 
 fix support for NetBSD's libquota
 
 --- src/plugins/quota/quota-fs.h.orig 2013-08-06 00:53:34.0 +0200
 +++ src/plugins/quota/quota-fs.h  2013-08-06 00:54:29.0 +0200
 @@ -7,7 +7,8 @@
  #endif
  
  #ifdef HAVE_QUOTA_OPEN
 -#  include quota.h /* NetBSD with libquota */
 +/* absolute path to avoid confusion with ./quota.h */
 +#  include /usr/include/quota.h /* NetBSD with libquota */
  #endif
  
  #ifdef HAVE_SYS_QUOTA_H


fixes for quota support on NetBSD

2014-10-10 Thread Thomas Klausner
Hi!

dovecot-2.2.13 already has quota support for NetBSD, but it's buggy.
The attached patches by Manuel Bouyer bou...@netbsd.org fix the
issues.

There is one thing that's not nice in them: one include is now for
/usr/include/quota.h since dovecot comes with its own file quota.h
which is earlier in the search path. Perhaps dovecot's copy can be
renamed to dovecot-quota.h or to some other non-conflicting name?

Cheers,
 Thomas
$NetBSD: patch-src_plugins_quota_quota-fs.c,v 1.4 2013/08/05 23:12:42 bouyer 
Exp $

fix support for NetBSD's libquota

--- src/plugins/quota/quota-fs.c.orig   2013-02-26 09:42:04.0 +0100
+++ src/plugins/quota/quota-fs.c2013-08-06 01:00:32.0 +0200
@@ -672,34 +672,38 @@
 {
struct quotakey qk;
struct quotaval qv;
+   struct quotahandle *qh;
+   int ret;
 
-   if (root-qh == NULL) {
-   if ((root-qh = quota_open(root-mount-mount_path)) == NULL) {
-   i_error(cannot open quota for %s: %m,
-   root-mount-mount_path);
-   fs_quota_root_disable(root, group);
-   return 0;
-   }
-   } 
+   if ((qh = quota_open(root-mount-mount_path)) == NULL) {
+   i_error(cannot open quota for %s: %m,
+   root-mount-mount_path);
+   fs_quota_root_disable(root, group);
+   return 0;
+   }
 
qk.qk_idtype = group ? QUOTA_IDTYPE_GROUP : QUOTA_IDTYPE_USER;
qk.qk_id = group ? root-gid : root-uid;
qk.qk_objtype = bytes ? QUOTA_OBJTYPE_BLOCKS : QUOTA_OBJTYPE_FILES;
 
-   if (quota_get(root-qh, qk, qv) != 0) {
+   if (quota_get(qh, qk, qv) != 0) {
if (errno == ESRCH) {
fs_quota_root_disable(root, group);
return 0;
}
i_error(quotactl(Q_GETQUOTA, %s) failed: %m,
root-mount-mount_path);
-   return -1;
+   ret = -1;
+   goto end;
}
 
*value_r = qv.qv_usage * DEV_BSIZE;
*limit_r = qv.qv_softlimit * DEV_BSIZE;
 
-   return 1;
+   ret = 1;
+end:
+   quota_close(qh);
+   return ret;
 }
 #endif
 
$NetBSD: patch-src_plugins_quota_quota-fs.h,v 1.4 2013/08/05 23:12:42 bouyer 
Exp $

fix support for NetBSD's libquota

--- src/plugins/quota/quota-fs.h.orig   2013-08-06 00:53:34.0 +0200
+++ src/plugins/quota/quota-fs.h2013-08-06 00:54:29.0 +0200
@@ -7,7 +7,8 @@
 #endif
 
 #ifdef HAVE_QUOTA_OPEN
-#  include quota.h /* NetBSD with libquota */
+/* absolute path to avoid confusion with ./quota.h */
+#  include /usr/include/quota.h /* NetBSD with libquota */
 #endif
 
 #ifdef HAVE_SYS_QUOTA_H