Discussion:
"fast" save of attachments from multiple messages
Claus Assmann
2018-02-02 12:13:52 UTC
Permalink
Is there some fast way to save the attachments from multiple messages?
That is, without going to every individual message, viewing and
then saving the attachments? I can tag the attachments in a single
message and save them easily, but seemingly not for multiple messages
(AFAICT). Something like a "save attachments" option (after tagging
the messages) or some "clever" macro?

This would be useful as I sometimes get many messages with one
attachment each instead of one message with many attachments (e.g.,
to avoid messages that are too large for some MTA configurations).
Cameron Simpson
2018-02-02 20:59:18 UTC
Permalink
Post by Claus Assmann
Is there some fast way to save the attachments from multiple messages?
That is, without going to every individual message, viewing and
then saving the attachments? I can tag the attachments in a single
message and save them easily, but seemingly not for multiple messages
(AFAICT). Something like a "save attachments" option (after tagging
the messages) or some "clever" macro?
This would be useful as I sometimes get many messages with one
attachment each instead of one message with many attachments (e.g.,
to avoid messages that are too large for some MTA configurations).
If you have the munpack or metamail commands on your system you can use them to
unpack messages, extracting the attachments. If you're standing in the
directory where you want the attachments extracted you could:

- tag the messages

- type ";|munpack" or ";|metamail -w -x" to extract the contents

You will need the setting pipe_split=yes to run each message on its own.

Once sorted you'll probably want to make a macro to make this easy after
tagging the messages. You might also want to have a preferred place to extract
things.

For example, on a single message basis I've got "V" bound to
"<pipe-message>mail-open-attachments<enter>", which I've attached. I'm on a
Mac, so that makes a scratch directory, unpacks the message with munpack, then
opens the directory in the Finder for me to fiddle with. Hack to suit.

Cheers,
Cameron Simpson <***@cskk.id.au> (formerly ***@zip.com.au)

Loading...