RFC 1756

Remote Write Protocol - Version 1.0

πŸ“… published January 1995, from ietf

RFC 1756: REMOTE WRITE PROTOCOL - VERSION 1.0 πŸŽ€

(Part 1 of 2) πŸ¦‹

okay bestie, this one's from T. Rinne at HUT 🌸 and it's from the Network Working Group πŸ’œ . It's dated January 1995 πŸ“… and it's marked as Experimental πŸ§ͺ. It doesn't list anything it obsoletes or updates, so no drama there ✨


Status of This Memo πŸ“œ

So this memo defines an Experimental Protocol for the Internet community πŸ§ͺ. It does not specify an Internet standard of any kind, so don't go treating it like one πŸ™ˆ. They want feedback and suggestions for improvement πŸ’¬, and distribution of this memo is unlimited 🌈, so share it freely.


1. Background πŸ•°οΈ

Sometimes you just want something lighter than email πŸ’–, and honestly even talk(1) *) can feel like overkill πŸ™„. We wanted to offer users something like the UNIX command write(1) ***), except it can also pass messages through the network instead of staying on a single host 🌐.

Few programs have offered this kind of service 🀏. The ones that did were either based on the SUN-RPC protocol, or they used a strictly undocumented protocol πŸ’€.

This document describes a simple Remote Write Protocol (RWP) that should have been documented at least 10 years ago. But late is better than never 🫢. The version number of the RWP protocol in this document is 1.0 πŸ”’.


2. Overview ✨

RWP is a simple protocol that can relay short messages through the network to other users πŸ“¨. It looks pretty much like Simple Mail Transfer Protocol (SMTP) ****), though it's a bit more complicated because the RWP session is interactive πŸ”.

Here's the idea behind an RWP session: the client program that's relaying a message to the host where the target user is logged in opens a tcp or udp connection to the server program running on the target machine πŸ–₯️. Then the client gives the sender's and recipient's identification (usually login ids), plus the actual message body, and tells the server to deliver a message to the user πŸ’Œ.

On a tcp connection, the server returns a status for each action taken βœ…. On a udp connection, no responses are sent 🀐. RWP sessions through udp are implemented to support message broadcasting πŸ“‘, which is giving main character energy πŸ‘‘.

Message delivering methods aren't defined in this document, but the basic method could be a simple write to the user's terminal. That's basically what the UNIX command write(1) does πŸ–ŠοΈ. Depending on the server implementation, each user might be able to personally configure the delivery method πŸ›ŽοΈ.


3. Description πŸŽ›οΈ

The server program answers each command with a response πŸ’¬. All responses have two parts: a three-number unique response code, and a short textual explanation of the response πŸ”’. Also, whenever the server is ready to accept new commands, a notification is submitted to the client πŸ””.

There are three kinds of commands in RWP 🫧. The first group is for querying the status of the server. The second group is the actual message handling commands. The last set is for RWP session control πŸŽ€.

When the server is ready to receive a command from the client, it sends message code 100 to the client. It looks like this:

100 Ready.

Server commands are as follows:

Status Query πŸ”

HELP πŸ†˜

HELP gives a short help message that contains the legal RWP commands πŸ“š. Help lines have code 510. The example RWP implementation *****) gives the following response to the HELP command:

510 Valid commands are:
510     BYE,    DATA,   HELP,   HELO,
510     RSET,   SEND,   PROT,   QUIT,
510     VRFY,   VER
510     FROM senderlogin
510     FHST senderhost
510     TO   recipentlogin [tty]
510     FWDS current_hop_count

HELO πŸ‘‹

HELO says hello to the server πŸ₯°. The server's response to the HELO command has code 500. For example:

500 Hello remote.host.  This is local.host speaking.

PROT πŸ“‹

PROT asks the server for the RWP protocol version πŸ”–. The response code to PROT is 502. The protocol version described in this document is RWP 1.0, and the response looks like this:

502 RWP version 1.0.

VRFY πŸ”

Once the recipient of the message is set by the TO command (described later), you can check whether delivery is possible by using VRFY πŸ•΅οΈβ€β™€οΈ. If the message can be delivered, the response code is 108. If the message is about to be forwarded, the response code is 110, and the message takes one of these forms:

110 Recipient ok to forward.

or, if the server can tell where the forwarding is going:

