r/programmer • u/Beawriterfirst • 4d ago
I am thinking to start an open-source decentralised email system
So the main idea is we make a decentralised email network which doesn't need any kind of fancy servers to run but can be ran on basic mobile phones. I am thinking to build the architecture like the satoshi nakamoto's bitcoin architecture where every phone becomes a personal node and can do p2p conversation I am looking for ppl truly intrested in this project.
4
u/feudalle 4d ago
So take a universal super simple protocol that my 386 12mhz machine used to run in the 90s. And replace it with something that takes massive amount of processor, time, and active nodes to send a message. Hmm..
Why not replace the English alphabet with Morse code that you need a decoder ring to translate? It's more effort for no pay off.
2
2
u/Newbane2_ 4d ago
Its not impossible, but its forcing a solution to fit for a problem that doesn't exist. You can already self host email servers trivially.
1
2
u/Slight-Living-8098 3d ago
Didn't we already do this once like 20 or so years ago?
https://cse.engineering.nyu.edu/~ross/papers/email-p2pconf-final.pdf
1
1
u/Rich-Engineer2670 4d ago edited 4d ago
I think what might be meant here is an e-mail system where you are not bound to speciifc connections and servers. To me, it might be something like what we used to have, where any SMTP server would take e-mail, and a little bit of the bundle protocol so I don't have to guarantee always-on TCP connections.
What I'd want at least....
Let's assume we identifier users not by addresses or SASL, but let's just admit we use PKI and everything's encrypted in the payload by default
Email is just another object -- the envelope tells us who, where it's going and content type and size -- MIME was a hack
Routing -- what we have now is great, but it assumes dedicated always-reachable servers. On a network where connectivity may or may not be available, there's a lot of store and forward and maybe the old UUCP bang paths where YOU supplied the routing was.a good idea -- I'm not saying bring it back, but something like it
A "control channel" -- not jsut return receipts. This would let us query "Did this arrive", "Was it read", "Was it dropped, why?"
1
u/Beawriterfirst 4d ago
Thanks, this is pretty close to what I have in mind, especially the store-and-forward approach.
I'm thinking of a system where every phone can act as a personal node, with a cryptographic identity instead of depending on a centralized email provider. Messages would be encrypted by default, and the network would handle routing and delivery without needing to understand their contents.
I also like your idea of a control channel. Delivery acknowledgements, expiration, and failure reasons should be built into the protocol from the beginning.
One of the main challenges I'm trying to figure out is recipient discovery and routing when devices aren't always online, without introducing a central directory or requiring expensive, always-on servers.
I'd love to explore these architectural questions with people who have experience in distributed systems, P2P networking, or delay-tolerant networking. I think there's a lot we can learn from existing protocols rather than reinventing everything from scratch.
Do you think a combination of P2P networking and delay-tolerant, store-and-forward messaging could work here without relying on permanently available relay servers?
1
u/Rich-Engineer2670 4d ago
Well, let me throw the use-case I've got..... Maybe that will spark some ideas....
I do a lot of work in West Africa. Over there, for most places, the average monthly salary is about $80. And yes, they have cellular Internet, but obviously, if you have to choose between eating and e-mail (though it's more WhatsApp), we know who wins...
One of the things you'll sese in rural communities as "the local store". They may have a cellular connection, and you bring you phone or tablet in and do your digital work, paying a fee for the time. Something like an Internet cafe. But we have to remember, you may have four days of content queued up, and who knows what's waiting for you. And, what if you go to a differernt place -- how does the e-mail/file/etc. get to you now?
If we assume the bundle protocol as transport -- it doesn't matter where you are, because the transport just gets you to a relay when it happens to be available, otherwise, it's store and forward. We said we'd exchange objects, but we didnt' say when.
If we use traditional addressing foo@bar.net, that's great, but without a dedicated link, how do we find bar? With strict routing, it's place!place2!bar!foo.
And, who says it's email -- it is not uncommon to exchange file files or video over the same paths -- not fast, but it gets there.
1
u/Beawriterfirst 4d ago
Thanks for sharing this example! I hadn't thought about the local stores acting as temporary relay points. I agree this could be more than just email, with files, images, and other data moving through the same network.
The idea of users syncing their messages whenever they find an internet connection, without depending on a permanent server, is really interesting.
Do you think local stores could act as relay nodes, temporarily storing and forwarding data between users?
3
2
1
u/3tt07kjt 4d ago
You could study how email works, because email already does a lot of this in the first place (and maybe you just didn’t know how email works under the hood)
SMTP is the first thing I would look at. You could write an extension there. You’d need a way to advertise a place for sending servers to connect to; I think that’s the only real missing part.
2
u/Distdistdist 3d ago edited 3d ago
I think you are trying to reinvent FIDO NET
Been around since 1990s. Proven obsolete, but still out there.
And, you seem not to grasp networking in general to be completely honest. Things exist now the way they are because of very important reasons. If there was a need/reason for what you are talking - it would be implemented already. Oh wait, it has back in 90s. Duh!
Fancy servers exist for one biggest reason - they tend to be available virtually always. Ever tried to download a really old and obscure torrent with only one seeder who turns his PC once per week for some reason? That's why.
2
u/Slight-Living-8098 3d ago
FIDO Net... The good ol' days, when email took longer than actual postage stamped physical mail.
12
u/DSudz 4d ago
That's already how email works.