On Sat, 17 Mar 2001 [EMAIL PROTECTED] wrote:

> 
> 
> On Sat, 17 Mar 2001, Jack Daly wrote:
> 
> > Hello -
> >
> > I'm trying to automate a process and running into some problems, hoping
> > someone can help.  What i want to do is take an e-mail attachment that has
> > been mailed to me, and put that attachment into my home directory.  When I
> > use Pine manually it works great, and the document, which is a .txt file
> > coming from Win95, retains its original line breaks and everything's fine.
> > I figured I could automate it by having Procmail put the e-mail in my
> > home directory but the problem i ran into was that the attached file loses all its
> > original line breaks.  So I went back to Pine and used Autoexpect to
> > generate an Expect script that would run Pine and save the attachment.
> > After some tinkering I got it to work, but when i try to use it as part of
> > Crontab I get the following error message:
> >
> >
> > -------
> > spawn /bin/sh
> > pine -f /home/jddaly/mail/file -i
> >
> > vs
> > qbash$ pine -f /home/jddaly/mail/file -i
> > Your terminal, of type "dumb", is lacking functions needed to run pine.
> >
> > bash$
> > bash$ vs
> > sh: vs: command not found
> > bash$ q
> > -------
> >
> > Is there any way around this?
> >
> > Thanks in advance
> >
> > Jack Daly
> 
> I'm going to start by answering the question you didn't ask:  how to do
> it with procmail.
> 
> If I understand what you are trying to do, I was able to do it with the
> following recipe in .procmailrc
> 
> :0:
> * ^TOwhit
> |/usr/local/bin/munpack -C /home/whit/empty
> 
> When I mailed myself a letter and attached a dos text file named
> oof.txt, I found in /home/whit/empty oof.txt, still with its cariage
> returns at the end of each line, and the body of the letter in oof.desc.
> 
> It is a named file in the attachment, no?  munpack won't find anything
> to munpack if no attachments have names.  You can read the letter with
> less and see the MIME headers to tell that.
> 
> I don't remember where I got mpack (munpack is part of it).  It doesn't
> seem to be in the base Mandrake distro, ... Ahhh, here it is in
> mpack/README.unix:
> 
> Versions are included for unix, pc, os2, mac, amiga and archimedes
> systems.  The canonical FTP site for this software is
> ftp.andrew.cmu.edu:pub/mpack/
> 
> If after all, that isn't what you want and you insist on using pine, ask
> again and I can probably figure out how to do that, too.  Right now I
> have some Wine bugs and features to help fix and implement.
> 
> Lawson
> 
> This message is brought to you by Wine-20010305, junopine-2.0.2,
> Juno 2.0.11, and pine-4.10
> ---cut here

Lawson - 

Exactly what I needed, the expect routine was a desperate measure by a
clueless desperate man.  Kind of fun learning it though.  Munpack is
perfect for what I'm doing.  Thanks a million.

Jack Daly  

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to