From 1ecee8efa5319cc9628deca04c354b2ebf87d89c Mon Sep 17 00:00:00 2001 From: Jens Grassel Date: Sat, 16 Apr 2022 17:40:31 +0200 Subject: 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 Acked-by: Robin Jarry --- filters/html-unsafe | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 filters/html-unsafe (limited to 'filters/html-unsafe') diff --git a/filters/html-unsafe b/filters/html-unsafe new file mode 100755 index 0000000..6dce27e --- /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 -- cgit v1.2.3