procmail
[Top] [All Lists]

Automated upload/decode recipe

1998-02-11 06:40:29
I have been trying to write a recipe that allows my
users on a local network to upload files a ftp connection.

So, I rececive a mail with one mime encoded zip file, and
want to extract it to their subdir.

I have been using the following recipe from this mailing list:

:0
{
    mime_decode_encoding = `formail -zx Content-Transfer-Encoding`

    :0 fbrw
    * mime_decode_encoding ?? ^^quoted-printable^^
    | mimencode -q -u >>$HOME/test/test1.xxx

    :0 afhw
    | formail -i 'Content-Transfer-Encoding: 8bit' >>$HOME/test/test3.xxx
    
    :0 Efbrw
    * mime_decode_encoding ?? ^^base64^^
    | mimencode -u >>$HOME/test/test2.xxx

    :0 afhw
    | formail -i 'Content-Transfer-Encoding: binary' >>$HOME/test/test4.xxx

    mime_decode_encoding
}

Unfortunately, it does encode only very simple messages with old mailers.
If they use Netscape or send more than one file in the same message,
the recipe does not work.

Does anybody have a solution for my problem?

Thanks.

Alex



<Prev in Thread] Current Thread [Next in Thread>