Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Encryption of stored emails

Encryption of stored emails

Scheduled Pinned Locked Moved Feature Requests
email
20 Posts 10 Posters 3.2k Views 12 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I Online
    imc67I Online
    imc67
    translator
    wrote on last edited by girish
    #1

    As we know Dovecot it storing all emails of all users in plain text and so they are all readable by the person(s) who have access to the server.

    I was wondering if it’s feasible to encrypt this for better privacy and security and found this: https://workaround.org/ispmail/buster/optional-server-based-mailbox-encryption/

    Is this something to add to Cloudron, maybe as an option for those who don’t want it?

    mehdiM 1 Reply Last reply
    7
    • imc67I imc67

      As we know Dovecot it storing all emails of all users in plain text and so they are all readable by the person(s) who have access to the server.

      I was wondering if it’s feasible to encrypt this for better privacy and security and found this: https://workaround.org/ispmail/buster/optional-server-based-mailbox-encryption/

      Is this something to add to Cloudron, maybe as an option for those who don’t want it?

      mehdiM Offline
      mehdiM Offline
      mehdi
      App Dev
      wrote on last edited by
      #2

      @imc67 Honestly, the level of extra security given by this is quite low : someone who has full access to the server will always be able to change the code running on it in order to get the decrypted stuff. However, if it's not too complicated to implement, why not 🤷

      imc67I 1 Reply Last reply
      1
      • mehdiM mehdi

        @imc67 Honestly, the level of extra security given by this is quite low : someone who has full access to the server will always be able to change the code running on it in order to get the decrypted stuff. However, if it's not too complicated to implement, why not 🤷

        imc67I Online
        imc67I Online
        imc67
        translator
        wrote on last edited by
        #3

        @mehdi the only downside of this solution is that it’s based on password only. If you’ve lost it you can’t access your encrypted mail but don’t know how that is with changing passwords? May there is a solution that the correct combination in the end of password and username can match to a key.

        1 Reply Last reply
        0
        • infogulchI Offline
          infogulchI Offline
          infogulch
          wrote on last edited by
          #4

          @imc67 I think password changes would require the user to always type in their old password. The password-derived key could be used to encrypt a second, randomly generated key that is the actual key for encrypting emails, that way a password change would only require re-encrypting the random key, not the whole mailbox. Password resets by admin would be impossible unless you did something like encrypt the old key with a key derived from the admin's password too.

          What about this: self-host your email storage & webmail, but have a cloudron running on a $5 vps that acts purely as a personal SMTP relay with pinned IP. Emails are never stored on disk, so at most a spying host can only see new correspondence as it flows. (Not perfect, but it's an improvement on just giving up.) Can cloudron be configured as an email relay for another cloudron? It would be nice if you could do that with the free version.

          robiR 1 Reply Last reply
          1
          • infogulchI infogulch

            @imc67 I think password changes would require the user to always type in their old password. The password-derived key could be used to encrypt a second, randomly generated key that is the actual key for encrypting emails, that way a password change would only require re-encrypting the random key, not the whole mailbox. Password resets by admin would be impossible unless you did something like encrypt the old key with a key derived from the admin's password too.

            What about this: self-host your email storage & webmail, but have a cloudron running on a $5 vps that acts purely as a personal SMTP relay with pinned IP. Emails are never stored on disk, so at most a spying host can only see new correspondence as it flows. (Not perfect, but it's an improvement on just giving up.) Can cloudron be configured as an email relay for another cloudron? It would be nice if you could do that with the free version.

            robiR Offline
            robiR Offline
            robi
            wrote on last edited by
            #5

            @infogulch yes, I've done it.
            You add the domain.
            You set up email for the domain.
            You create a user & get credentials.
            Then add user/credentials to other cloudron email setup to use this relay.

            Conscious tech

            1 Reply Last reply
            1
            • subvenS Offline
              subvenS Offline
              subven
              wrote on last edited by
              #6

              With SSH and root access, you can take action against security measures such as encryption at any time.

              The best change in my opinion was that normal administrators (non superadmins) of Cloudron do not have access to the backup configuration. Otherwise every admin would have been able to access the data (including email) via the backup regardless of backup encryption.

              For me as a server admin it still doesn't feel great that sensitive email data is unencrypted on an (external) server. In this case, encryption is just an additional layer, but it helps a bit. Feels like not encrypting your Windows laptop just because you don't trust Microsoft and Bitlocker....

              1 Reply Last reply
              4
              • jimcavoliJ Offline
                jimcavoliJ Offline
                jimcavoli
                App Dev
                wrote on last edited by
                #7

                A few notes would be that I agree that this is likely not a huge priority insofar as protecting the on-disk data, but it would be a nice add. That said, to the point about using passwords as keys, that's a hard no - aside from the password-changing problems, it's recognized as a Bad Idea™ by the security community:

                Verify that the architecture treats client-side secrets--such as symmetric keys, passwords, or API tokens--as insecure and never uses them to protect or access sensitive data.


                Source: https://github.com/OWASP/ASVS/blob/v4.0.2/4.0/en/0x10-V1-Architecture.md#v16-cryptographic-architectural-requirements

                1 Reply Last reply
                1
                • robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by
                  #8

                  A friend of mine created this very cool thing called PROTECT: https://github.com/jasonkresch/protect

                  Conscious tech

                  1 Reply Last reply
                  1
                  • marcusquinnM Offline
                    marcusquinnM Offline
                    marcusquinn
                    wrote on last edited by
                    #9

                    Perhaps just simple full-disc encryption for your servers and access management would cover all this in the most battle-hardened, cpu-efficient and simple way?

                    Web Design https://www.evergreen.je
                    Development https://brandlight.org
                    Life https://marcusquinn.com

                    subvenS 1 Reply Last reply
                    1
                    • marcusquinnM marcusquinn

                      Perhaps just simple full-disc encryption for your servers and access management would cover all this in the most battle-hardened, cpu-efficient and simple way?

                      subvenS Offline
                      subvenS Offline
                      subven
                      wrote on last edited by
                      #10

                      @marcusquinn FDE does not protect your data during runtime so this does nothing. You also have to somehow enter the encryption passphrase after reboots...not practical at all.

                      marcusquinnM 1 Reply Last reply
                      0
                      • subvenS subven

                        @marcusquinn FDE does not protect your data during runtime so this does nothing. You also have to somehow enter the encryption passphrase after reboots...not practical at all.

                        marcusquinnM Offline
                        marcusquinnM Offline
                        marcusquinn
                        wrote on last edited by
                        #11

                        @subven All agreed - next-best alternative to nothing though.

                        I protect my emails by making sure that I have nothing valuable to say 😂

                        Web Design https://www.evergreen.je
                        Development https://brandlight.org
                        Life https://marcusquinn.com

                        1 Reply Last reply
                        2
                        • T Offline
                          T Offline
                          tomw
                          wrote on last edited by
                          #12

                          @mehdi That is true in the case of a malicious admin. But it also places the benevolent admin in the position where they have the unencrypted data in their possession (or if full disk encryption is used, they have the keys).

                          However for some admins, mailbox encryption could also have benefits in cases where third parties attempt to gain access to data through legal disclosure orders.

                          As a journalist, I would like to be able to offer email accounts on my Cloudron to my peers. However, I would be uncomfortable being in a position where I might one day have to make a call on the validity of a disclosure order (and/or fight it in court on my users' behalf if I thought it was wrong). For me it would be much better if this responsibility rested with the users themselves.

                          In short, encryption of stored emails would be an extremely interesting feature for me.

                          mehdiM 1 Reply Last reply
                          1
                          • T tomw

                            @mehdi That is true in the case of a malicious admin. But it also places the benevolent admin in the position where they have the unencrypted data in their possession (or if full disk encryption is used, they have the keys).

                            However for some admins, mailbox encryption could also have benefits in cases where third parties attempt to gain access to data through legal disclosure orders.

                            As a journalist, I would like to be able to offer email accounts on my Cloudron to my peers. However, I would be uncomfortable being in a position where I might one day have to make a call on the validity of a disclosure order (and/or fight it in court on my users' behalf if I thought it was wrong). For me it would be much better if this responsibility rested with the users themselves.

                            In short, encryption of stored emails would be an extremely interesting feature for me.

                            mehdiM Offline
                            mehdiM Offline
                            mehdi
                            App Dev
                            wrote on last edited by
                            #13

                            @tomw Encrypting emails is literally my job ^^ What I'm saying is that this method of encryption would not offer what you are describing : a legal order could force you to implement a way to intercept the incoming emails before they are encrypted. It could even force you to intercept the password used to decrypt the email and decrypt them.

                            What you are talking about is proper end-2-end encryption, and it's quite hard to do it right 🙂

                            T 1 Reply Last reply
                            3
                            • mehdiM mehdi

                              @tomw Encrypting emails is literally my job ^^ What I'm saying is that this method of encryption would not offer what you are describing : a legal order could force you to implement a way to intercept the incoming emails before they are encrypted. It could even force you to intercept the password used to decrypt the email and decrypt them.

                              What you are talking about is proper end-2-end encryption, and it's quite hard to do it right 🙂

                              T Offline
                              T Offline
                              tomw
                              wrote on last edited by
                              #14

                              @mehdi And protecting source material is literally my job 😉

                              I said mailbox encryption could be helpful against disclosure orders - not that it provides protection in all cases.

                              This is a fast-moving issue and the situation will be different in different jurisdictions and under different threat models.

                              But here's one data point to illustrate what I'm saying: in Germany, the email provider Tutanota was ordered to intercept future incoming and outgoing emails for a user account. But the previously received and encrypted emails were unaffected:

                              The Tutanota spokeswoman said the monitoring function will only apply to future emails this account receives — it will not affect emails previously received.

                              It won't always be like this in every situation. But just as there will be times when legal orders force admins to intercept encryption passwords, there will also be times when courts do not go that far and the encryption remains effective.

                              In my scenario, the owner of the mailbox would not be anonymous. The purpose of the encryption, for me, would be much more about shifting the burden of responding to a legal request onto the user, rather than attempting to provide a bulletproof technical solution.

                              mehdiM 1 Reply Last reply
                              0
                              • T tomw

                                @mehdi And protecting source material is literally my job 😉

                                I said mailbox encryption could be helpful against disclosure orders - not that it provides protection in all cases.

                                This is a fast-moving issue and the situation will be different in different jurisdictions and under different threat models.

                                But here's one data point to illustrate what I'm saying: in Germany, the email provider Tutanota was ordered to intercept future incoming and outgoing emails for a user account. But the previously received and encrypted emails were unaffected:

                                The Tutanota spokeswoman said the monitoring function will only apply to future emails this account receives — it will not affect emails previously received.

                                It won't always be like this in every situation. But just as there will be times when legal orders force admins to intercept encryption passwords, there will also be times when courts do not go that far and the encryption remains effective.

                                In my scenario, the owner of the mailbox would not be anonymous. The purpose of the encryption, for me, would be much more about shifting the burden of responding to a legal request onto the user, rather than attempting to provide a bulletproof technical solution.

                                mehdiM Offline
                                mehdiM Offline
                                mehdi
                                App Dev
                                wrote on last edited by
                                #15

                                @tomw There's a huge difference, it's that in Tutanota's case, the emails are decrypted client-side. In this proposed process, the emails are decrypted server-side. So basically, you would still be subject to legal orders.

                                1 Reply Last reply
                                1
                                • marcusquinnM Offline
                                  marcusquinnM Offline
                                  marcusquinn
                                  wrote on last edited by
                                  #16

                                  Sounds like these journalists shouldn't be using email. 🤷

                                  Could shift the burden onto them by advising them to use email with the assumption it is public data and to move any conversations that need to be kept private to specialists in this area like Signal.

                                  Noting that NO encryption is complete when there are two parties as you cannot always guarantee the security of the receiver.

                                  Then you think, well you could have voice calls over E2E encryption - but the receiver could record calls without knowing.

                                  The ONLY secure communications is face-to-face without any electronics devices. Then, you still have the location data of the users before and after that could cross-reference their meeting to talk offline.

                                  Basically, there is no privacy from a determined spy, which move the best protection to being the legal system, and therefore good access logs and protected multi-location backups beyond reach that could at least be used to hold any information demanders to the highest possible level of standards for their lawfulness in these extraordinary data access endeavours.

                                  Web Design https://www.evergreen.je
                                  Development https://brandlight.org
                                  Life https://marcusquinn.com

                                  T 1 Reply Last reply
                                  1
                                  • marcusquinnM marcusquinn

                                    Sounds like these journalists shouldn't be using email. 🤷

                                    Could shift the burden onto them by advising them to use email with the assumption it is public data and to move any conversations that need to be kept private to specialists in this area like Signal.

                                    Noting that NO encryption is complete when there are two parties as you cannot always guarantee the security of the receiver.

                                    Then you think, well you could have voice calls over E2E encryption - but the receiver could record calls without knowing.

                                    The ONLY secure communications is face-to-face without any electronics devices. Then, you still have the location data of the users before and after that could cross-reference their meeting to talk offline.

                                    Basically, there is no privacy from a determined spy, which move the best protection to being the legal system, and therefore good access logs and protected multi-location backups beyond reach that could at least be used to hold any information demanders to the highest possible level of standards for their lawfulness in these extraordinary data access endeavours.

                                    T Offline
                                    T Offline
                                    tomw
                                    wrote on last edited by
                                    #17

                                    @marcusquinn said in Encryption of stored emails:

                                    there is no privacy from a determined spy

                                    Very true. But for a lot of journalistic work, the adversary is not a determined spy.

                                    Different security technologies are appropriate and useful in different circumstances.

                                    1 Reply Last reply
                                    1
                                    • robiR Offline
                                      robiR Offline
                                      robi
                                      wrote on last edited by robi
                                      #18

                                      I've used a non-email based "email" called Confidant Mail which is very good at the journalist type workflow and it supports unlimited file size transfers, E2E.

                                      Conscious tech

                                      marcusquinnM 1 Reply Last reply
                                      1
                                      • robiR robi

                                        I've used a non-email based "email" called Confidant Mail which is very good at the journalist type workflow and it supports unlimited file size transfers, E2E.

                                        marcusquinnM Offline
                                        marcusquinnM Offline
                                        marcusquinn
                                        wrote on last edited by
                                        #19

                                        @robi Interesting. Would that be an app dedicated to that sort of thing? Perhaps there's others?

                                        Web Design https://www.evergreen.je
                                        Development https://brandlight.org
                                        Life https://marcusquinn.com

                                        robiR 1 Reply Last reply
                                        0
                                        • marcusquinnM marcusquinn

                                          @robi Interesting. Would that be an app dedicated to that sort of thing? Perhaps there's others?

                                          robiR Offline
                                          robiR Offline
                                          robi
                                          wrote on last edited by
                                          #20

                                          @marcusquinn It's a more general tool as an attempt to fix and replace the issues with Email in general. It does that well.

                                          It just needs adoption.

                                          https://hacker10.com/computer-security/send-email-with-tor-i2p-and-gpg-using-confidant-mail/

                                          https://privacytools.io has other options too

                                          Conscious tech

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search