How Do I Delete a Mailbox in Linux?
Contents

8 Answers. You can simply delete the /var/mail/username file to delete all emails for a specific user. Also, emails that are outgoing but have not yet been sent will be stored in /var/spool/mqueue .

How do I delete a mailbox file?

How to Delete Folders in the Mail App

  1. Open the Mail app.
  2. Go to the main Mailboxes screen.
  3. Tap Edit. Then, tap the folder you want to delete.
  4. Tap Delete Mailbox.
  5. Confirm you want to remove the folder and any messages contained in it by tapping Delete again.
  6. Select Done.

How do I empty the var spool mail root?

The easiest way is to empty root or users email message file. The file is located at/var/spool/mail/root or /var/spool/mail/username location. You can read mail using mail/mailx command. It is an intelligent mail processing system, which has a command syntax reminiscent of ed with lines replaced by messages.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest