[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FTP upload by email

Typing away merrily, hendriks@genic.de produced the immortal words:
> procmail can not do this, can it ? 

Can't it?

Something like (untested):

------------------------< ~upload/.procmailrc >-------------------------
* ^From trusted@example\.com$
	:0 hc
	* ^X-Authenticate-token: \/.*
	| my_test_program "$MATCH"

		:0 ab:
		* ^X-Filename: \/.*

-----------------------------< 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 to: