We're trying to sign e-mails with the following openssl-command:

openssl smime -sign \
-signer ${PEM_FILE} \
-text \
-out $OUTFILE.tmp \
-inkey ${PEM_FILE} \
-in "$INFILE" \
-from "$FROM" \
-to "$TO" \
-subject "$SUBJECT"

Unfortunatly the signature of the signed e-mail is broken, because
someone (openssl?) changes the unix-linebreaks (LF) into ms-dos/windows
linebreaks (CR+LF) after the e-mail has been signed.

The CR+LF-problem exists right after the openssl-command in
$OUTFILE.tmp, so it's not a problem of sendmail/postfix or something
like that.

The signatur is correct if I recode $OUTFILE.tmp:

recode -f ibmpc..latin1 $OUTFILE.tmp

Is it correct, that openssl changes the linebreaks? How kann I sign
e-mails without having to redecode the final e-mail?

Best regards,

Peer Heinlein

Heinlein Professional Linux Support GmbH
Linux: Akademie - Support - Hosting

Tel: 030 / 40 50 51 - 0 *** Fax: - 19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein *-- Sitz: Berlin
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org