The tricky bit:
Saving a mimedecoded file with spaces in the name.
If the attached file has a singleword name, there is no error.
Neither single nor two levels of quotes fix it.
Gosh - your attempted solution is pretty inventive. But all you need
are some quotes on the action line that invokes the mimedecode program:
* B ?? ^Content-Disposition: attachment; filename=\/.*
{ # Accept ' ' in
name
# FILE=`echo "$MATCH" | tr [\"] [\']` # Leave it quoted
FILE=`echo "@$MATCH@" | tr [\(_at_)] [\']` # "' xxx '"
LOG=${DELIVERY_DIR}/$FILE
Remove the above part that tries to put quotes in the filename and ..
:0c: # Deliver document
| mimedecode > ${DELIVERY_DIR}/$FILE
Add the quotes here. So that you have:
| mimedecode > "${DELIVERY_DIR}/$FILE"
As an aside, you're attempting to set a lock file here, even though two
processes trying to write to the same file will result in one completely
obliterating the otherone anyway. If there is no reason for the lock,
I'd remove the second colon from the colon line. If there is a need for
a lock, you might like to give procmail the name of a lockfile (and so
not get the warning in your log file)
:0c: mimedec
| mimedecode > "${DELIVERY_DIR}/$FILE"
Hope that helps,
Martin
--
Martin McCarthy /</ http://procmail.non-prophet.org
`Procmail Companion' \>\
Addison Wesley /</ PGP key available
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail