• Marketing Services
  • Website Services
  • Articles
    • Guides and Tutorials
  • About me
  • Contact
Rising World Steam
Rising World Commands – v0.6.1
December 1, 2015
Google Photos Videos Storage
How to upload 60fps 1080p Videos to Google Photos
September 14, 2016
Published by Ben M on September 12, 2016
Categories
  • Technology
Tags
  • centos
  • clear emails
  • clear mailboxes
  • clear server emails
  • dovecot
  • ubuntu
How to clear dovecot emails and mailboxes

If you use Postfix and Dovecot you will at some point be filled with lots of SPAM emails and you’ll want to empty or clear your mailboxes. I had a mailbox setup for my website, and it piled up to over 200MB worth of junk mail that was wasting space on my server. I googled how to clear the mailboxes, but couldn’t find a clear answer. So that’s the purpose of this little guide. Just to show you exactly how to empty all the SPAM mail from your dovecot mailboxes. You can specify which mailboxes you’d like to empty, but for this example, I’ll show you how to clear all mailboxes.

Step 1. Login to SSH Terminal

You’ll need to login via SSH and with ROOT login details.

Step 2. Execute command

doveadm expunge -A mailbox INBOX ALL

This tells the server to purge/clear/empty “-A” which means all, mailboxes in the folder INBOX. If you wish to only do a certain email address, run this command

doveadm expunge -u [email protected] mailbox INBOX ALL

Replace the example email address with the real one.

Step 3. Done!

You’re done! All mailboxes are cleared and emptied. Now you can have a cleaner server 🙂

 

Note: This clears/empties ALL Mail from the INBOXES. Even the GOOD mail you may want to keep. 

Share
0
Ben M

Related posts

Using ChatGPT for SEO Digital Marketing Purposes
February 4, 2023

The Importance of Using ChatGPT for SEO Digital Marketing Purposes


Read more
Band n71 - 600MHZ T-Mobile 5G Explained why LTE phones before 2020 will not work on 5G network.png

Band n71 - 600MHZ T-Mobile 5G Explained why LTE phones before 2020 will not work on 5G network.png

January 10, 2020

Band n71 with T-Mobile 5G – Explained


Read more
Internet Privacy and Security - People need control over their data in 2020
November 9, 2019

Internet Privacy – People need control over their data in 2020


Read more
2022© MyBuddyBen