well, after much mucking about.... I finally managed to get something to
work :-)
Here is the result: (watch for wrapping...)
: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
DELIVERED=yes
:0 fhw # reverse mailheader and extract name
* ^Subject: get \/[^ ]*
| (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=\"$MATCH\"";\
echo "Content-Transfer-Encoding: base64";\
echo "";\
/usr/bin/mimencode -b $MATCH;\
echo "--fls3jekls3=_sd3--") | $SENDMAIL -oi -t
}
I guess the problem I was having was in starting the formail in one
'recipe' and trying to finish it in another. For some reason, it didn't
like assigning $MATCH to FILE either, and would constantly give me errors,
so I thought, why not just use $MATCH? it contains what I want anyway.
So, on to the next part of the job :-) validating the requestor's email
address with an mysql database.... this part should be a blast :-)
Thanks for your help.
= 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--------------