another try listing expunged mail, now only tested with dovecot cli

Marc Marc at f1-outsourcing.eu
Tue Mar 16 11:41:41 EET 2021


Good morning ;) According to this test, this command should list expunged messages on folders test1, test2 and test3 not?

[@ testtest]# doveadm -o mail_location=mdbox_deleted:/home/popusers/testtest/mdbox:INDEX=/home/popindex/testtest/index mailbox status -u testtest 'messages vsize' '*'
 Sent messages=0 vsize=0
 Drafts messages=0 vsize=0
 INBOX/test2 messages=0 vsize=0
 Junk messages=0 vsize=0
 Trash messages=0 vsize=0
 test3 messages=0 vsize=0
 test1 messages=0 vsize=0
 INBOX messages=0 vsize=0




> -----Original Message-----
> From: dovecot <dovecot-bounces at dovecot.org> On Behalf Of Marc
> Sent: 15 March 2021 22:40
> To: dovecot at dovecot.org; Aki Tuomi <aki.tuomi at open-xchange.com>
> Subject: another try listing expunged mail, now only tested with dovecot
> cli
> 
> testing with expunging messages with subject "delete me"
> 
> this is the correct commend to list expunged messages?
> 
> [@ testtest]# doveadm -o
> mail_location=mdbox_deleted:/home/popusers/testtest/mdbox:INDEX=/home/po
> pindex/testtest/index mailbox status -u testtest 'messages vsize' '*'
> Sent messages=0 vsize=0
> Drafts messages=0 vsize=0
> INBOX/test2 messages=0 vsize=0
> Junk messages=0 vsize=0
> Trash messages=0 vsize=0
> test3 messages=0 vsize=0
> test1 messages=0 vsize=0
> INBOX messages=0 vsize=0
> 
> 
> We have a few messages with subject 'delete me' in the inbox namespace
> 
> [@ ~]# doveadm search -u testtest mailbox test1 subject 'delete me' | wc
> -l
> 4
> [@ ~]# doveadm search -u testtest mailbox INBOX/test2 subject 'delete
> me' | wc -l
> 2
> [@ ~]# doveadm search -u testtest mailbox test3 subject 'delete me' | wc
> -l
> 8
> 
> 
> Disk space used
> 
> [@ testtest]# du -s -k /home/popusers/testtest/mdbox/storage/
> 135356  /home/popusers/testtest/mdbox/storage/
> 
> Ok lets expunge some emails
> 
> [@ testtest]# doveadm expunge -u testtest mailbox test1 subject 'delete
> me'
> doveadm(testtest): Info: expunge: box=test1,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test1,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test1,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test1,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> 
> [@ testtest]# doveadm expunge -u testtest mailbox INBOX/test2 subject
> 'delete me'
> doveadm(testtest): Info: expunge: box=INBOX/test2,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=INBOX/test2,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> 
> [@ testtest]# doveadm expunge -u testtest mailbox test3 subject 'delete
> me'
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> doveadm(testtest): Info: expunge: box=test3,
> msgid=<202011052050.0A5Ko7Jc005461 at web01.xxxxxx.xxxx>
> 
> Looks like the correct amount of messages are deleted
> 
> [@ testtest]# du -s -k /home/popusers/testtest/mdbox/storage/
> 135356  /home/popusers/testtest/mdbox/storage/
> 
> Lets check the expunged mail, again still everywhere 0
> 
> [@ testtest]# doveadm -o
> mail_location=mdbox_deleted:/home/popusers/testtest/mdbox:INDEX=/home/po
> pindex/testtest/index mailbox status -u testtest 'messages vsize' '*'
> Sent messages=0 vsize=0
> Drafts messages=0 vsize=0
> INBOX/test2 messages=0 vsize=0
> Junk messages=0 vsize=0
> Trash messages=0 vsize=0
> test3 messages=0 vsize=0
> test1 messages=0 vsize=0
> INBOX messages=0 vsize=0
> 
> 
> This does not return any messages, so they were expunged.
> 
> [@ testtest]# doveadm search -u testtest  mailbox test3 subject 'delete
> me'
> 
> How can I get the amount of messages expunged in the folders? I do not
> get it.
> 
> 
> 



More information about the dovecot mailing list