* Harsha Vardhana R <hvardhan(_at_)cisco(_dot_)com> [010809 08:20]:
Hello,
I am trying to save the attachments like MS-Word documents to a particular
folder.
The mail contains only one document.
My "$HOME/.procmailrc" file contents
SHELL=/bin/sh
PATH=/bin:/usr/bin:/usr/local/packages/procmail/procmail-3.11pre7/bin
MAILDIR=$HOME/Mail
LOGFILE=$HOME/ProcTrial/proc_log
VERBOSE=yes
:0c:
* ^From.*MyBoss
* ^Subject:.*StatusReport
| formail -I "" > /Dir1/Dir2/Webfolder/statusreports/29Jul2001Status.doc
#Remove the header
The document is stored successfully in the intended web folder. But when
viewed through the browser, it doesn't appear as a Word document and it
looks unreadble. I suppose it resembles a FTP from windows to Unix in
"ASCII" mode. If I store the same document by "FTP"ing using "binary" mode,
the browser displays the document properly. So how can I achieve simulating
FTP binary mode using procmail and formail? Any more options need to be
included with formail? I am using "I" option with formail to remove the
headers of the like "From", "Subject" etc.
You view Word docs in your browser? Perhaps an IE thing I'm not
acquainted w/..
Anyway, perhaps you want to try out the metamail recipe that was posted
not too long ago. Just removing the headers from the email isn't enough
to extract an attachment.
# untested recipe
METAMAIL_TMPDIR=/Dir1/Dir2/Webfolder/statusreports
:0bc
* ^From.*MyBoss
* ^Subject:.*StatusReport
| metamail -w -q -x
--
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
He shall scorn the scorners, and to
the meek he will give grace.
-- Proverbs 3:33
--
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail