]> git.deb.at Git - pkg/t-prot.git/blobdiff - contrib/muttrc.t-prot.m1512
Imported Upstream version 2.97
[pkg/t-prot.git] / contrib / muttrc.t-prot.m1512
diff --git a/contrib/muttrc.t-prot.m1512 b/contrib/muttrc.t-prot.m1512
new file mode 100644 (file)
index 0000000..4dfc645
--- /dev/null
@@ -0,0 +1,21 @@
+# This all works only if you have mutt-1.3.12 or newer
+# or if you use something like the pagerfilter patch
+# (http://www.escape.de/users/tolot/mutt/).
+#
+# The $my_tprot variable works since mutt-1.5.12, in older
+# versions you must copy its value in each macro.
+
+set my_tprot='t-prot -aelmtS -c --bigq -Mmutt --spass -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters'
+set display_filter=$my_tprot
+
+# toggle TOFU protection with ESC-0 and ESC-1
+macro generic \e0 ":unset display_filter\n" "Turn TOFU protection off"
+macro generic \e1 ":set display_filter='$my_tprot'\n" "Turn TOFU protection on"
+
+# same in pager mode - ugly but what the hell...
+macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Turn TOFU protection off"
+macro pager \e1 ":set display_filter='$my_tprot'; exec exit\n:exec display-message\n" "Turn TOFU protection on"
+
+# highlight TOFU protection:
+color body     brightmagenta   black   "^\\[---.*"
+color body     green                   black   "^#v[-+]"