based on the very good responses (thank you people) I have come up with
this so far as a responder:
:0
* ^Subject: get [0-9a-z]
* !^X-Loop: getfile*
* !^Subject:.*Re:
* !^FROM_DEAMON
* !^Subject: get .*[/.]\.
{
MAILDIR=/home/www/filemakermagazine.com/www/downloads #chdir to download
directory
:0 fhw # reverse mailheader and extract name
* ^Subject: get \/[^ ]*
FILE="$MATCH" # the requested filename
:0 ah #did the above pass, yes? move on then...
| (formail -rA \
-I"X-Loop: getfile(_at_)filemakermagazine\(_dot_)com"\
-I"MIME-Version: 1.0"\
-I"Content-Type: multipart/mixed; boundary=\"fls3jekls3=_sd3\"";\
echo "--fls3jekls3=_sd3";\
echo "Content-Type: APPLICATION/xx; name=\"$FILE\"";\
echo "Content-Transfer-Encoding: base64";\
echo "Content-Description:";\
echo "";\
/usr/bin/mimencode -b $FILE;\
echo "--fls3jekls3=_sd3--") | $SENDMAIL -oi -t
}
however, I'm running into one snag.... here is the log entry:
procmail: [31719] Thu May 7 12:27:41 1998
procmail: Match on "^Subject: get [0-9a-z]"
procmail: Match on ! "^X-Loop: getfile*"
procmail: Match on ! "^Subject:.*Re:"
procmail: Match on ! "^FROM_DEAMON"
procmail: Match on ! "^Subject: get .*[/.]\."
procmail: Assigning "MAILDIR=/home/www/filemakermagazine.com/www/downloads"
procmail: Assigning "MATCH="
procmail: Matched "iss28v4.sit"
procmail: Match on "^Subject: get \/[^ ]*"
procmail: Extraneous filter-flag ignored
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ what extraneous flag? the ending *?
procmail: Assigning "LASTFOLDER=FILE=iss28v4.sit"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
why is it assigning this to 'LASTFOLDER'?
procmail: Opening "FILE=iss28v4.sit"
procmail: Error while writing to "FILE=iss28v4.sit"
so then it tries to write to it? I don't know why.... so I guess it then
gives up and sends the message to the mail folder....
procmail: Locking "/var/spool/mail/getfile.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/getfile"
procmail: Opening "/var/spool/mail/getfile"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/getfile.lock"
Any pointers?
- paul
-------------------Kudosnet Communication Services--------------------
pevad(_at_)kudosnet(_dot_)com
www.kudosnet.com
For value added web hosting and internet commerce sites
http://kudosnet.com/services/
-------------879 View Rd. Qualicum Beach, Canada V9K 1N3--------------