| 1 |
<pre>Network Working Group S. Dorner |
| 2 |
Request for Comments: 1339 P. Resnick |
| 3 |
U. of Illinois at Urbana-Champaign |
| 4 |
June 1992 |
| 5 |
|
| 6 |
|
| 7 |
<span class="h1">Remote Mail Checking Protocol</span> |
| 8 |
|
| 9 |
Status of this Memo |
| 10 |
|
| 11 |
This memo defines an Experimental Protocol for the Internet |
| 12 |
community. Discussion and suggestions for improvement are requested. |
| 13 |
Please refer to the current edition of the "IAB Official Protocol |
| 14 |
Standards" for the standardization state and status of this protocol. |
| 15 |
Distribution of this memo is unlimited. |
| 16 |
|
| 17 |
Abstract |
| 18 |
|
| 19 |
This RFC defines a protocol to provide a mail checking service to be |
| 20 |
used between a client and server pair. Typically, a small program on |
| 21 |
a client workstation would use the protocol to query a server in |
| 22 |
order to find out whether new mail has arrived for a specified user. |
| 23 |
|
| 24 |
Intent |
| 25 |
|
| 26 |
This RFC defines a simple, low-overhead protocol for checking the |
| 27 |
status of a maildrop on a host. It is primarily intended for use in |
| 28 |
adjunct with "remote mail" servers such as those implementing the |
| 29 |
Post Office Protocol (<a href="./rfc1225">RFC 1225</a>). Remote mail clients must poll their |
| 30 |
servers to discover the arrival of mail. Using one of the remote mail |
| 31 |
protocols for periodic checking can be quite impractical and |
| 32 |
expensive for the server since either a constant connection between |
| 33 |
client and server must be maintained or repeated and expensive user |
| 34 |
validations must be done. Furthermore, users on less capable |
| 35 |
computers may not wish to devote the memory required to have a full |
| 36 |
implementation of the client polling for mail. Thus, we feel that an |
| 37 |
easy to implement and inexpensive to use polling scheme would be of |
| 38 |
benefit both to mail servers and their clients. |
| 39 |
|
| 40 |
Protocol Overview |
| 41 |
|
| 42 |
To avoid connection overhead, the Remote Mail Checking Protocol is |
| 43 |
based on the User Datagram Protocol (UDP), using UDP port 50 decimal |
| 44 |
(62 octal) for the server. The protocol provides for both non- |
| 45 |
authenticated and authenticated polling. Non-authenticated polling is |
| 46 |
simplest for both client and server. Authenticated polling provides a |
| 47 |
small increment of privacy, at the cost of more complexity in both |
| 48 |
client and server (but still far less than polling with one of the |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
<span class="grey">Dorner & Resnick [Page 1]</span></pre> |
| 53 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span> |
| 54 |
<span class="grey"><a href="./rfc1339">RFC 1339</a> Remote Mail Checking Protocol June 1992</span> |
| 55 |
|
| 56 |
|
| 57 |
remote mail protocols). |
| 58 |
|
| 59 |
Non-Authenticated Protocol |
| 60 |
|
| 61 |
In the non-authenticated version of the protocol, the server will |
| 62 |
listen on port 50 for maildrop check requests for users with |
| 63 |
maildrops on the machine. A client will send a single UDP datagram |
| 64 |
from a randomly chosen unreserved UDP port to UDP port 50 on the |
| 65 |
server. The datagram will contain a 32-bit (four-octet) number which |
| 66 |
is set to all zeros (0), followed by a case-sensitive ASCII string of |
| 67 |
a username on the server system. The server will find the maildrop on |
| 68 |
the system for that user and determine the amount of time that has |
| 69 |
passed since the last message in the maildrop was appended, as well |
| 70 |
as the amount of time that has passed since the maildrop was last |
| 71 |
accessed for reading. The server will then send back a single UDP |
| 72 |
datagram containing three 32-bit numbers in network byte order to the |
| 73 |
originating port on the client. Again, the first will be zero (0), |
| 74 |
the second will contain the number of seconds plus one since the last |
| 75 |
addition to the specified user's maildrop and the third will contain |
| 76 |
the number of seconds plus one since the last read on the user's |
| 77 |
maildrop. If the username provided does not exist, if the maildrop is |
| 78 |
not on the system or if the maildrop is empty, the server will send |
| 79 |
back zero (0) in the last two numbers for its reply. The client will |
| 80 |
consider the maildrop to contain new mail if the number of seconds |
| 81 |
since the last read access is greater than or equal to the number of |
| 82 |
seconds since the last addition access of the maildrop and either |
| 83 |
number is non-zero, old mail if the number of seconds since the last |
| 84 |
read access is less than or equal to the number of seconds since the |
| 85 |
last addition access of the maildrop and either number is non-zero, |
| 86 |
and empty if both numbers are zero. |
| 87 |
|
| 88 |
Authenticated Protocol |
| 89 |
|
| 90 |
The authenticated protocol operates identically to the non- |
| 91 |
authenticated protocol with the exception of the first interaction |
| 92 |
between the server and the client. After the client has sent its |
| 93 |
initial request containing the requested username, the server will |
| 94 |
send back a single UDP packet containing three 32-bit numbers. The |
| 95 |
first number will be a bit-mask instead of the normal 32-bits of |
| 96 |
zero. The bit-mask will indicate a request for authentication. Each |
| 97 |
bit in the mask represents a type of authentication that the server |
| 98 |
accepts. The bits (with the least significant bit numbered 0, and the |
| 99 |
most significant bit 31) are defined as follows: |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
<span class="grey">Dorner & Resnick [Page 2]</span></pre> |
| 109 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span> |
| 110 |
<span class="grey"><a href="./rfc1339">RFC 1339</a> Remote Mail Checking Protocol June 1992</span> |
| 111 |
|
| 112 |
|
| 113 |
0 Cleartext password The password for the maildrop, not |
| 114 |
NULL-terminated. |
| 115 |
|
| 116 |
1-23 Reserved for future use |
| 117 |
|
| 118 |
24-31 Implementation-dependent. Implementors wishing to |
| 119 |
experiment may use these. |
| 120 |
|
| 121 |
For each type of authentication that the server accepts, the |
| 122 |
corresponding bit will be set to one. All other bits will be set to |
| 123 |
zero. The last two 32-bit numbers in the reply will be set to zero. |
| 124 |
If the client supports authentication, it will send back a 32-bit |
| 125 |
mask with the bit representing the kind of authentication it is using |
| 126 |
set to one, followed by the data used for authentication. The client |
| 127 |
is free to use any of the types of authentication indicated by the |
| 128 |
authentication request from the server. If the client does not |
| 129 |
support authentication and it receives an authentication request, it |
| 130 |
SHOULD stop sending requests (though this behavior is not required). |
| 131 |
|
| 132 |
Once a valid authentication is received by the server for a |
| 133 |
particular maildrop, the server considers the IP address and UDP port |
| 134 |
of the client along with that maildrop to be an authenticated |
| 135 |
address/port/maildrop triple. From then on, normal non-authenticated |
| 136 |
transactions take place between the server and the client as |
| 137 |
described above. Should a datagram come from an authenticated |
| 138 |
address/port pair with a different username, or if some amount of |
| 139 |
time has elapsed since the last request (which is implementation |
| 140 |
dependent), the server should remove the address/port/maildrop triple |
| 141 |
from its list of authenticated triples and send another |
| 142 |
authentication request. Since the time required for an authenticated |
| 143 |
triple to become unauthenticated is implementation dependent, clients |
| 144 |
should be prepared to send an authentication reply to containing the |
| 145 |
server whenever it is requested. |
| 146 |
|
| 147 |
Server Implementation Notes |
| 148 |
|
| 149 |
Servers which implement either the authenticated or non-authenticated |
| 150 |
protocol may decide that they do not wish to reveal the actual amount |
| 151 |
of time that has passed since the last update or read from a |
| 152 |
maildrop. (See the "Security Considerations" section below for |
| 153 |
reasons some feel this is problematic.) In this case, a server may |
| 154 |
instead reply with the following: |
| 155 |
|
| 156 |
First 32 bits Second 32 bits Third 32 bits |
| 157 |
New mail 0 0 1 |
| 158 |
Old mail 0 1 0 |
| 159 |
No mail 0 0 0 |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
<span class="grey">Dorner & Resnick [Page 3]</span></pre> |
| 165 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span> |
| 166 |
<span class="grey"><a href="./rfc1339">RFC 1339</a> Remote Mail Checking Protocol June 1992</span> |
| 167 |
|
| 168 |
|
| 169 |
These values will appear to the client as correctly representing new, |
| 170 |
old or no mail respectively but will give no indication of the actual |
| 171 |
times that the changes took place. |
| 172 |
|
| 173 |
Servers implementing the non-authenticated protocol MUST provide some |
| 174 |
mechanism by which users on the system can give permission for their |
| 175 |
maildrops to accessed by the protocol. See the "Security |
| 176 |
Considerations" section below for specifics. |
| 177 |
|
| 178 |
Client Implementation Notes |
| 179 |
|
| 180 |
Clients MUST not send more than one poll (and one authentication) per |
| 181 |
minute. In particular, lack of server response should not result in |
| 182 |
retransmission. |
| 183 |
|
| 184 |
Since the last two numbers in an authentication request from a server |
| 185 |
are always 0 as are the last two numbers in a response for an empty |
| 186 |
or non-existent maildrop, clients that do not support authentication |
| 187 |
need not examine the first number in the server datagram at all |
| 188 |
(though they are encouraged to do so for the sake of proper reporting |
| 189 |
to the user). |
| 190 |
|
| 191 |
Clients can turn the modification interval into absolute time, and |
| 192 |
track the changing of this absolute time in order to discern the |
| 193 |
arrival of new mail (as opposed to the mere existence of unread |
| 194 |
mail). However, such clients should bear three things in mind. |
| 195 |
First, network delays and clock vagaries may result in small |
| 196 |
inconsistencies in times. A "slop factor" of several seconds is |
| 197 |
encouraged. Second, the reading of mail often entails modification of |
| 198 |
the maildrop; the relationship of the access and modification |
| 199 |
intervals should always be consulted. Third, the special results of |
| 200 |
(1,0) and (0,1) are most properly handled as special cases. |
| 201 |
|
| 202 |
Clients need not recall whether or not they are authenticated (though |
| 203 |
they must use a consistent port if they receive any authentication |
| 204 |
requests for a given maildrop). It is sufficient to issue requests |
| 205 |
when desired, and to respond to any authentication requests that |
| 206 |
appear. |
| 207 |
|
| 208 |
Security Considerations |
| 209 |
|
| 210 |
The are two security considerations for the protocol. The first is |
| 211 |
one mainly of privacy. Some sites and individual users consider it |
| 212 |
problematic to have information about mail arrival available freely. |
| 213 |
This can be a simple privacy issue for individuals or a security |
| 214 |
issue for highly secure sites. The authenticated version of the |
| 215 |
protocol allows sites to have a reasonable amount of security in that |
| 216 |
only people with passwords can access this information. The protocol |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
<span class="grey">Dorner & Resnick [Page 4]</span></pre> |
| 221 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span> |
| 222 |
<span class="grey"><a href="./rfc1339">RFC 1339</a> Remote Mail Checking Protocol June 1992</span> |
| 223 |
|
| 224 |
|
| 225 |
currently only uses cleartext passwords, but can be simply modified |
| 226 |
to use other authentication formats. The scheme mentioned in "Server |
| 227 |
Implementation Notes" of using only (0,1) and (1,0) in the responses |
| 228 |
also may limit access to some types of information. Implementations |
| 229 |
that do not use the authenticated scheme MUST have a mechanism by |
| 230 |
which a user can give consent to have this information made |
| 231 |
available; the default for the unauthenticated implementation should |
| 232 |
be that a user's maildrop cannot be accessed until consent of the |
| 233 |
user is given. (For example, UNIX server implementations may wish to |
| 234 |
make use of the "owner execute" bit to indicate whether a particular |
| 235 |
maildrop allows use of the unauthenticated protocol. If this is done, |
| 236 |
a single "stat" call can be used to gather all information required |
| 237 |
to respond to a poll.) Servers which do not implement authentication |
| 238 |
should simply return a zero-filled datagram for maildrops which don't |
| 239 |
have permission. |
| 240 |
|
| 241 |
The other security consideration involves unknown maildrops and |
| 242 |
usernames. Some site administrators consider it a security risk give |
| 243 |
out any information which would reveal the existence or non-existence |
| 244 |
of a certain username or maildrop on the system. For this reason, we |
| 245 |
have chosen to have the server send back a zero-filled datagram as |
| 246 |
the response to either a request for an unknown username or a |
| 247 |
maildrop that does not exist or is empty. In this way, potential |
| 248 |
security violations are limited, since there is no way to tell the |
| 249 |
difference between an empty maildrop and non-existent maildrop, and |
| 250 |
also no way to tell if the user exists on the system or not. If |
| 251 |
greater security is desired, the protocol should probably not be run |
| 252 |
in the first place. |
| 253 |
|
| 254 |
Authors' Addresses |
| 255 |
|
| 256 |
Steve Dorner |
| 257 |
Digital Computer Laboratory |
| 258 |
University of Illinois at Urbana-Champaign |
| 259 |
1304 West Springfield Avenue |
| 260 |
Urbana, Illinois 61801 |
| 261 |
|
| 262 |
Phone: (217) 244-1765 |
| 263 |
EMail: [email protected] |
| 264 |
|
| 265 |
Pete Resnick |
| 266 |
The Beckman Institute |
| 267 |
University of Illinois at Urbana-Champaign |
| 268 |
405 North Mathews Avenue |
| 269 |
Urbana, Illinois 61801 |
| 270 |
|
| 271 |
Phone: (217) 244-1265 |
| 272 |
EMail: [email protected] |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
<span class="grey">Dorner & Resnick [Page 5]</span></pre> |
| 277 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span> |
| 278 |
<span class="grey"><a href="./rfc1339">RFC 1339</a> Remote Mail Checking Protocol June 1992</span> |
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
Dorner & Resnick [Page 6] |
| 333 |
</pre> |