I have been looking for a good solution for pretty printing from
mutt. The best solution suggested is muttprint. The problem, however,
is that muttprint uses the latex system to print. I am not a latex
user and I do not want to install the entire latex system on my
machine just to print e-mails.
There are two other alternatives that I have come across: mp and
enscript.
Solution 1. mp
1) Install mp and mptools. On my ubuntu machine that is as simple as
> apt-get install mp mptools
2) Add the following line to .muttrc
set print_command=”/usr/bin/mp -A4 -F -l -m -left 74 -right 74 | lpr -P printername”
I do not like the output of mp very much. It is somewhat stupid in
wrapping text across lines: it justifies the print on both sides but splits
the words wherever the number of characters hits the maximum
width.
Solution 2. enscript
enscript is insalled on most linux distribution by default.
Adding the following line to .muttrc sets mutt to print via enscript
set print_command=”enscript -Email –pretty-print -G -P printername ”
The following line in .muttrc (instead of the previous one) will make
enscript print in landscape format and print in two columns.
set print_command=”enscript -Email –pretty-print -G2r -P postscript-color-pdf”
The problem with enscript is that it prints all the mail headers. Its
output is nicely formatted except for the fact that it prints all the
junk in the headers.
I do not yet know of any way of making either mutt pass only selected
headers to enscript or get enscript to skip some headers. My instinct
is that there may be some way of getting the mutt to do the job. I do
not yet know and would benefit if someone who drops by on this blog
has a solution to offer.
At the moment I am sticking to the first solution but I am looking for
a better way of using enscript.
V.





