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

4.15.3. Append a message to a compressed mailbox

Usage: append-hook regexp "command"

This command is used for saving to an existing compressed folder. The command is the command that can be used for appending to the folders whose names match regexp. It has the same format as in the open-hook command. The temporary folder in this case contains the messages that are being appended.

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:

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

When append-hook is used, the folder is not opened, which saves time, but this means that we can not find out what the folder type is. Thus the default ( $mbox_type) type is always supposed (i.e. this is the format used for the temporary folder).

If the file does not exist when you save to it, close-hook is called, and not append-hook. append-hook is only for appending to existing folders.

If the command is empty, this operation is disabled for this file type. In this case, the folder will be open and closed again (using open-hook and close-hookrespectively) each time you will add to it.


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