Add script for sandboxing w3m

This commit is contained in:
Drew DeVault 2019-03-31 15:33:07 -04:00
parent 315cdf308a
commit 93695d1e84
2 changed files with 11 additions and 1 deletions

View file

@ -81,7 +81,7 @@ alternatives=text/plain,text/html
# against (non-case-sensitive) and a comma, e.g. subject,text will match a # against (non-case-sensitive) and a comma, e.g. subject,text will match a
# subject which contains "text". Use header,~regex to match against a regex. # subject which contains "text". Use header,~regex to match against a regex.
subject,~PATCH=contrib/hldiff.py subject,~PATCH=contrib/hldiff.py
text/html=w3m -T text/html -cols $(tput cols) -dump -o display_image=false -o display_link_number=true text/html=contrib/html
text/*=contrib/plaintext.py text/*=contrib/plaintext.py
[lbinds] [lbinds]

10
contrib/html Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
# aerc filter which runs w3m using socksify (from the dante package) to prevent
# any phoning home by rendered emails
export SOCKS_SERVER="127.0.0.1:1"
exec socksify w3m \
-T text/html \
-cols $(tput cols) \
-dump \
-o display_image=false \
-o display_link_number=true