[neomutt-users] Macro (plus a script to one shot) move selected From's HTML email attachments to a directory
krzysztof.konopko at amk.zone
Fri May 7 08:56:28 CEST 2021
On Thu, May 06, 2021 at 04:04:23PM -0500, Chris Bennett wrote:
> I use SSH to read my emails on the servers, not at home.
> I have several regular emails from biochemistry and electrician related
> mailing lists. Other HTML attachments work fine with just Lynx.
> I really haven't been manually moving these attachments to a website
> that I can read these through Firefox/Chromium, etc. at home or on my
> phone. Too much work manually doing this.
> I'm using Maildir with Dovecot LMTP and IMAP.
I'm far from being a (neo)mutt power-user and I'm still learning, but
thought I'd share how I approached what I think is a similar problem.
I get emails from WebKit  with diffs which use pesky HTML and which I
still want to view as plain coloured diffs in my terminal (in neomutt).
So I set up a hook for these messages:
message-hook '~s \\[webkit-changes' "\
set allow_ansi; \
set mailcap_path=~/.config/neomutt/mailcap-webkit \
In that special mailcap I use a dedicated filter:
text/html; ~/.config/neomutt/filters/webkit-changes 2>/dev/null; copiousoutput
which is based on filters I borrowed from aerc email client  (`html` and
sed -E -e 's/(\[|:)(INS|DEL)(:|\])//g' -e 's/^Diff/diff /' |
awk -f $filter_path/hldiff
The key here is the `html` filter (check it in aerc ) which uses `w3m`
for rendering/filtering HTML in terminal. This provides all links at
the bottom to follow (if I need to). Also the aerc filter uses
`socksify` to avoid phoning home from HTML but I replaced it with a fake
I'm not sure if any of this helps you, but maybe at least it inspires
More information about the neomutt-users