On Thu, Sep 15, 2016 at 10:53:02AM +1000, Cameron Simpson wrote:
> On 14Sep2016 16:12, Are Troi <areemt...@gmail.com> wrote:
> >Last night at a technical talk I lamented the loss around 5 years ago
> >from Fedora of command-line tools to extract email attachments from a
> >BASH script and a colleague told me Mutt can do this.
> If you mean the MIME tools mpack and munpak, I still use them. (On a Mac,
> where the Macports package is called mpack).
> Wouldn't you be better off just fetching and buiulding them?
tried ripmime and munpak about a year ago to save all attachments from
a large MBOX and it was everything but a hasslefree experience. Various
attachments were missed or not processed, some segfaults.
Those tools are apparently not as robust as mutt is.
Ended up splitting the MBOX by formail
cat MBOX | formail -ds sh -c 'cat > msg.$FILENO'
and processing messages by
ripmime -v --name-by-type --verbose-contenttype --verbose-defects -i "$f"
.. and hoping not much was missed by this apporach.
Name and OpenPGP keys available from pgp key servers