News for hackers. Stuff that matters.
Re:Mail-in-a-Box: a mail server in a box by forwardemail on Friday November 24, 2023 @02:26PM (#38407267)
Re:Mail-in-a-Box: a mail server in a box by codetrotter on Friday November 24, 2023 @02:31PM (#38407307)
I think having “encrypted SQLite” as a column is a bit too specific, and biased to favor your own product in the comparison. I think a more fair column would be “encrypted at rest” – even if it comes out that your own solution is the only one that ends up with a green check mark.
Re:Mail-in-a-Box: a mail server in a box by forwardemail on Friday November 24, 2023 @02:33PM (#38407326)
We also thought of renaming it to "Mailboxes Encrypted Individually". We really wanted to make it clear that each individual mailbox is encrypted. Any other suggestions?
Re:Mail-in-a-Box: a mail server in a box by robertlagrant on Friday November 24, 2023 @02:42PM (#38407419)
Why does that matter? As in if I as a user have three mailboxes, they're encrypted individually? Or each customer has their mail encrypted separately to other customers? I think the latter is worth mentioning more than the former (though if you're doing the former you're of course doing the latter also).
Re:Mail-in-a-Box: a mail server in a box by forwardemail on Friday November 24, 2023 @02:53PM (#38407534)
Correct, the former. There are no other open-source email servers (or closed even) that does the former that we know of. The deep-dive write-up is here if you want to read more https://forwardemail.net/encrypted-email.

Edit: It matters because if someone has access to the filesystem, or our MongoDB database, then they still can't read/write to your email mailbox because they don't have your IMAP password (which we only show to you _once_ for 30 seconds and render in-memory). We use ChaCha20-Poly1305 encryption on the SQLite mailboxes (which is generally considered quantum-secure[0]). Passwords are generated[1] via Node.js `crypto.pbkdf2`.

[0]: https://crypto.stackexchange.com/a/90311 [1]: https://github.com/forwardemail/forwardemail.net/blob/d537fc...

Re:Mail-in-a-Box: a mail server in a box by infogulch on Friday November 24, 2023 @08:46PM (#38410364)
I guess since you encrypt the whole sqlite db that means you can still offer indexing and FTS while remaining encrypted. But, the application would still have the encryption key in memory. So this protects against an attacker/bad-actor that can access the FS but not if they could access the memory space of the application serving mail items. Is that right?
Re:Mail-in-a-Box: a mail server in a box by forwardemail on Sunday November 26, 2023 @01:27AM (#38419620)
Correct, we offer indexing[0], regexp[1][2], and FTS5[2].

We've put a lot of effort into security hardening (e.g. disabled swap entirely, disabled usb-storage devices, disabled core dumps, disabled apport, etc).

[0]: https://github.com/forwardemail/forwardemail.net/blob/ef67fe...

[1]: https://github.com/forwardemail/forwardemail.net/blob/ef67fe...

[2]: https://github.com/forwardemail/forwardemail.net/blob/ef67fe...

[3]: https://github.com/forwardemail/forwardemail.net/blob/ef67fe...

Re:Mail-in-a-Box: a mail server in a box by robertlagrant on Saturday November 25, 2023 @01:26AM (#38411669)
Thanks for the detail. Makes sense.

On "matters" - I was distinguishing all of a customer's mailboxes being encrypted together vs their mailboxes being individually encrypted. I was saying that the former is the most useful point of comparison I'd want to see - is my data encrypted separately to other people's - not the latter. But I may not be representative.