How to extract attachment from enrcypted mail

16 views
Skip to first unread message

marko.b...@mailbox.org

unread,
Nov 8, 2019, 3:30:14 AM11/8/19
to mbl...@googlegroups.com
Hi,
before we talk about how to extract an attachment from an encypted
mail, what is your way to work with encrypted mails?

What I do is to use the filter file and add 'multipart/encrypted: gpg -d'.
With that I'm getting the decrypted content on the fly when using mless
or mshow.
What is your recommendation to read encrypted mails (imagine all mails
in your inbox are encrypted).

But, I didn't find a way to extract an attachment from an encrypted
mail. I mean 'mshow -B .' does not give the names of attachments.
'mshow -B -x .' will also not work.

Any hint?

Thanks
Marko




marko.b...@mailbox.org

unread,
Nov 9, 2019, 5:03:13 AM11/9/19
to Leah Neukirchen, mbl...@googlegroups.com
Leah Neukirchen <le...@vuxu.org> wrote:
> We have a helper in contrib/ for that:
> multipart/encrypted: mgpg

Ah, cool. This filter works better than directly 'gpg -d'.

> Currently you probably need to do that manually:
>
> mshow -O . 3 | gpg2 -d | mshow -x /dev/stdin

Yes. Works perfectly. Awesome, thanks.

Btw: I got the point about the command 'mshow -O .', but not what '3' is.
Can you explain what the '3' is doing?
Does that mean the "third" part of the email?
What should I do when I have more than one attachment, lets say 2?


Thanks
Marko


Leah Neukirchen

unread,
Nov 9, 2019, 12:22:44 PM11/9/19
to marko.b...@mailbox.org, mbl...@googlegroups.com
marko.b...@mailbox.org writes:

> Hi,
> before we talk about how to extract an attachment from an encypted
> mail, what is your way to work with encrypted mails?
>
> What I do is to use the filter file and add 'multipart/encrypted: gpg -d'.
> With that I'm getting the decrypted content on the fly when using mless
> or mshow.
> What is your recommendation to read encrypted mails (imagine all mails
> in your inbox are encrypted).

We have a helper in contrib/ for that:
multipart/encrypted: mgpg

However, this will only help displaying the mail, not extracting...

Currently you probably need to do that manually:

mshow -O . 3 | gpg2 -d | mshow -x /dev/stdin

hth,
--
Leah Neukirchen <le...@vuxu.org> https://leahneukirchen.org/

Leah Neukirchen

unread,
Nov 13, 2019, 7:07:55 AM11/13/19
to marko.b...@mailbox.org, mbl...@googlegroups.com
Yes, you can list the attachments and their number with "mshow -t".
Reply all
Reply to author
Forward
0 new messages