View PDF attachments as text in Mutt
To do so, install pdftotext
:
$ sudo apt install poppler-utils
Look for a mailcap
file. If none exists:
$ touch .config/mutt/mailcap
Then add the following line:
application/pdf; pdftotext -layout -q %s -; copiousoutput;
Next you need to add these lines to your .muttrc
:
auto_view application/pdf
set mailcap_path = ~/.config/mutt/mailcap
You now can type m
to view a PDF file as text.
You can read more about mailcap
and auto_view
in the manual of Mutt.
personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki mutt pdf