Idea: Simplified LAN Email

I had an idea for this protocol, and I want to hear your thoughts and improvements,
and ideas for implementations.
I want to host the lan server on a Haiku box, so no servers that don’t run on Haiku :wink:

Lan Mail Protocol

Connection

Request (client)

AUTH USER <username>
AUTH PASSWD <password>

Response (server)

Valid:

AUTH ACCEPTED

Invalid:

AUTH REJECTED

Response (server) (If new messages for client)

Send

Request (client)

SEND <message length in bytes>
<message content>
TO <user>

Response (server)

Success:

SEND OK

Failure:

SEND FAILED

Receive

If the target is connected to the server:

Message (server)

NEW

When the client receives NEW:

Request (client)

GET

Response (server)

For each message server has for client

HAVE <message id>

Response (client)

If client has a message with that id
HAVE YES

Server then goes to next message

If client does not have a message with that id
HAVE NO
Response (server)
MESSAGE <message id>
SIZE <message length in bytes>
<message content>
FROM <user>
TO <user>
TIME <timestamp>

Isn’t SMTP (Simple Mail Transfer Protocol) not simple enough for your purposes?

That is just for sending, and besides, it’s more fun to roll your own.

Sounds more like LAN messaging than email to me then?

That’s what it is, although there is nothing stopping you from exposing it to the internet (besides common sense).
But it is not messaging as in chat like irc, it is closer to email.

Dukto can send text messages and files over LAN.

Dukto is a nice solution but is no longer officialy maintained (maybe somebody continued it, did not look).

There may also be Zeroconf/Avahi based chat solutions that can be used as an inspiration (Pidgin has a module for it I think, but I have not used it for years). It would then be a mater of porting/plugging the existing Zeroconf library to Chat-o-Matic or Renga. No idea of the difficulty though.

“zeroconf” or dns service discovery only discovers services, that’s all it does. It does not provide servers.

Indeed, hence my comment on checking how Pidgin implemented a simple messaging plugging (and maybe file transfer, can’t remember that one) on top of Apple Bonjour (Zeroconf) protocol.

A quick search revealed Bonjour on the Pidgin website. I hope it helps.

1 Like

You cannot. What you call bonjour or zeroconf is just DNS Service discovery over multicast DNS for local area networks.

This is not a communication protocol, it only facilitates publishing services in a LAN via DNS, nothing more. You can’t build a communication service “ontop” of it. You can only use it to discover a server, at which point you will have to implement your own server and client or use existing ones.

Maybe something like this: https://www.beebeep.net/

1 Like

One benefit of this, is that being a fairly simple standard, it is not very hard to implement (Maybe I should write a client over serial in QBASIC :rofl:)