email2pdf - "Automatic" Conversion of Emails to PDFs


Like many folks, I am increasingly trying to go paperless, and am basing this strategy around the PDF format. I already have some good workflows set up with my network scanner to scan documents to PDF, which get automatically transferred to the desktop of my Mac for myself to file using rsync.

However, I also get a lot of emails which I’d like to capture in PDF format. Currently, for each one, I have to go into my email program, and ‘print them out’ using a PDF printer. It’s not too difficult, but it can still be a hassle when there are several to process.

What I’ve done, therefore, is begun to build a different workflow, centred around a separate email address I’ve set up on my domain. The idea is that I forward emails there that I wished to PDF-ized, and they are periodically retrieved by getmail (which I have running from a cronjob on an Ubuntu machine I have). I’ve then written another utility, which I am calling email2pdf, which acts as an MDA to “deliver” the mail into PDF format.

So far it can process basic text and HTML email (the latter using wkhtmltopdf), or can retrieve a single individual PDF document that’s attached. I’ve got a list of enhancements and other issues that I’d love to work on when I have time.

You are welcome to use or modify email2pdf (it’s MIT-licensed); I would welcome any pull requests for improvement.