doveadm expunge is deleting other accounts

jandafields

Well-Known Member
May 6, 2004
435
4
168
USA
cPanel Access Level
Root Administrator
If I run this command:

doveadm expunge -u main_cpanel_username mailbox INBOX.* savedbefore 0d, it deletes everything in the default email account inbox, and it does not affect any user email accounts. That is exactly what should happen with this command.

On ONE cpanel account, a new account that I just recently created, if I run that same command, it deletes everything in EVERY inbox for EVERY email account.

For example, that command not only deletes the contents of the inbox for main_cpanel_username, it also deletes the inbox contents of [email protected]_cpanel_username.com and [email protected]_cpanel_username.com, etc.

I just can't figure it out, any ideas on why that happens on only the 1 newest cpanel account I have created?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Hi @jandafields

Can you tell me are both accounts using mdbox or maildir format for their email? You can determine this by going to WHM>>Email>>MailBox Conversion and select either mdbox or maildir where it will tell you which accounts can be converted.
 

jandafields

Well-Known Member
May 6, 2004
435
4
168
USA
cPanel Access Level
Root Administrator
Oh, the newest account is maildir, the older ones are mdbox. Although, I didn't think that the format of the underlying data mattered to the dovecot commands.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Hi @jandafields

Oh, the newest account is maildir, the older ones are mdbox. Although, I didn't think that the format of the underlying data mattered to the dovecot commands.
It was just a thought, though I have tried to replicate this locally and have been unable to reproduce it. in any form. The doveadm expunge works as expected for both my mdbox and maildir accounts.

  • Is there any output when you run the command?
  • Is anything noted in /var/log/maillog?
  • What version of cPanel are you running?
 

jandafields

Well-Known Member
May 6, 2004
435
4
168
USA
cPanel Access Level
Root Administrator
No output when ran.
Nothing in maillog regarding this.
cPanel v78.0.15

When you test on maildir, are you including the .* after INBOX.* ? Or are you just typing INBOX by itself? Make sure to include the .* at the end.

I can't try this any more as I have people using this format now, but I tried it 4 times the other day, and it erased the contents of every user's inbox in that every time.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Hi @jandafields


Good point but I was Definitely putting INBOX.*

Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!