Coder Social home page Coder Social logo

Comments (15)

chrislee35 avatar chrislee35 commented on June 21, 2024 1

AFAICT, the problem is in how PGPMime for Java is adding the header to IMAP. I asked for help.

javax.mail.IllegalWriteException: IMAPBodyPart is read-only
at com.sun.mail.imap.IMAPBodyPart.setHeader(IMAPBodyPart.java:325)
at de.buelowssiege.mail.pgp_mime.gpg.GnuPGExecuter.updateHeaders(GnuPGExecuter.java:201)
at de.buelowssiege.mail.pgp_mime.gpg.GnuPGExecuter.updateHeaders(GnuPGExecuter.java:153)
at de.buelowssiege.mail.pgp_mime.gpg.GnuPGExecuter.updateHeaders(GnuPGExecuter.java:170)
at de.buelowssiege.mail.pgp_mime.gpg.GnuPGExecuter.writeBodyPart(GnuPGExecuter.java:123)
at de.buelowssiege.mail.pgp_mime.gpg.GnuPGBodyPartEncrypter.encrypt(GnuPGBodyPartEncrypter.java:89)
at de.buelowssiege.mail.pgp_mime.MimeMultipartEncrypted.createInstance(MimeMultipartEncrypted.java:92)
at de.buelowssiege.mail.pgp_mime.MimeMultipartEncrypted.createInstance(MimeMultipartEncrypted.java:67)
at [org.dhs.chrislee.IMAPCrypt.encrypt(IMAPCrypt.java:344)](https://github.com/chrislee35/IMAPCrypt/blob/master/src/org/dhs/chrislee/IMAPCrypt.java#L344)

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

from imapcrypt.

 avatar commented on June 21, 2024

I ran a dovecot server on my computer and duplicated some email there to avoid data loss!

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

Looks like I need to fix a few things before I fix this issue. I need to parse the new format of gpg --list-secret-keys output.

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

I was able to reproduce it. Now for the fun part.

from imapcrypt.

 avatar commented on June 21, 2024

I just noticed that signed only emails are not encrypted.

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

from imapcrypt.

 avatar commented on June 21, 2024

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

Ok, I've studied the problem enough to know that this will take me a good while to fix. I've got to brush up on multipart mime and my pgp encoding options again... fun times reading RFCs... or I could try a bunch of random changes and see if something works for all my test cases... I think I'll try that and then see if I can get help with the first option.

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

I got it passing the first round of tests. I had one error masking another. I'll look at the signed issue as well for my second round of tests.

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

I received mixed results on my signed test. Out of 4 messages, 3 signed messages encrypted fine with 1 throwing an error:
2018-03-30 23:16:03 ERROR IMAPCrypt:364 - The message failed to encrypt because of a IllegalWriteException: javax.mail.IllegalWriteException: IMAPBodyPart is read-only
I'm still researching

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

I still have a few signed messages that won't encrypt. They begin with:
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
For your messages that are signed, but won't encrypt, were they OpenPGP/MIME signed.

from imapcrypt.

 avatar commented on June 21, 2024

Yes most of them have the same line in the raw file! Some doesn't have anything standing out outside of the message boundaries I think?

from imapcrypt.

chrislee35 avatar chrislee35 commented on June 21, 2024

It's been a one-step-forward, two-steps-back kinda week. I'm still working this, just haven't had a lot of luck yet.

from imapcrypt.

intika avatar intika commented on June 21, 2024

Hi,
thanks for this nice tool :) ...
what's the status here ?

Do you thing encrypting the subject line would be possible ?

from imapcrypt.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.