[Dovecot] Doveadm-Expunge v2.0.5
Hello
Few questions regarding Doveadm-Expunge.
I have lazy expunge configure with this name space: .EXPUNGED
Storage type: mdbox
doveadm -Dv expunge -u user@domain mailbox ".EXPUNGED/*" savedbefore 7d
I get some interesting outputs.
doveadm(user@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=791 doveadm(user@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=792 doveadm(user@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=793 .... doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=196, msgid=E1OwJm4-0000j4-1l@domain, size=1856 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=197, msgid=E1OwJmP-0000pr-4M@domain, size=1756 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=198, msgid=E1OwJpP-0002Hp-Pu@domain, size=1810 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=199, msgid=E1OwJqw-0002y7-AF@domain, size=1766 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=200, msgid=E1OwJud-0004ba-Fe@domain, size=1890 ...
So what is the diff between "Debug: expunge" and "Info: expunge". Anything done to "Info: expunge"? I am assuming the "debug: expunge" are the only entries with actions. And "Info: expunge" is not doing anything. I ran doveadm purge -u user@domain after. I did not notice any missing emails. Sorry for the trivial question, I just want to make sure not mail would disappear, all of sudden.
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
- 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?
Thank you KuiZ
On 28.10.2010, at 5.50, Kui Zhang wrote:
doveadm -Dv expunge -u user@domain mailbox ".EXPUNGED/*" savedbefore 7d .. doveadm(user@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=791 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=196, msgid=E1OwJm4-0000j4-1l@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.
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.
- 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.)
On Thu, Oct 28, 2010 at 5:06 AM, Timo Sirainen tss@iki.fi wrote:
On 28.10.2010, at 5.50, Kui Zhang wrote:
doveadm -Dv expunge -u user@domain mailbox ".EXPUNGED/*" savedbefore 7d .. doveadm(user@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=791 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=196, msgid=E1OwJm4-0000j4-1l@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.
- 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.
On Thu, 2010-10-28 at 21:33 -0700, Kui Zhang wrote:
doveadm(user@domain): Debug: expunge: box=.EXPUNGED/INBOX/mon uid=791 doveadm(user@domain): Info: expunge: box=INBOX/mon, uid=196,
Thanks for the info. So is info message showing the wrong mailbox or is it deleting from the wrong mailbox?
Oh, that's a bug in mail-log plugin. Fixed: http://hg.dovecot.org/dovecot-2.0/rev/4ee632794f0b
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?
Currently the expire database is used to only filter out users who don't have anything to expunge. Some day in future it will filter out also mailboxes that don't have anything. So if your total number of mailboxes isn't very high, it's not very helpful.
But, now that you mentioned it, doing a "savedbefore 7d" search would go through all the messages from the beginning of the mailbox rather than from the end or doing a binary search. Maybe that should be optimized..
I was hoping to setup a script to expunge, lazy expunged, messages from each user, at diff intervals, based predetermined rate of delete.
If you just call doveadm expunge separately for each user, that would work.
participants (2)
-
Kui Zhang
-
Timo Sirainen