tacruc / gpgmailer

Send encryped emails to registered users
GNU Affero General Public License v3.0
17 stars 4 forks source link

App will not enable #2

Closed Luticus closed 4 years ago

Luticus commented 5 years ago

Cannot get the app to enable. I have the gnupg 1.4 installed via pecl am and running php7.1fpm. I get an error from generator.php on line 298 about too few arguments to a function when I run sudo -u www-data make test.

latest version of nextcloud 16, debian 9 Stretch server.

tacruc commented 5 years ago

@Luticus thanks for the feedback. I'm sorry to tell you that, the app is not ready now and will not work for the current nextcloud versions. As one requiered hook is not avalible now. As soon as https://github.com/nextcloud/server/pull/14722 is merged I will continue in making the app work.

Luticus commented 5 years ago

Oh ok, I just read through the notes on that one. Looks like this is targeted for NC17. I have a question about the nature of this app. Is this just for the mailer app or will it work for say password reset emails, share emails, etc? Because I'm super interested in encrypting those emails. If it works for those things then this app is a big priority for me. I will be testing this out as soon as it's ready :)

You should maybe consider adding a short "app not ready yet" style description to the Nextcloud app store for this app too. Might help avoid people reporting it broken when it's not ready.

Seriously looking forward to your work though. If there's anything I can do to test or help this along, I will.

tacruc commented 5 years ago

I got this question now multiple times so I will clarify it with the next update. This app is independent of the mail app. For now it will encrypt any email send from the server to registered users of the server, if the user has provided a public key. An example would be password reset emails.

@Luticus At the moment there is not much to do as it is depending on the pr, such that the app can register to the email send event. As soon the pr is merged, there is only some js and some documentation missing.

Luticus commented 5 years ago

This app is independent of the mail app. For now it will encrypt any email send from the server to registered users of the server, if the user has provided a public key. An example would be password reset emails.

This makes me very happy, that's exactly what I'm looking for! I wish my freaking bank would get on board with this :). Seems so obvious... Thanks for doing this!

Luticus commented 5 years ago

NC17 has now released, is it possible to continue development of the app now?

tacruc commented 5 years ago

The PR https://github.com/nextcloud/server/pull/14722 was still not merged. So the app doesn't get trigget, if an email is send. So as long as nobody was willing to review the PR this app is useless. (it is not more than 30 lines of code changes).

Luticus commented 5 years ago

That is officially awful. I want this app so bad! Is there anything that can be done to convince someone at nextcloud to get that code into 17.0.1? Anything that can be done to get this app made is worth doing. I'd be glad to help you out anyway I can.

tacruc commented 4 years ago

@Luticus So NC19 will include the required changes in core. I uploaded an alpha version of the app. Feel free to test it. Espacally the encoding of the emails to our Email progroamm. I just tested it against KMail, Mailbox.org.

Luticus commented 4 years ago

That right there is some fantastic news. Ironically kmail is the exact email app I use on my desktop and laptops with Debian 10 and KDE. I can possibly test it on k9 mail on android and possibly mac mail too. I'll have to build a NC 19 beta test server to check it out I imagine so I'll have to see if that's something I can get to do this weekend. I'm officially stoked!

Luticus commented 4 years ago

