As a professional matter, I have about 2000 email messages that I want to share 
with someone.

I can find them all by grepping my Maildir for the email address (to and from) 
somen...@domain.com.

The person receiving them will probably not read every email, but this allows 
me to be totally open. I think that, glancing through, they'd quickly be able 
to verify what I've told them about myself and Some Name, and I think they'd 
find that helpful and reassuring.

The reader is not a geek, and I think a folder or zip file of 2000 separate 
email.txt files would be cumbersome to navigate.

I think the ideal thing to do is print the emails as a single PDF, ordered by 
date, so that the reader has a 2000-odd page PDF book they can browse. They can 
then note the page number of any specific email they wish to refer to, if they 
have any questions they need to ask.

The emails span about 10 years, 2000 - 2010 or so. Because these have been 
copied from one system to the other (perhaps carelessly), for many of them I am 
not certain that the file creation time will be correct.

I think that I can perhaps use net-mail/grepmail to find the earliest date in 
the header of each message, effectively constituting the "Sent" date. I'm not 
sure about this, though.

Using Bash I can probably renumber the messages based on this date, or change 
their file creation / modification time to that. 

I can probably then iterate through the messages, producing PDFs in numerical 
sequence (001.pdf, 002.pdf, or 2009-01-01.pdf, 2010-02-12.pdf), and then `for 
file in *.pdf ; do …` combine them into a single big PDF.

It's not clear to me what the best tools are for some of these steps, and I 
would be grateful if anyone has any thoughts, either on any individual steps, 
or on the whole process.

I use a Mac for my desktop, and so I wish to do this on the command-line of a 
headless Linux box.

What is the best way to pretty print each email, as a PDF, please?

I guess that I can use pdfunite from app-text/poppler to combine separate PDFs 
into one.

Thanks in advance for any suggestions,

Stroller.




Reply via email to