procmail
[Top] [All Lists]

Re: uuencoding before automatic send

1996-04-02 10:15:42
Marc Rackett wrote,

| I was very interested to see Philip Guenther's reply to 
| D. Emilio Grimaldo's querey concerning the fileserver
| concept.  I have had it working for a while now, but have
| been unsuccessful in getting binary files sent automatically,
| ie uuencoding them first.
| 
| My function is thus:
| 
|    :0 ah
|    | cat - ./$FILE 2>&1 | $SENDMAIL -oi -t
| 
| which is OK if $FILE is ASCII, how can I handle it if is binary?
| 
| I thought something like:
| 
|    :0 ah
|    | cat - ./$FILE 2>&1 | uuencode $FILE | $SENDMAIL -oi -t
| 
| But that does not appear to work, any help would be appreciated.

As Doug Hughes said, you're uuencoding the header and feeding sendmail the
uuencode.  What you want to do is uuencode only the body -- not the original
body, but the new body that consists of the requested file (or keep the file
to send out in uuencoded form in the first place, as Doug suggested; the
extra space that takes up may be less of a problem than freshly uuencoding
it again every time it is fetched).

Try something like this:

   :0abfi #replace body with uuencode
   | uuencode ./$FILE $FILE
    :0a # -oi not needed in newer procmails
    ! -t

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