How mutt can handle mails in html format ? Takling about html mail handling is
talking about handling any type of
Multipurpose Internet Mail Extensions. Mutt
supports handling for all MIME types in one place for all programs. This place
is .mailcap file. Googling a little bit I found below mailcap file
configuration (kudos to
Bart Nagel).
1
2
3
4
|
text/html; pandoc -f html -t markdown; copiousoutput; description=HTML Text; test=type pandoc >/dev/null
text/html;lynx -stdin -dump -force\_html -width 70; copiousoutput; description=HTML Text; test=type lynx >/dev/null
text/html; w3m -dump -T text/html -cols 70; copiousoutput; description=HTML Text; test=type w3m >/dev/null
text/html; html2text -width 70; copiousoutput; description=HTML Text; test=type html2text >/dev/null
|
Of course we need to install all applications to make mailcap work correct:
1
|
sudo apt-get install pandoc lynx w3m html2text
|
To bring address book functionality to mutt we need abook application:
1
|
sudo apt-get install abook
|
Also few new line in $HOME/.muttrc will be needed:
1
2
3
4
5
6
|
# add alias file for addresses
set alias_file=~/.mutt/alias source ~/.mutt/alias
# configure addressbook
set query_command= "abook --mutt-query '%s'"
macro index,pager A "<pipe-message>
abook --add-email-quiet<return>" "add the sender address to abook"
|
Adding new address simply create entry in alias file. During adding new alias
abook asks about alias name, e-mail address, personal name and confirmation for
given data. Some this fields could be filled automatically by interaction
between abook and mutt. Of course file $HOME/.mutt/alias have to exist before
running mutt: touch $HOME/.mutt/alias To access saved aliases simply click
button in cc, to or bcc filed. There is few more options that I found
useful. To find it please go to my
workspace scripts at github. Also if
you have any issues with the configuration or comments please let me know by
commenting below the post.
Piotr Król
I’m into open-source firmware, drawing inspiration from the classic hacker ethos of collaborative innovation and transparency. At 3mdeb, we’re excited about our two main projects: Zarhus OS, an Embedded Linux distribution based on Yocto, and Dasharo, a coreboot downstream. Both are about the value of open development, embedded firmware resilience, platform security transparency, the right to repair, and digital sovereignty.
Community is at the center of our activity. By being involved in the Dasharo Users Group, Dasharo Developers vPub, and events like the Qubes OS Summit, we connect with others who share our passion for open-source.