Typing away merrily, [EMAIL PROTECTED] produced the immortal words:
> procmail can not do this, can it ? 

Can't it?

Something like (untested):

------------------------< ~upload/.procmailrc >-------------------------
:0
* ^From [EMAIL PROTECTED]
{
        :0 hc
        * ^X-Authenticate-token: \/.*
        | my_test_program "$MATCH"

                :0 ab:
                * ^X-Filename: \/.*
                dropdirectory/$MATCH

        :0
        /dev/null
}
-----------------------------< cut here >-------------------------------

Ideally, given that it's cleartext, you'd either modify this to first
issue a challenge and store the issued challenge, and then check the
reply, or use cryptographic signatures (for sake of example, GPG) and
change the 'hc' rule to 'bc', require a more appropriate header (using
PGP/MIME for instance) and let the external program invoke gpg to
perform the checks.  Then change the ``dropdirectory/$MATCH'' to, eg,
``| my_strip_gpg_and_store "$MATCH"''.

man procmailrc(1).
-- 
HTML email - just say no --> Phil Pennock
"We've got a patent on the conquering of a country through the use of force.
 We believe in world peace through extortionate license fees."  -Bluemeat

Reply via email to