You are not logged in.

#1 2010-03-02 10:55:49

kosmiciatakuja
Member
Registered: 2010-01-27
Posts: 46

A program to decode all encrypted email (gpg) in batch?

Hi,

I have mail stored in maildir format, a  lot of it encrypted with gpg. Is there any program to just batch decrypt the emails and keep them in plain text?

gpg program itself doesn't work because after decrypting it just gives you the decrypted message itself, with no headers, so it's no use to me in a pipe. But it does decrypt, so if only there was a program to keep the headers and run the message body through gpg, that would be ideal.

Every message is in a separate file (it's maildir) so maybe this is doable. I can even imagine a script in bash to do that, but it doesn't sound very easy (there are multipart messages too in there) and I thought - maybe there's something out there?

A bit of background: I'm thinking of moving from mutt to sup and sup doesn't decrypt broken gpg messages generated by enigmail. So I thought I'll just encrypt the whole mailbox with encfs and decrypt individual messages and go with sup.

Any ideas on how to decrypt them all in batch?

Thanks!

Offline

#2 2010-03-02 18:15:18

tss
Member
From: UIUC
Registered: 2008-08-27
Posts: 17
Website

Re: A program to decode all encrypted email (gpg) in batch?

The problem you have is a specialized one with specific needs; scripting is the answer here.  You can just as easily use Ruby or Python instead of bash.  You might find it easier to accomplish your task with a very high level language if you haven't done that much scripting.  Unfortunately I'm not quite clear on your exact situation (where are the headers stored if not in the message?) so I can't give you more useful advice.


Code is everything I thought poetry was... Clean, expressive, urgent, all-encompassing. Fourteen lines can open up to fill the available universe.
Teach Yourself Programming | Learn To Ask Questions | Fight Lost Productivity

Offline

#3 2010-05-23 01:48:18

dhr
Member
Registered: 2010-05-23
Posts: 1

Re: A program to decode all encrypted email (gpg) in batch?

Hi kosmic!

Quite recently I ran into the same problem. Have you made any progress or maybe already even found a solution? I for myself fear to be picturing me writing some perl scripts...
Thanks

Daniel

Offline

Board footer

Powered by FluxBB