110 Recipient ok to forward <user@host.domain>.

Other possible response codes are 669, 670, 671, 674 and 677. They all indicate that message delivery is currently impossible, one way or another 🚫. Descriptions of the codes come later in this document πŸ“–.

After the SEND command, the server may also send an autoreply from the remote user before the actual response code πŸ€–. Autoreply lines have code 300.

VER 🏷️

VER asks for the version of the server program 🧾. The response code to VER is 501, and the textual part of the response is the name and version number of the RWP server. For example:

501 Rwrited version 1.0.

More in part 2 🧚

4. Response Codes ✨

okay bestie, here are every single legal response code the RWP server can send, each with a little explanation πŸ’… only the numeral codes actually matter πŸ™ˆ the text can say basically anything. but in response 110 there might be useful info hiding between '<' and '>' characters πŸ‘€ no '<' or '>' should appear in any other response. and 502 spills the tea on which RWP protocol version the server supports 🫢

100 Ready.

The RWP server is ready to accept the next command. 🌸

101 Goodbye.

The RWP server is closing the connection. πŸ‘‹

103 Message delivered.

The SEND command is successfully completed and the message is delivered directly to its destination. πŸ’–

104 Message forwarded.

The SEND command is completed and the message is forwarded to the user. πŸ¦‹

105 Sender ok.

The FROM command was successful. ✨

106 Recipient ok.

The TO command was successful. πŸŽ€

107 Message ok.

The DATA command was successful. πŸ’œ

108 Recipient ok to send.

The VRFY command was successful and direct message delivery is possible. 🧚

109 RSET ok.

The RWP server got the RSET command and reset itself. 🫧

110 Ok to forward.

or

110 Ok to forward <user@host.domain>.

The VRFY command was successful and direct message delivery by forwarding is possible. If the response also includes a forwarding address, the client can either forward the message itself or hand it to the server for forwarding. πŸ”₯

111 Original sender host ok.

The FHST command was successful and the original sender host is set as given by the client. πŸ“

200 Enter message.  Single dot '.' on line terminates.

The RWP server is ready to receive the message. A single dot on a message line terminates the message. 🌈

300 |I'm not in right now but I'll be back tomorrow
300 |at 8 o'clock a.m.

this is the automatic reply to the delivered message πŸ“© every line of the user-defined reply comes in its own 300 line. 300 lines may only appear after the SEND command and before response 103 (message delivered). a client receiving an autoreply 300 should show the text of the autoreply to the user. the actual autoreply line starts after the '|' character in the line. ✨

500 Hello remote.host.  This is local.host speaking.

this is the response to the HELO command. it can also show up at the start of the conversation without the VER command, and it can be ignored. πŸ‘‹

501 Rwrited version X.X.

this is the response to the VER command. it can also show up at the start of the conversation without the VER command, and it can be ignored. πŸ™ˆ

502 RWP version 1.0.

this is also a response to the VER command. it can also show up at the start of the conversation without the VER command, and it can be ignored. this one is the juicy one for version info πŸ’…

510 Valid commands are:
510     BYE,    DATA,   HELP,   HELO,
510     RSET,   SEND,   PROT,   QUIT,
510     VRFY,   VER
510     FROM senderlogin
510     FHST senderhost
510     TO   recipentlogin
510     FWDS current_hop_count

this is the response to the HELP command, aka the server's little cheat sheet πŸ“

511 Information to the user.

this is informational and specific to each server. it can pop up at any time during the conversation, and the client can ignore it. 🫢

512 Debug information to the user.

this is also informational and server-specific, but it's reserved for server debugging. it can pop up at any time during the conversation, and the client can ignore it. πŸ§ͺ

666 FATAL ERROR!

the RWP server hit a fatal error and is about to exit immediately. client programs are strongly encouraged to close the connection. this one is a whole emergency, bestie 🚨

668 Syntax error.

the RWP server received an invalid command. πŸ™…β€β™€οΈ

669 Permission denied.

the RWP server can't deliver the message because the target user has denied send permission. 🚫

670 User not logged in.

the RWP server can't deliver the message because the target user isn't logged in. πŸ’€

671 No such user.

the RWP server can't deliver the message because the target user doesn't exist. response 670 can be used to replace this one. πŸ«₯

672 No message.

