How to debug email and attachment handling

Hello Martijn,

one of our clients receives encrypted emails with a single small text attachment, send by some specialized appliance.

The problem is, that after decryption, the attachment seems to have disappeared. Since the attachment only contains one or two lines of text, it isn't helpful to compare the size of the email before and after decryption.

Which loggers do I have to switch to debug to see, what happens to the attachment?

Since there is a large number of other emails with attachments, which are decrypted correctly, I doubt that it is a Djigzo problem. But at least we have to proof it.

Kind regards,

Stefan

Hello Martijn,

one of our clients receives encrypted emails with a single small text attachment, send by some specialized appliance.

The problem is, that after decryption, the attachment seems to have disappeared. Since the attachment only contains one or two lines of text, it isn't helpful to compare the size of the email before and after decryption.

Do you have the MIME source of a message after decryption? or is it
completely empty?

Are there any error messages in the MPA log?

Which loggers do I have to switch to debug to see, what happens to the attachment?

Since there is a large number of other emails with attachments, which are decrypted correctly, I doubt that it is a Djigzo problem. But at least we have to proof it.

The first thing to find out how you can detect which mails should be
watched for. One option would be to add a matcher/mailet to config.xml
which matches for a specific recipient and then send a copy of the email
to some other address before and after decryption.

You might also do this in Postfix I think with recipient_bcc_maps

http://www.postfix.org/postconf.5.html#recipient_bcc_maps

Then if you have the message source before and after decryption we can
further analyse it

Kind regards,

Martijn Brinkers

···

On 07/02/2014 05:25 PM, Stefan Michael Guenther wrote:

--
CipherMail email encryption

Open source email encryption gateway with support for S/MIME, OpenPGP
and PDF messaging.

Twitter: http://twitter.com/CipherMail

For the record, since it might help someone else having a similar
problem, it turned out that the message was correctly decrypted however,
the resulting message was opaquely signed. An opaquely signed message
can only be read with an S/MIME aware application (a clear signed
message can be read like a normal email). Since the mail application
that had to extract the attachment was not capable of reading S/MIME
opaque signed email, it did not detect the attachment. The solution was
to have the gateway remove the digital signature by checking the
advanced S/MIME setting "Remove signature". The will remove the S/MIME
signature which then results in a normal email with the attachment.

Kind regards,

Martijn Brinkers

···

On 07/02/2014 05:25 PM, Stefan Michael Guenther wrote:

Hello Martijn,

one of our clients receives encrypted emails with a single small text
attachment, send by some specialized appliance.

The problem is, that after decryption, the attachment seems to have
disappeared. Since the attachment only contains one or two lines of
text, it isn't helpful to compare the size of the email before and
after decryption.

Which loggers do I have to switch to debug to see, what happens to
the attachment?

Since there is a large number of other emails with attachments, which
are decrypted correctly, I doubt that it is a Djigzo problem. But at
least we have to proof it.

--
CipherMail email encryption

Open source email encryption gateway with support for S/MIME, OpenPGP
and PDF messaging.

Twitter: http://twitter.com/CipherMail