1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
PMEP -- PMS Mail Exchange Protocol
==================================
PMEP works over HTTP (both 1.0 and 1.1, but not earlier).
The specification is a layer above HTTP which imposes specific semantics.
All HTTP requests MUST have a header called X-Secret. The contents of the
header is a secret, which should be communicated via an out-of-band channel.
A server SHOULD deny any request with no secret, or a wrong one.
Definitions:
A ``netstring'' is a string of digits, followed by a colon (``:''), followed
by as many characters as the number in front of the colon.
The URL '/' MUST be a valid folder.
The following commands can be used, when ``u'' is a valid folder:
GET u -- Response code MUST be a body, and Content-Type MUST be
text/x-netstr. Response body MUST be a concatanation of netstrings. Each
netstring is either a valid message, or a folder. Folders can be distinguished
from messages by the fact they end with a slash (``/''). The slash *is* a part
of the folder's name.
For any message, ``m'', ``u | m'' (``u'' concatanated with ``m'') is a valid
URL for a message.
For any folder, ``f'', ``u | f'' is a valid URL for a folder.
PUT u -- Request SHOULD have a Content-Length header. This will save the
request (including headers) on the server. The response MUST be
201 (created), or 404 if this is not possible.
If it is successful the response headers MUST include a ``Location''
header, whose content is of the form ``u | m'' for ``m'' a valid message
in ``u''.
The following commands can be used with a valid message ``m'':
GET m -- Response MUST be a valid HTTP response, which is also RFC822.
PUT m -- Response must be 201 (created), or 404 if this is not possible.
If it is successful, the response headers MAY include a ``Location''
header, whose value is ``m''.
DELETE m -- Response must be 206 (success, no content), or 404 if this is
not possible.
|