On Thu 03 Apr 2008 12:11:55 NZDT +1300, Douglas Royds wrote:

> This fails your "does not create random files on disk" requirement, but you 
> can use munpack to expand a multi-part MIME email into (ahem) multiple 
> files on disk:
>
>    munpack -tC randomFilesOnDisk/ ~/multipart.eml

That would be pretty much the same to metamail's 

env METAMAIL_TMPDIR=. metamail -w -x -q

Which creates an unknown number of files, hopefully all in the
designated place. Scripting a junk yard area for this isn't too
difficult, but not ideal.


Jim's suggestion
  http://docs.python.org/lib/module-email.html
is yet another reason to learn python.


This got me thinking whether maildrop (something similar to procmail)
can split mime parts - it doesn't, but there's a reformime close by
which can.

  reformime -i               display mime structure of email on stdin
  
  reformime -s 1.2 -e        extract mime section 1.2 of stdin to stdout

In case the mime section number is variable, the output of -i could be
easily parsed.

Thanks all,

Volker

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

Reply via email to