> > But is there a way tell it all mailboxes for a user? For example, > something > > like: > > > > doveadm expunge -u user at domain mailbox ALL savedbefore 30d > > try: > doveadm expunge -u user at domain ALL savedbefore 30d > > just like the example thats here: > http://wiki2.dovecot.org/Tools/Doveadm/SearchQueryI already tried that. Did you? For me, expunge returns an error that says the mailbox must be listed. Also, that example is for search, not expunge. So, the original question remains: is there a way to specify all mailboxes for a user? Michael
On 12/29/2016 10:23 PM, Michael Fox wrote:>>> But is there a way tell it all mailboxes for a user? For example, >> something >>> like: >>> >>> doveadm expunge -u user at domain mailbox ALL savedbefore 30d >> >> try: >> doveadm expunge -u user at domain ALL savedbefore 30d >> >> just like the example thats here: >> http://wiki2.dovecot.org/Tools/Doveadm/SearchQuery > > I already tried that. Did you? > For me, expunge returns an error that says the mailbox must be listed. > Also, that example is for search, not expunge. > > So, the original question remains: is there a way to specify all mailboxes > for a user?doveadm expunge -u <user> mailbox '*' savedbefore 30d Are you sure you really want to do this? My server expunges Trash and Junk on a cycle, but reaching into other mailboxes seems iffy.
> doveadm expunge -u <user> mailbox '*' savedbefore 30dThat doesn't work for me either. The command is accepted, but the messages are not expunged. I guess my search/fetch will just have to return the mailbox name, in addition to other fields, and then I'll need to loop through the mailbox names and perform multiple expunges for each user. I understand the desire to avoid accidents by requiring that the mailbox be specified. But if "mailbox ALL" or "mailbox '*' were allowed, that would still avoid the accident and yet also avoid the inefficiency of having to perform multiple expunges for one user. *** Enhancement request: provide a "mailbox all" or "mailbox '*'" option for doveadm search_query so that expunge can be used to remove mail without regard to which mailbox it's in.> Are you sure you really want to do this? My server expunges Trash and > Junk on a cycle, but reaching into other mailboxes seems iffy.Yes. I understand it's unusual. This is an RF (radio) application for emergency services. We have to be efficient about channel utilization. Users know they need to keep their mailboxes clean so that, at the start of an emergency (or other incident), the channel is not clogged with downloading lots of old, irrelevant mail. If they haven't logged in for a while, we'll keep it clear for them. Michael