Re: [Dovecot] IMAP activity after disconnect

2009-09-06 Thread Timo Sirainen
On Sat, 2009-08-29 at 01:57 -0400, Charles Sprickman wrote:
 [r...@nac /var/vmail/xxx.com/spork/Maildir/.Spam]# ls new/| wc 
 -l
 70501
 
 Mail.app valiantly tried to sync this, but when I realized just how huge 
 this was, I took the account offline and quit the app.  However it seems 
 like Dovecot is still busy doing something in that mailbox:

It's most likely busy moving all the messages from new/ to cur/. You
could have checked that with strace.

 My guess is it's trying to build an index.  This process is chewing up 
 100% of whatever cpu it lands on.  Is this expected behavior (not the huge 
 cpu usage, but the imap server continuing to work on the box after the 
 client has logged out)?

Yes. These kind of long-running tasks are very rare, so I haven't
bothered adding any is client still there? checks to the code.

 Are there any config settings I've missed to sort of put a cap on how much 
 cpu/time dovecot will spend on a task like this?

Nope.


signature.asc
Description: This is a digitally signed message part


[Dovecot] IMAP activity after disconnect

2009-08-28 Thread Charles Sprickman

Howdy,

I'm running Dovecot 1.1.16 on a staging server to do some testing before 
building a new server and moving a bunch of qmail/vpopmail/courier 
accounts over.


I wanted to test the migration of courier accounts to dovecot with a few 
clients, so I copied over a few large accounts.  All went well with a 
small account (100+ messages) when accessing the account via POP - no 
re-downloads after adjusting the uidl format.  IMAP looks good as well 
after running the conversion script and setting the namespace properly.


However, one thing I copied over without paying much attention was a 
non-quota'd spam box that has literally not been checked in at least a 
year:


[r...@nac /var/vmail/xxx.com/spork/Maildir/.Spam]# ls new/| wc 
-l

   70501

Mail.app valiantly tried to sync this, but when I realized just how huge 
this was, I took the account offline and quit the app.  However it seems 
like Dovecot is still busy doing something in that mailbox:


lsof: no pwd entry for UID 5000
imap27515 50007uW   VREG   0,95 3372  2968764 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/dovecot.index.log

lsof: no pwd entry for UID 5000
imap27515 50008uVREG   0,95  488  3007349 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/dovecot.index

lsof: no pwd entry for UID 5000
imap27515 50009uVREG   0,9525195 27064933 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/dovecot-uidlist

lsof: no pwd entry for UID 5000
imap27515 5000   10rVDIR   0,95 15171072  2968758 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/new


My guess is it's trying to build an index.  This process is chewing up 
100% of whatever cpu it lands on.  Is this expected behavior (not the huge 
cpu usage, but the imap server continuing to work on the box after the 
client has logged out)?


Are there any config settings I've missed to sort of put a cap on how much 
cpu/time dovecot will spend on a task like this?  So far this has been 
running for about 20 minutes.  I'm going to kill it and manually delete 
the spam since I'm not familiar enough with gdb to dig in and see just 
what it's doing (although my guess is indexing).


On the upside, I have some serious spam magnet addresses in this test 
domain, so now I've got a great platform to test my amavis/postfix/policy 
skills. :)


Thanks,

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344