Re: Mutt doesn't let me run automatically
On 22Mar2006 15:49, Jim VerDuin <jverduin@xxxxxxxxx> wrote:
| I have been trying to automate a process where I receive emails with an
| RTF attachment and I want to extract the RTF attachment from the email.
|
| I looked at the Mutt email client and it appears to support an automated
| way to do the saving of the attachment, except that when I run the
| .muttrc, the Mutt application stops and prompts me to enter the
| attachment file name.
[...]
I do this with a small macro bound to ,x:
macro index ,x "<pipe-message>mailunpack -d ~/"
macro pager ,x "<pipe-message>mailunpack -d ~/"
macro attach ,x "q<pipe-message>mailunpack -d ~/"
Now, as written, that also prompts (because the <enter> operation isn't
there - I actually want to type in the location). But you could as easily
make the macro:
macro index ,x "<pipe-message>mailunpack -d
the-unpacking-directory<enter>"
Then you just need an unpack command. Mailunpack is a script of my own,
but it just calls munpack or metamail (from the metamail software package)
to do the work, then does a little filing.
The source is here:
http://www.cskk.ezoshosting.com/cs/css/bin/mailunpack
I'm usings metamail-2.7. It's readily available for Gentoo, Debian,
OpenBSD etc. I had to do some searching for my Fedora box. Start here:
http://www.google.com.au/search?q=metamail-2.7
perhaps.
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/
Speed costs money. How fast do you want to go? - C. Shelby