Re: [maildropl] How to process a Zipped, Base64 encoded email body
Brought to you by:
mrsam
|
From: Sam V. <mr...@co...> - 2020-04-14 02:45:58
|
Philip Rhoades writes: > People, > > I get DMARC summaries emailed to me regularly, but, annoyingly - because it > is a small amount of information anyway - the body of the email is Zipped > and Base64 encoded . . > > Before I try to work out how to process these mails so that they end up with > a plan text email body, is there existing information about how to do this > so I don't waste a lot of time producing something that some more clued-up > person has already done more nicely? - I imagine that someone has already > had to deal with this sort of situation . . You can use reformime's -X or -x option to strip off the base64 encoding of the MIME section. You'll probably want to have a shell script that sets up something in /tmp where -x can dump into. Note that -x will extract every MIME section, not just an attachment, so you'll have to have some smarts in the shell script to look at what came out, and if there's anything in there worth preserving. At that point you'll have the the base64-decoded data, that you can unzip. |