doveadm expunge is deleting other accounts

jandafields

Well-Known Member
May 6, 2004
432
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?
 

jandafields

Well-Known Member
May 6, 2004
432
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

Forums Analyst II
Staff member
Nov 14, 2017
8,012
647
263
Houston
cPanel Access Level
DataCenter Provider
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
432
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.