how to search expunged messages

Marc Marc at f1-outsourcing.eu
Tue Mar 16 13:47:53 EET 2021


If messages are expunged,

- is the \Deleted flag cleared?
- is there still information registered in what folder/mailbox the message was?

I thought about searching like this,

doveadm -o namespace/inbox/location=mdbox_deleted:/home/popusers/testtest/mdbox -o mail_location=mdbox_deleted:/home/popusers/testtest/mdbox:INDEX=/home/popindex/testtest/index search -u testtest mailbox '*' DELETED

but also does not do anything.

Maybe related to the older 2.2? Using dovecot-2.2.36-8.el7.x86_64


> -----Original Message-----
> Sent: 16 March 2021 10:54
> To: Marc <Marc at f1-outsourcing.eu>; dovecot at dovecot.org
> Subject: Re: how to search expunged messages
> 
> >
> >
> > Is there an equivalent for expunged messages of this:
> >
> > doveadm search -u testtest mailbox '*' DELETED
> 
> DELETED = "Message has flag \Deleted"
> 
> So no. If the message is actually expunged, and you have not ran
> `doveadm purge`, it should be found under the mdbox_deleted driver.
> 
> I am not sure what you are doing wrong.
> 
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm save -u testuser
> Subject: first
> 
> first
> .
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm mailbox status -u
> testuser "messages vsize" INBOX
> INBOX messages=1 vsize=28
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm expunge -u testuser
> subject "first" mailbox INBOX
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm mailbox status -u
> testuser "messages vsize" INBOX
> INBOX messages=0 vsize=0
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm -o
> mail_location=mdbox_deleted:/home/vmail/testuser/Mail mailbox status -u
> testuser "messages vsize" INBOX
> INBOX messages=1 vsize=28
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm purge -u testuser
> buildbot at 093c9b8e58bb:/buildslave$ sudo doveadm -o
> mail_location=mdbox_deleted:/home/vmail/testuser/Mail mailbox status -u
> testuser "messages vsize" INBOX
> INBOX messages=0 vsize=0
> buildbot at 093c9b8e58bb:/buildslave$
> 
> Aki


More information about the dovecot mailing list