procmail
[Top] [All Lists]

Simulating FTP-binary mode using procmail

2001-08-09 05:20:42
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


My "$HOME/.forward" contents
"|IFS='
'&&p=/usr/local/packages/procmail/procmail-3.11pre7/bin/procmail&&test -f
$p&&exec $p -Yf-||exit 75 #my_id"


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.


Thanks a lot for your help,
Harsha


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>