Better way to delete all mails from a 1 specific account?

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.3
Webmin version 2.105
Usermin version 2.005
Virtualmin version 7.9.0
Theme version 21.09.5
Package updates 1 package update is available
hi , i try instrucction in " Deleting all Emails in the maildir ", but dir maildir/cur is empty
i tried to delet them using manage folder in usermin, but i get “imap error”
i need to do it , because this customer has a 12 gigs in mails, and actually only has web hosting with us, (he move his mail to a diferent company)

Delete the user?

no, just empty all mailbox

Usermin offers a single click option to delete all messages in a folder.

1 Like

in edit user doesn’t the delete all work?

Still cannot see why a user is even needed on the system who doesn’t require mail.
deleting the user will delete all mail, (should work even if the other obvious methods do not appear to work)
if the user is required for some other access they can always be recreated without email.

How to get to that User Email screen? I have looked everywhere that I can think of.

Click on the link here

is it the ‘owner’ of the virtual server? if so that could be the cause of complications … of course there is always (at least on my RedHat servers) the option at the cmd line:

rm /var/spool/mail/[userid-goes-here]

if thats where all your INBOXs are located :grinning:

Ah… So, thank you very much.

Why would I want to go to all that bother when the above method by Stefan works just fine and quickly?

Because the OP stated:

That isn’t where mail has ever been, by default, on a Virtualmin system. We use Maildir, and pretty much always have for as long as the installer has existed. I dunno how you got mbox (or whatever you’re putting in the spool).

Maildir has the convenient side effect of putting mail in the user’s home directory, which allows easier backups and better isolation when needed.

1 Like

My bad :grinning: I believe I heavily tweaked my mail settings – SORRY

I can see how downloading 12 Gb of mail would be a great solution for some.

deleted it, wrong command sorry

To be complete, ill place it back: This is to delete all mails in the queue for a domain. Useful when you have a spam attack

mailq | grep -B3 "\example.com$" | grep "^[0-9A-Z]" | cut -f 1 -d ' ' | xargs -n 1 postsuper -d

regards
Jan

tx to everybody, i like to see that imagination and creativity are alive and kicking in our minds!!!
tx again

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.