summaryrefslogtreecommitdiffstats
path: root/contrib/sample.muttrc-compress
blob: d793a9e18666cbb1aa3d0469938322ebf140006a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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