OK I did all of that:

  echo "Content-Type: application/x-zip-compressed;" >
/users/email/attach.txt
  echo "      name=\""$f_name"\"" >> /users/email/attach.txt
  echo "Content-Transfer-Encoding: base64" >> /users/email/attach.txt
  echo "Content-Disposition: attachment;" >> /users/email/attach.txt
  echo "      filename=\""$f_name"\"" >> /users/email/attach.txt
  /opt/apache/ssl/bin/openssl base64 -in /users/ali/$f_name >>
/users/email/atta
ch.txt
  /opt/apache/ssl/bin/openssl smime -encrypt \
  -in /users/email/attach.txt \
  /users/email/Trob.pem \
  | /usr/sbin/sendmail [EMAIL PROTECTED]

Now this works great without the encryption.  But when I add the encryption
I show that it is encrypted, little lock, has an attachment, little paper
clip, and is named correctly but it is zero bytes.  Also I can see the file
in the message source.

Any ideas?
----- Original Message -----
From: "Dr. Stephen Henson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 4:13 PM
Subject: Re: Encrypted attachments


> On Wed, Mar 31, 2004, Dave wrote:
>
> > Here is how I am doing it:
> >   uuencode /users/ali/$f_name  $f_name \
> >   | /usr/local/ssl/bin/openssl smime -encrypt \
> >    /users/email/Trob.pem \
> >   | /usr/sbin/sendmail [EMAIL PROTECTED]
> >
> > The details tab seems to show the file just fine:
> > begin 644 eei.zip
> > [EMAIL PROTECTED](`"16CRZ,@
> >
> > However Outlook does not show this as an attachment.  Unencrypted it
looks
> > about the same but Outlook sees it as an attachment.
> >
>
> That's because its uuencoded and not MIME. Base64 encode it with something
> like this:
>
> openssl base64 -in whatever.zip -out whatever.b64
>
> then precede that with appropriate MIME headers for example:
>
> Content-Type: application/x-zip-compressed
> Content-Transfer-Encoding: base64
>
> If you can get that to show up as an attachment then try it with the smime
> command. You could also try creating an email with outlook with an
attachment
> and copying what it does.
>
> Steve.
> --
> Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
> OpenSSL project core developer and freelance consultant.
> Funding needed! Details on homepage.
> Homepage: http://www.drh-consultancy.demon.co.uk
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to