The Mutt E-Mail Client : Advanced Usage : Compressed folders Support (OPTIONAL) : Write a compressed mailbox
Previous: Open a compressed mailbox for reading
Next: Append a message to a compressed mailbox

4.15.2. Write a compressed mailbox

Usage: close-hook regexp "command"

This is used to close the folder that was open with the open-hook command after some changes were made to it.

The command string is the command that can be used for closing the folders whose names match regexp. It has the same format as in the open-hook command. Temporary folder in this case is the folder previously produced by the < open-hook command.

The command should not remove the decompressed file. The command should return non-zero exit status if it fails, so mutt knows something's wrong.

Example:

close-hook \\.gz$ "gzip -c %t > %f"

If the command is empty, this operation is disabled for this file type, and the file can only be open in the readonly mode.

close-hook is not called when you exit from the folder if the folder was not changed.


The Mutt E-Mail Client : Advanced Usage : Compressed folders Support (OPTIONAL) : Write a compressed mailbox
Previous: Open a compressed mailbox for reading
Next: Append a message to a compressed mailbox