aboutsummaryrefslogtreecommitdiff
path: root/filters
diff options
context:
space:
mode:
authorJens Grassel <jens@wegtam.com>2022-04-16 17:40:31 +0200
committerRobin Jarry <robin@jarry.cc>2022-04-17 12:17:43 +0200
commit1ecee8efa5319cc9628deca04c354b2ebf87d89c (patch)
tree858b4d9d8d51f0cf463592909af0199fbd814d13 /filters
parent029ff639293efc34c72139e445a8ff452c1da408 (diff)
downloadaerc-1ecee8efa5319cc9628deca04c354b2ebf87d89c.tar.gz
aerc-1ecee8efa5319cc9628deca04c354b2ebf87d89c.zip
Add html "unsafe" filter to work also without dante
If socksify (from dante) is not installed then the filter uses w3m without it to render an html message part. Signed-off-by: Jens Grassel <jens@wegtam.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'filters')
-rwxr-xr-xfilters/html-unsafe16
1 files changed, 16 insertions, 0 deletions
diff --git a/filters/html-unsafe b/filters/html-unsafe
new file mode 100755
index 00000000..6dce27e2
--- /dev/null
+++ b/filters/html-unsafe
@@ -0,0 +1,16 @@
+#!/bin/sh
+# aerc filter which runs w3m using socksify (from the dante package) to prevent
+# any phoning home by rendered emails. If socksify is not installed then w3m is
+# used without it.
+if [ $(command -v socksify) ]; then
+ export SOCKS_SERVER="127.0.0.1:1"
+ PRE_CMD=socksify
+else
+ PRE_CMD=""
+fi
+exec $PRE_CMD w3m \
+ -T text/html \
+ -cols $(tput cols) \
+ -dump \
+ -o display_image=false \
+ -o display_link_number=true