Got around to installing 19 beta2, and compiling the new app version and I've noticed a hand full of things.

  1. It works in kmail but it shows up with:

    Message was signed on 4/14/20 2:13 PM with unknown key
    Status: No public key to verify the signature

    Probably because the message is encrypted with a public key, but not signed with a private key. Not sure how much you can really do about this.

  2. Rainloop is completely broken with it. When I attempt to decrypt in Rainloop I get a bunch of html like structures.
    Here's a small portion where you can see the message is sucessfully decrypted though:

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
    --_=_swift_v4_1586888018_d0d69b87c2ee71ef5fa7792b267723e1_=_
    Content-Type: multipart/alternative;
     boundary="_=_swift_1586888018_c44178e071e384046426f13fd52ac016_=_"
    
    --_=_swift_1586888018_c44178e071e384046426f13fd52ac016_=_
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    
    Well done, joe!
    
    If you received this email, the email configuration se=
    ems to be correct.
    
    --=20
    Nextcloud - a safe home for all your data=
    
    This is an automatically sent email, please do not reply.
    
    --_=_swift_1586888018_c44178e071e384046426f13fd52ac016_=_
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
    w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns=3D"http://www.=
    w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en" style=3D"-webkit-font-smooth=
    ing:antialiased;background:#f3f3f3!important">
    <head>
  3. K9 mail on android looks perfect, probably just doesn't point out the fact that the message is only encrypted but not signed.

tacruc commented 4 years ago

Thanks alot for your intensive testing.

Got around to installing 19 beta2, and compiling the new app version and I've noticed a hand full of things.

1. It works in kmail but it shows up with:
   ```
   Message was signed on 4/14/20 2:13 PM with unknown key
   Status: No public key to verify the signature
   ```

I think this is because the server generates its own keypair. You can download it in the personal Setting page. Then import it with kleopatra and trust it. Then this message should vanish and you should have a nice green box around the email.

   Probably because the message is encrypted with a public key, but not signed with a private key.  Not sure how much you can really do about this.

2. Rainloop is completely broken with it.  When I attempt to decrypt in Rainloop I get a bunch of html like structures.
   Here's a small portion where you can see the message is sucessfully decrypted though:
   ```
   This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
   --_=_swift_v4_1586888018_d0d69b87c2ee71ef5fa7792b267723e1_=_
   Content-Type: multipart/alternative;
    boundary="_=_swift_1586888018_c44178e071e384046426f13fd52ac016_=_"

   --_=_swift_1586888018_c44178e071e384046426f13fd52ac016_=_
   Content-Type: text/plain; charset=utf-8
   Content-Transfer-Encoding: quoted-printable

   Well done, joe!

   If you received this email, the email configuration se=
   ems to be correct.

   --=20
   Nextcloud - a safe home for all your data=

   This is an automatically sent email, please do not reply.

   --_=_swift_1586888018_c44178e071e384046426f13fd52ac016_=_
   Content-Type: text/html; charset=utf-8
   Content-Transfer-Encoding: quoted-printable

   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
   w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   <html xmlns=3D"http://www.=
   w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en" style=3D"-webkit-font-smooth=
   ing:antialiased;background:#f3f3f3!important">
   <head>
   ```

Well I guess I have to install Rainloop and see, if I can figure out, what needs to be changed.

3. K9 mail on android looks perfect, probably just doesn't point out the fact that the message is only encrypted but not signed.

The message should allways be signed. As mentioned above I think the problem is that the key of the signature is not trusted.

Luticus commented 4 years ago

I think this is because the server generates its own keypair. You can download it in the personal Setting page. Then import it with kleopatra and trust it. Then this message should vanish and you should have a nice green box around the email.

Oh.. Yep, duh. I found the button. Don't know how I missed that one. Yep, it works fine. I tried testing with the official Nextcloud Mail app too, but it was a hot mess honestly. Not your stuff, but the app itself. I'm going to stick with rainloop for now. If there's anything other testing you'd like, please let me know.

tacruc commented 4 years ago

Do you have by any changes a rainloop account I could use to test the email encoding? I won't have time to install rainloop soon.

tacruc commented 4 years ago

@Luticus I will close this issue right, now. As I guess the app is enabling. If rainloop is important for you feel free to open a new issue for that.

Luticus commented 4 years ago

Yea, the app definitely enables at this point. And yes, rainloop support would be really nice. I'll have to figure out how to set up something that you can use to test with, or perhaps I could just send you the complete output so you can see the what's going on with it. At any rate, I'm happy to see this working, even a little. I will keep testing and let you know if I find anything that needs attention. Might open that rainloop ticket soon.