Trash Folder Feature

Automatically move deleted emails to a trash bin

1. Support

Since: NeoMutt 2016-09-10, NeoMutt 1.7.0

Dependencies:

If IMAP is enabled, the trash folder will use it wisely

2. Introduction

In NeoMutt, when you delete an email it is first marked deleted. The email isn't really gone until <sync-mailbox>is called. This happens when the user leaves the folder, or the function is called manually.

After <sync-mailbox> has been called the email is gone forever.

The $trash variable defines a folder in which to keep old emails. As before, first you mark emails for deletion. When <sync-mailbox> is called the emails are moved to the trash folder.

The $trash path can be either a full directory, or be relative to the $folder variable, like the mailboxes command.

Note

Emails deleted from the trash folder are gone forever.

3. Variables

Table 39.1. Trash Variables

Name Type Default
trash string (none)

4. Functions

Table 39.2. Trash Functions

Menus Default Key Function Description
index,pager (none) <purge-message> really delete the current entry, bypassing the trash folder

5. neomuttrc

# Example NeoMutt config file for the 'trash' feature.

# This feature defines a new 'trash' folder.

# When mail is deleted it will be moved to this folder.

# Folder in which to put deleted emails
set trash='+Trash'
set trash='/home/flatcap/Mail/Trash'
# The default delete key 'd' will move an email to the 'trash' folder
# Bind 'D' to REALLY delete an email
bind index D purge-message
# Note: Deleting emails from the 'trash' folder will REALLY delete them.

# vim: syntax=neomuttrc

6. See Also

7. Known Bugs

None

8. Credits

Cedric Duval, Benjamin Kuperman, Paul Miller, Richard Russon

Search by Algolia