[Dovecot] doveadm purge output
Running "doveadm purge" with both -D and -v parms, and both -A and -u options, I don't see much in the way of output.
doveadm -v purge -u username just returns with no output doveadm -v purge -A returns no output for most users - for my own mailbox it yields "20 / 21"
-D returns the same, along with messages about skipping plugin modules.
Is this normal? I'm thinking not - since after deleting messages in the client, emptying the trash, compacting from the client, and then performing a purge - I see no difference in mailbox files.
Daniel
On Mon, 2010-11-22 at 21:54 -0800, Daniel L. Miller wrote:
Running "doveadm purge" with both -D and -v parms, and both -A and -u options, I don't see much in the way of output.
doveadm -v purge -u username just returns with no output doveadm -v purge -A returns no output for most users - for my own mailbox it yields "20 / 21"
-D returns the same, along with messages about skipping plugin modules.
Is this normal?
Yes. There's currently no verbosity.
I'm thinking not - since after deleting messages in the client, emptying the trash, compacting from the client, and then performing a purge - I see no difference in mailbox files.
See if this finds any messages with refcount=0:
doveadm dump ~/mdbox/storage/ | grep 'ref.*\b0\b'
On Tue, 23 Nov 2010 13:53:56 +0000, Timo Sirainen tss@iki.fi wrote:
On Mon, 2010-11-22 at 21:54 -0800, Daniel L. Miller wrote:
Running "doveadm purge" with both -D and -v parms, and both -A and -u options, I don't see much in the way of output.
doveadm -v purge -u username just returns with no output doveadm -v purge -A returns no output for most users - for my own mailbox it yields "20 / 21"
-D returns the same, along with messages about skipping plugin modules.
Is this normal?
Yes. There's currently no verbosity.
I'm thinking not - since after deleting messages in the client, emptying the trash, compacting from the client, and then performing a purge - I see no difference in mailbox files.
See if this finds any messages with refcount=0:
doveadm dump ~/mdbox/storage/ | grep 'ref.*\b0\b'
Yes it does.
-- Daniel
On Tue, 2010-11-23 at 07:35 -0800, dmiller@amfes.com wrote:
See if this finds any messages with refcount=0:
doveadm dump ~/mdbox/storage/ | grep 'ref.*\b0\b'
Yes it does.
Umm.. Well.. Make sure it prints the correct mdbox location:
doveadm -o mail_debug=yes -D -v purge -u username
On Tue, 2010-11-23 at 17:33 +0000, Timo Sirainen wrote:
On Tue, 2010-11-23 at 07:35 -0800, dmiller@amfes.com wrote:
See if this finds any messages with refcount=0:
doveadm dump ~/mdbox/storage/ | grep 'ref.*\b0\b'
Yes it does.
Umm.. Well.. Make sure it prints the correct mdbox location:
doveadm -o mail_debug=yes -D -v purge -u username
Also, do any other doveadm commands find mails? For example:
doveadm search all
On 11/23/2010 9:33 AM, Timo Sirainen wrote:
On Tue, 2010-11-23 at 07:35 -0800, dmiller@amfes.com wrote:
See if this finds any messages with refcount=0:
doveadm dump ~/mdbox/storage/ | grep 'ref.*\b0\b' Yes it does. Umm.. Well.. Make sure it prints the correct mdbox location:
doveadm -o mail_debug=yes -D -v purge -u username
username = assp-bayes
doveadm -o mail_debug=yes -D -v purge -u username@amfes.com
<trimmed off module messages> doveadm(username@amfes.com): Debug: auth input: username@amfes.com home=/var/mail/amfes.com/assp-bayes mail=mdbox:/var/mail/amfes.com/assp-bayes/mdbox uid=5000 gid=8 doveadm(username@amfes.com): Debug: Added userdb setting: mail=mdbox:/var/mail/amfes.com/assp-bayes/mdbox doveadm(username@amfes.com): Debug: Effective uid=5000, gid=8, home=/var/mail/amfes.com/assp-bayes doveadm(username@amfes.com): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=mdbox:/var/mail/amfes.com/assp-bayes/mdbox doveadm(username@amfes.com): Debug: fs: root=/var/mail/amfes.com/assp-bayes/mdbox, index=, control=, inbox= doveadm(username@amfes.com): Debug: Namespace : Using permissions from /var/mail/amfes.com/assp-bayes/mdbox: mode=0700 gid=-1
doveadm dump /var/mail/amfes.com/username/ | grep 'ref.*\b0\b' <several lines with>
- ext 3 ref : 0 (0000)
Now this is weird - last run an hour ago against a particular user had a bunch of entries - now I show none for that user (my spam cc user, which I deleted a quantity of mails out of to test this). And another user that didn't have any (my own) now shows a few.
Haven't tried running a purge again yet.
Daniel
On Tue, 2010-11-23 at 10:40 -0800, Daniel L. Miller wrote:
location=mdbox:/var/mail/amfes.com/assp-bayes/mdbox .. doveadm dump /var/mail/amfes.com/username/ | grep 'ref.*\b0\b'
Did you trim away too much from your doveadm command? :) For this user the path should have been /var/mail/amfes.com/assp-bayes/mdbox/storage
You don't have any *.lock files in the storage/ directory, right?
On 11/23/2010 10:59 AM, Timo Sirainen wrote:
On Tue, 2010-11-23 at 10:40 -0800, Daniel L. Miller wrote:
location=mdbox:/var/mail/amfes.com/assp-bayes/mdbox .. doveadm dump /var/mail/amfes.com/username/ | grep 'ref.*\b0\b' Did you trim away too much from your doveadm command? :) For this user the path should have been /var/mail/amfes.com/assp-bayes/mdbox/storage
You don't have any *.lock files in the storage/ directory, right?
Yes, sorry, too much email trimming. The /mdbox/storage was there.
No .lock files anywhere in the /var/mail tree.
-- Daniel
On 11/23/2010 12:35 PM, Daniel L. Miller wrote:
On 11/23/2010 10:59 AM, Timo Sirainen wrote:
On Tue, 2010-11-23 at 10:40 -0800, Daniel L. Miller wrote:
location=mdbox:/var/mail/amfes.com/assp-bayes/mdbox .. doveadm dump /var/mail/amfes.com/username/ | grep 'ref.*\b0\b'
Continuing testing. Examining the mail folder on disk using 'ls -alrt' reveals:
Delete a message from Inbox (moves to Trash). Only file that updates is 'dovecot.map.index.log' - and grows in size
Perform 'Empty Trash'. Again, only 'dovecot.map.index.log' updates - and grows in size
doveadm dump ... reveals - no output
So at the moment - I'm not losing mail, but I can't get rid of stuff I've deleted! Once it's in mdbox - it's there forever! :)
Daniel
On 11/23/2010 5:26 PM, Daniel L. Miller wrote:
On 11/23/2010 12:35 PM, Daniel L. Miller wrote:
On 11/23/2010 10:59 AM, Timo Sirainen wrote:
On Tue, 2010-11-23 at 10:40 -0800, Daniel L. Miller wrote:
location=mdbox:/var/mail/amfes.com/assp-bayes/mdbox .. doveadm dump /var/mail/amfes.com/username/ | grep 'ref.*\b0\b'
Continuing testing. Examining the mail folder on disk using 'ls -alrt' reveals:
Delete a message from Inbox (moves to Trash). Only file that updates is 'dovecot.map.index.log' - and grows in size
Perform 'Empty Trash'. Again, only 'dovecot.map.index.log' updates - and grows in size
doveadm dump ... reveals - no output
So at the moment - I'm not losing mail, but I can't get rid of stuff I've deleted! Once it's in mdbox - it's there forever! :)
Further testing - did I mention I'm using Thunderbird for my client?
Just for fun - I used a webmail client (Roundcube) to check - and I saw a whole bunch of deleted messages in...the Inbox!
Hmm...went back to Thunderbird, performed 'Compact' on the INBOX - not the Trash this time - saw significant changes in index files. Doveadm dump output now has results too! Tried doveadm purge - I still see no output from the -D parameter - but the mail store is compacted to a fraction of what it was. I don't know if -D or -v are supposed to provide much - but for me, I'm not seeing ANY (besides the skipped module messages).
So...doveadm purge works if the dumb user uses his dumber client properly (P.S. - might want to add a wiki note about this). Back to the original question - is 'doveadm -v/-D purge' supposed to have any significant output?
Daniel
On 24.11.2010, at 1.42, Daniel L. Miller wrote:
Hmm...went back to Thunderbird, performed 'Compact' on the INBOX - not the Trash this time - saw significant changes in index files. Doveadm dump output now has results too! Tried doveadm purge - I still see no output from the -D parameter - but the mail store is compacted to a fraction of what it was. I don't know if -D or -v are supposed to provide much - but for me, I'm not seeing ANY (besides the skipped module messages).
So...doveadm purge works if the dumb user uses his dumber client properly (P.S. - might want to add a wiki note about this).
Well, that works the same way with all mailbox formats. Nothing is deleted from disk until EXPUNGE command is issued for mails marked as \Deleted.
Back to the original question - is 'doveadm -v/-D purge' supposed to have any significant output?
Depends on the command. Purge doesn't currently have any.
participants (3)
-
Daniel L. Miller
-
dmiller@amfes.com
-
Timo Sirainen