Operating System - HP-UX
1753416 Members
6971 Online
108793 Solutions
New Discussion юеВ

Re: sendmail corrupting PGP encrypted mail attachment

 
Ted Blahunka
Occasional Advisor

sendmail corrupting PGP encrypted mail attachment

Folks,

Background:

I have a vendor who sends us a PGP encrypted
mail attachment. It goes to our Exchange
Server which then forwards the message to
the Unix mail account. (This is done for
firewall/security reasons.)

Problem:

After the file arrives in the /var/mail/
file, the attachment no longer has the PGP
header info necessary to identify it as a PGP file, and thus we canot do a decryption, so
the file is useless. When I open the file
on the NT BEFORE forwarding, the PGP header
is there. If I ftp the file from NT to Unix
and open the file, the PGP info is there. When
I forward from NT to another non-Unix mail
server, the PGP info is there, so it is
definitely related to the way sendmail is
handling the attachment.

I do not know enough about sendmail or
modifying sendmail.cf to feel safe with
the trial and error approach.

Does anyone have any idea wht this is
happening or has anyone had similar
problems??

Any help/direction is resolving would be
greatly appreciated.

Thanks

Ted Blahunka
12 REPLIES 12
Dave Kelly_1
Respected Contributor

Re: sendmail corrupting PGP encrypted mail attachment

In /etc/mail/sendmail.cf, uncomment the line beginning

#O DeliveryMode

and change it so that it reads:

O DeliveryMode=queue

Stop/start sendmail using

/sbin/init.d/sendmail stop

and

/sbin/init.d/sendmail start

then send your message again.

In /usr/spool/mqueue you will have 1 file beginning with qf and 1 file beginning with df.

The qf file is the delivery envelope and it may also contain some MIME header information relating to the message.

The df file contains the actual message.

Check to see if the PGP information is present in those files.

The standard operation of sendmail is that it does not modify the contents of the df file, it will modify the qf file as the message is in transit.
Ted Blahunka
Occasional Advisor

Re: sendmail corrupting PGP encrypted mail attachment

Dave

I'll try that and see if it makes a differnce.

One question though: If I change the
sendmail.cf file, that stops deleivery for
everyone, correct ?? Assuming that, how does ( or maybe it doesn't??) the mail then get
delivered to the user's mail boxes??

thanks

tb
Dave Kelly_1
Respected Contributor

Re: sendmail corrupting PGP encrypted mail attachment

Putting sendmail into queue mode will hold the messages up for one interval (as defined by the option -qnnm, i.e. -q30m=30 minutes).

You can force delivery my running the command sendmail -q.
Laurent Paumier
Trusted Contributor

Re: sendmail corrupting PGP encrypted mail attachment

What does your PGP header look like ?
Sendmail should not modify the body part of an email (except for lines beginning with From and maybe 8 bit characters depending on your conf).
Ted Blahunka
Occasional Advisor

Re: sendmail corrupting PGP encrypted mail attachment

I tried Dave's suggestion to change the
DeliveryMode to 'queue'. When I look at the
dfXXXXX file in etc/spool/mqueue, the PGP
info is already stripped out, so that does
not make a difference unfortunately.

The descriptor/info for the PGP is not really in the header per se, but rather an entry at the start of the file to self-designate it as a PGP file.

This is what the first few columns of the
first row looks like before we send it to the Unix mail box ( contains some control
characters so it will look funky):

? PGP? x?? ?0~?`??yT?$??e?....."

It's the ' PGP?' portion that is getting stripped out, so when we try to decrypt, the
util doesn't recognize it as PGP and we are left w/ gibberish.

Thanks all..
Dave Kelly_1
Respected Contributor

Re: sendmail corrupting PGP encrypted mail attachment

I haven't seen the contents of a PGP message before but I need to ask why you can see 8-bit (or control) characters ?

Typically messages are MIME-encoded (base64 or quoted-printable).

Have I missed something ?
Ted Blahunka
Occasional Advisor

Re: sendmail corrupting PGP encrypted mail attachment

Dave

Your guess is as good as mine. We've sent it
from the Exchange server using the default
mode, which is mime encoded and with uuencode
mode, the output looks the same regardless.

thanks

Ted
Dave Kelly_1
Respected Contributor

Re: sendmail corrupting PGP encrypted mail attachment

Can you attach an example qf and df file to this thread ?
Ted Blahunka
Occasional Advisor

Re: sendmail corrupting PGP encrypted mail attachment

Dave

Here is the df files for a mail
message w/ the pgp attachment. The qf will
follow.

Thanks

Ted