the DATA command was ended with an empty message body. no SEND command can run until a new DATA command is given. πŸ“­

673 FROM command required.

you tried to give the SEND command before FROM. oops 😭

674 TO command required.

you tried to give the SEND command before TO. 😭

675 DATA command required.

you tried to give the SEND command before DATA. 😭

676 Forward limit exceeded.

this is the response to a FWDS command whose argument went over the server's specific limit on message forwarding steps. πŸ›‘

677 Unable to forward message.

or

677 Unable to forward message to <user@host.domain>.

this is the response to a SEND or VRFY command when forwarding is attempted and the server's specific limit on forwarding steps has been exceeded, or when forwarding has failed some other way. if forwarding fails with message 669, 670 or 671, the server will not use response 667. instead it gives the response that matches the error that happened. if message 677 includes the address the message was going to be forwarded to, the client may try to deliver it itself. πŸ¦Έβ€β™€οΈ

698 Unknown error.

the RWP server ran into an internal error that is not fatal. 🩹

699 Unknown error.

the RWP server ran into an unknown error that is not fatal. πŸŒ€


5. RWP Compliant Software πŸŽ€

simple RWP 1.0 compliant server and client software, RWrite-1.1, will be available during the fall of 1994. πŸ‚


6. Security of RWP πŸ”

okay this section is serious, so please pay attention 😭 RWP version 1.0 doesn't have any way to verify the identity of the user connecting to the RWP server program. you can identify the sender using the ident service, but not all hosts support that yet. this weakness is the same as the one in the SMTP protocol. cryptographic user verification and message hiding are under development and are going to be defined in RWP version 2.0 during the year 1995. πŸ•΅οΈβ€β™€οΈ

the RWP server may also let an intruder find out user IDs on the target host by trying the TO and VRFY commands. this weakness is also present in SMTP. however, it is possible to build servers that never give message 671 (no such user) and use response 670 (user not logged in) instead. 🫣

another way to boost security, even within RWP-1.0 as described in this document, is to design RWP servers so they don't deliver messages straight to the user. instead they connect to some kind of RWP agent process that each user who wants to receive RWP messages runs. this user-configurable message agent can then decide whether to deliver the message to the user and which delivery method to use. the message agent is the best way to stop a hostile user from flooding the user's terminal with uncontrolled messages. πŸ›‘οΈ

the sample implementation (RWrite-1.0) of the RWP server supports user configuration files, where each user can either allow or deny messages from some user(s), host(s) or network domain(s). support for message agents is currently under development. πŸ› οΈ

the user receiving the message should be able to define characters to be stripped from incoming messages, so their terminal doesn't get messed up. πŸ–₯️


7. RWP Connection Type πŸ”Œ

it is suggested that tcp (and udp) port 18 should be allocated for rwp in future versions of RFCs that list the reserved tcp/udp/rpc ports. right now port 18 is assigned to a service called Message Send Protocol (msp), which isn't known to be implemented. actually, port 18 isn't defined at all in the /etc/services file of any common UNIX-like system. the entry for the /etc/services file would look like this:

    rwrite    18/udp       # RWP rwrite
    rwrite    18/tcp       # RWP rwrite

if the RWP-compliant daemon program is /usr/sbin/rwrited, the entry for the /etc/inetd.conf file would be:

    rwrite  stream  tcp  nowait  nobody  /usr/sbin/rwrited rwrited

🧚


8. Character quotation πŸ’«

to offer a safe way to transfer different character sets, RWP defines a way to quote characters in both messages and autoreplies. RWP uses quotation that's similar to the MIME quoted-printable encoding. a quoted character is written as an '=' sign followed by a two-character hex code. that also means every '=' sign has to be quoted. quoting is also needed when a message contains a line with only a single dot '.' in it. πŸ™ˆ

for example:

                '.'  ->  =2E
                '='  ->  =3D
                '\a' ->  =07
                '\t' ->  =09

9. Security Considerations 🚨

security issues are not discussed in this memo. πŸ™ƒ


10. Author's Address πŸ–‹οΈ

   Timo J. Rinne
   Helsinki University of Technology.
   Cirion oy
   PO-BOX 250
   FIN-00121
   Helsinki, Finland

   EMail: Timo.Rinne@hut.fi
πŸ“¦ where this page comes from