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.
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.