Extracting Attachments Without Launching Thunderbird
One of the precautions I have taken to avoid a snoopy ISP is not launching the Thunderbird mail client unless connected to a VPN. This helps ensure the ISP does not learn where I have mail accounts.
I received an email that included a PDF attachment. I wanted to view that attachment, but I was not connected to the VPN. I could temporarily pull the Ethernet cable to prevent Thunderbird from connecting to any email accounts or I could connect to the VPN.
I had a hunch there was another approach.
Using grep
I found the respective maildir email in the Thunderbird profile directory. I browsed the contents of the mail with a text editor. I noticed the attachment was base64
encoded. I copied the base64
block of data and saved to a new text file. I used the base64
command to convert the text file to PDF:
base64 --decode attachment.txt > attachment.pdf
Having options reduces stress. To paraphrase Hannibal Smith, “I love when a plan comes together.”
Posted: Usability Tagged: General, Thunderbird
Category:Next: LibreOffice Writer Compatibility with MS-Word
Previous: DD-WRT Bites Me Again