summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-11-13 20:02:33 -0800
committerKevin McCarthy <kevin@8t8.us>2016-11-13 20:02:33 -0800
commit9bf6d74e9cc5a7b6b7a62fdefd6d953d60a422db (patch)
tree52c3e9f8c6c89cc6f79ec27765c3bc5c3b4f4864 /contrib
parentb17cd67312913bc98269840652bc5c54eba9fc20 (diff)
Compress patch from the neomutt repository.
With the following changes: - po/de.po changes trimmed to just the compress additions. - Move the sample muttrc to contrib, and add it to the Makefile.am so it is distributed. Remove the sample vimrc. - Remove extra fluff from manual. Thanks to Roland Rosenfeld for the original patch, and to the NeoMutt team for their work cleaning up the patch.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile.am2
-rw-r--r--contrib/sample.muttrc-compress38
2 files changed, 39 insertions, 1 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 3ca99a02..89aa1586 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -4,7 +4,7 @@ subdir = contrib
SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
sample.mailcap sample.muttrc sample.muttrc-sidebar sample.muttrc-tlr \
- sample.vimrc-sidebar colors.default colors.linux smime.rc \
+ sample.muttrc-compress sample.vimrc-sidebar colors.default colors.linux smime.rc \
ca-bundle.crt smime_keys_test.pl mutt_xtitle
EXTRA_DIST = language.txt language50.txt \
diff --git a/contrib/sample.muttrc-compress b/contrib/sample.muttrc-compress
new file mode 100644
index 00000000..d793a9e1
--- /dev/null
+++ b/contrib/sample.muttrc-compress
@@ -0,0 +1,38 @@
+# Example Mutt config file for the compress feature.
+
+# This feature adds three hooks to Mutt which allow it to
+# work with compressed, or encrypted, mailboxes.
+
+# The hooks are of the form:
+# open-hook regexp "shell-command"
+# close-hook regexp "shell-command"
+# append-hook regexp "shell-command"
+
+# The 'append-hook' is optional.
+
+# Handler for gzip compressed mailboxes
+open-hook '\.gz$' "gzip -cd '%f' > '%t'"
+close-hook '\.gz$' "gzip -c '%t' > '%f'"
+append-hook '\.gz$' "gzip -c '%t' >> '%f'"
+
+# Handler for bzip2 compressed mailboxes
+open-hook '\.bz2$' "bzip2 -cd '%f' > '%t'"
+close-hook '\.bz2$' "bzip2 -c '%t' > '%f'"
+append-hook '\.bz2$' "bzip2 -c '%t' >> '%f'"
+
+# Handler for xz compressed mailboxes
+open-hook '\.xz$' "xz -cd '%f' > '%t'"
+close-hook '\.xz$' "xz -c '%t' > '%f'"
+append-hook '\.xz$' "xz -c '%t' >> '%f'"
+
+# Handler for pgp encrypted mailboxes
+# PGP does not support appending to an encrypted file
+open-hook '\.pgp$' "pgp -f < '%f' > '%t'"
+close-hook '\.pgp$' "pgp -fe YourPgpUserIdOrKeyId < '%t' > '%f'"
+
+# Handler for gpg encrypted mailboxes
+# gpg does not support appending to an encrypted file
+open-hook '\.gpg$' "gpg --decrypt < '%f' > '%t'"
+close-hook '\.gpg$' "gpg --encrypt --recipient YourGpgUserIdOrKeyId < '%t' > '%f'"
+
+# vim: syntax=muttrc