On Thu, Oct 28, 2010 at 5:06 AM, Timo Sirainen <t...@iki.fi> wrote:
> On 28.10.2010, at 5.50, Kui Zhang wrote:
>
>> doveadm -Dv expunge -u u...@domain mailbox ".EXPUNGED/*" savedbefore 7d
> ..
>> doveadm(u...@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=791
>> doveadm(u...@domain): Info: expunge: box=INBOX/mon, uid=196,
>> msgid=<e1owjm4-0000j4...@domain>, size=1856
>>
>> So what is the diff between "Debug: expunge" and "Info: expunge".
>
> The "Debug: expunge" is written by doveadm, because you gave it a -D 
> parameter. It tells what messages it's about to expunge. The "Info: expunge" 
> is written by mail_log plugin when anything gets expunged.


Thanks for the info. So is info message showing the wrong mailbox or
is it deleting from the wrong mailbox?

I did specify mailbox ".EXPUNGED/*". Is the syntax wrong?

debug:
box=.EXPUNGED/INBOX/mon

info:
box=INBOX/mon


>
>> 1.A.
>> Would not it be faster not to enumerate for large mailboxes (30-40GB -
>> Maildir)? Is it possible to add a switch, to select single user
>> expunge behavior?
>> ref: http://www.mail-archive.com/dovecot@dovecot.org/msg32322.html
>
> I don't understand. The default is to expunge only a single user. And why do 
> you mention maildir if you're using mdbox? In any case the size of the 
> mailbox is rather irrelevant. Number of messages is more relevant.

Let me rephrase that. Some users are using maildir. and more than one
of such users with 30-40Gb of emails, approx 100-800k/message.  approx
85899345 messages. 20-50 mailboxes under each user. And messages get
deleted often.

When expunging, lazy expunged, messages from such mailboxes,
individually at separate time. Would not it be faster/safer reading
from expire database compare to enumerate everything?

I was hoping to setup a script to expunge, lazy expunged, messages
from each user, at diff intervals, based predetermined rate of delete.

>
>> 2.
>> Also. expunge does not appear to remove empty mailboxes, is this a bug
>> or intentional? If intentional, why? Any way to automated removal of
>> empty mailboxes?
>
> Well, for your situation when removing mails from .EXPUNGED/ it makes sense, 
> but for anything else it definitely shouldn't be automatically deleting any 
> mailboxes. Maybe there could be an option to do this, although it's a bit 
> problematic if doveadm expunge is being run at the same time as user is 
> expunging more messages. It shouldn't delete mailbox if new messages just got 
> added there. (And that probably isn't very easy to implement.)

thanks you.

Reply via email to