Hello Hans and Steffen,

I used to use munpack before mailx 'write' developed the capabilities that Steffen describes. Write gives you more control over which attachments will be extracted and what they will be called.

Munpack can read from its standard input, so if you are in mailx/s-nail, you don't need to know the absolute file location of the current message. Simply '|munpack' will unpack it. As with 'write', the message doesn't need to be in a local file at all; it can be on a remote imap server.

I hope that is helpful.

Stephen Isard

On Mon, 20 Jun 2022, Steffen Nurpmeso steffen-at-sdaoden.eu |s-nail| wrote:


Hello Hans,

sorry for the late reply.

hbeze...@kliksafe.nl wrote in
<20220618191419.schb7%hbeze...@kliksafe.nl>:
|I would like to be able to save attachments from messages within mailx.
|I'm using munpack(1) to extract the attachments.

I have never heard of munpack, interesting.
Were there a need, i would possibly look into nmh(1) and use one
of its tools as long as this MUA cannot directly address things.

|Is it possible to retrieve the filename(location) of a message?
|For example:
|!munpack <expand message location of current message>

I do not know nothing about munpack.
mailx has the `write' command to save message parts [1]; manual is
a bit weird, you give it the message and a filename that is used
for the main text part (or the entire message for non-MIME
messages), for any other part you are prompted in interactive
mode.

 [1] http://sdaoden.eu/code-nail.html#306

The best however would be if mailx finally could address parts
directly ("write 1.2.1"), or if the `digmsg' command would learn
how to write individual parts.  This not yet, unfortunately.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to