1 # This all works only if you have mutt-1.3.12 or newer
2 # or if you use something like the pagerfilter patch
3 # (http://www.escape.de/users/tolot/mutt/).
5 # The $my_tprot variable works since mutt-1.5.12, in older
6 # versions you must copy its value in each macro.
8 set my_tprot='t-prot -aelmtS -c --bigq -Mmutt --spass -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters'
9 set display_filter=$my_tprot
11 # toggle TOFU protection with ESC-0 and ESC-1
12 macro generic \e0 ":unset display_filter\n" "Turn TOFU protection off"
13 macro generic \e1 ":set display_filter='$my_tprot'\n" "Turn TOFU protection on"
15 # same in pager mode - ugly but what the hell...
16 macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Turn TOFU protection off"
17 macro pager \e1 ":set display_filter='$my_tprot'; exec exit\n:exec display-message\n" "Turn TOFU protection on"
19 # highlight TOFU protection:
20 color body brightmagenta black "^\\[---.*"
21 color body green black "^#v[-+]"