![]() |
Version 5.1 |
||||||||||||||||||||||||||||||||
|
|
Each message should be formatted as an XML document.
A client asks the Server to take actions and/or to retrieve data by sending a request message. Each request message must contain the id attribute.
When the Server completes the requested operation, it sends back a response message:
Examples:
A client can send the next request message without waiting for the current request response (pipelining).
The Server can send data messages to the client:
Examples:
Note: a Client must send some command to the Server at least once in 10 minutes, otherwise the Server closes the connection.
If the server returns a positive response, the client should start SSL/TLS negotiations immediately.
The Server sends the following data messages:
Examples:
When the specified SASL method involves sending a challenge to the client,
it is sent as a challenge data message, with the value attribute
containing the base64-encoded SASL protocol challenge data.
The client should respond by sending an auth request with the same id
attribute as one used in the login request, and the value attribute
containing the base64-encoded SASL protocol response data.
Example (see RFC2195):
attributes:
attributes:
attributes:
attributes:
attributes:
body:
attributes:
The Server can send the following service data messages at any time:
attributes:
body:
The Server can send the following data messages:
Example:
The Client reads the default (english) vocabulary.
Note: all non-ASCII mailbox names are specified using the UTF-8 charset (and not the IMAP UTF-7 encoding method).
attributes:
The Server sends the following data messages:
The client should maintain an internal "view" of the Folder and
it should keep that view synchronized with the Server view implemented as a Folder.
Initially the internal view is a table with empty rows.
When a Folder is opened, the Server sends a folderReport data message containing the total number of messages in the Folder. This number is used by the client to create the initial internal view Table.
To display the mailbox content on the screen, the client checks which rows of its internal view table it should use. If some of those rows are empty, the client should ask the Server to send it the information about the Folder messages specified by their index values (positions) in the sorted view (in the Folder).
The "on demand" client-server synchronisation model is used. When a message in a Folder is modified, added, or deleted, the client gets a folderReport data message with the mode attribute value set to notify.
The newly added messages do not become visible in the Folder and the deleted messages are not removed from the Folder. Requests to retrieve data from a deleted message return no data items or empty data items.
When the client application is ready to update its internal mailbox view, it should send a folderSync request:
The Server sends folderReport data messages. The data message mode attribute has the removed, added, or updated value.
After a folderReport notify-mode data message has been sent and before the Server receives the folderSync request, the Server may not sent new folderReport notify-mode data messages when more changes take place in the mailbox.
The client can send requests to the Server asking for certain update operations (such as message deletion), but it should update its internal view only when the Server sends it a folderReport data message informing the client about actual changes in the mailbox.
A UID-set is a set of UID XML elements. Each element body is a number - a UID of a mailbox message to use in the request.
The Server sends the following data messages:
Example 1:
C:<folderBrowse id="A002" folder="INBOX" indexFrom="0" indexTill="3" />
S:<folderReport folder="INBOX" index="0" UID="123">
<FLAGS>Seen,Deleted</FLAGS><From>John H. Smith</From><Subject>Hello - just a test</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="1" UID="543">
<FLAGS>Seen,Answered</FLAGS><From>Jim Spammer</From><Subject>This is the best offer!</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="2" UID="343">
<FLAGS>Seen,Media</FLAGS><From><user@example.com></From><Subject>Meeting reminder</Subject>
</folderReport>
S:<folderReport folder="INBOX" mode="notify">
S:<folderReport folder="INBOX" index="3" UID="512">
<FLAGS>Seen,Flagged</FLAGS><From><Admin@hq.example.com></From><Subject>Shutdown @ 4:45AM</Subject>
</folderReport>
S:<response id="A002" />
S:<folderReport folder="INBOX" mode="notify">
C:<folderBrowse id="A003" folder="INBOX" indexFrom="0" indexTill="3" />
S:<folderReport folder="INBOX" index="0" UID="123">
<FLAGS>Seen,Deleted</FLAGS><From>John H. Smith</From><Subject>Hello - just a test</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="1" UID="543">
<FLAGS>Seen,Answered</FLAGS><From>Jim Spammer</From><Subject>This is the best offer!</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="2" UID="343">
<FLAGS>Seen,Media</FLAGS><From></From><Subject></Subject>
</folderReport>
S:<folderReport folder="INBOX" index="3" UID="512">
<FLAGS>Seen,Flagged</FLAGS><From><Admin@hq.example.com></From><Subject>Shutdown @ 4:45AM</Subject>
</folderReport>
S:<response id="A003" />
C:<folderSync id="A004" folder="INBOX" />
S:<folderReport folder="INBOX" index="35" UID="117" mode="deleted" messages="233" />
S:<folderReport folder="INBOX" index="2" UID="343" mode="deleted" messages="232" />
S:<folderReport folder="INBOX" index="1" UID="976" mode="added" messages="233" >
<FLAGS>Recent</FLAGS><From>CGatePro Discussions</From><Subject>[CGP] Re: Session Timer?</Subject>
</folderReport>
S:<response id="A004" />
C:<folderBrowse id="A005" folder="INBOX" indexFrom="0" indexTill="3" />
S:<folderReport folder="INBOX" index="0" UID="123">
<FLAGS>Seen,Deleted</FLAGS><From>John H. Smith</From><Subject>Hello - just a test</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="1" UID="976">
<FLAGS>Recent</FLAGS><From>CGatePro Discussions</From><Subject>[CGP] Re: Session Timer?</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="2" UID="543">
<FLAGS>Seen,Answered</FLAGS><From>Jim Spammer</From><Subject>This is the best offer!</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="3" UID="512">
<FLAGS>Seen,Flagged</FLAGS><From><Admin@hq.example.com></From><Subject>Shutdown @ 4:45AM</Subject>
</folderReport>
S:<response id="A005" />
Example 2:
Example 3:
C:<folderSync id="A021" folder="INBOX" />
S:<folderReport folder="INBOX" index="1" UID="976" mode="updated" >
<FLAGS>Recent,Deleted</FLAGS><From>CGatePro Discussions</From><Subject>[CGP] Re: Session Timer?</Subject>
</folderReport>
S:<folderReport folder="INBOX" index="3" UID="512" mode="updated" >
<FLAGS>Seen,Deleted,Flagged</FLAGS><From><Admin@hq.example.com></From><Subject>Shutdown @ 4:45AM</Subject>
</folderReport>
S:<response id="A021"/>
C:<folderExpunge id="A022" folder="INBOX" />
S:<folderReport folder="INBOX" mode="notify">
S:<response id="A022"/>
C:<folderSync id="A023" folder="INBOX" />
S:<folderReport folder="INBOX" index="0" UID="123" mode="deleted" messages="232" />
S:<folderReport folder="INBOX" index="0" UID="976" mode="deleted" messages="231" />
S:<folderReport folder="INBOX" index="29" UID="446" mode="deleted" messages="230" />
S:<folderReport folder="INBOX" index="123" UID="756" mode="deleted" messages="229" />
S:<folderReport folder="INBOX" index="1" UID="512" mode="deleted" messages="228" />
S:<response id="A023"/>
C:<closeMailbox id="A024" folder="INBOX" />
S:<response id="A024"/>
C:<messageAppend id="A001" targetMailbox="Sent" flags="Seen,Answered" mailboxClass="" >
<EMail>
<From realName="Sender Name">fromName@domain</From><Subject>I'll be there!</Subject>
<To realName="Recipient Name">toName@domain</To><X-Mailer>SuperClient v7.77</X-Mailer>
<MIME type="text" subtype="plain">Dear Susan,�A;�A;I will come to your place tomorrow, thank you for the invitation!�A;Mary.�A;</MIME>
</EMail>
</messageAppend>
S:<response id="A001"/>
This operation adds the following message to the mailbox:
|
To create messages with file attachments, put the files into the "uploaded file set" first. Then you can specify them in the MIME elements by using the uploadID attribute.
C:<messageAppend id="A001" targetMailbox="Drafts" flags="Draft">
<EMail>
<From realName="Sender Name">fromName@domain</From><Subject>Text with attachments</Subject>
<To realName="Recipient Name">toName@domain</To><X-Mailer>SuperClient v7.77</X-Mailer>
<MIME type="multipart" subtype="mixed">
<MIME type="multipart" subtype="alternative">
<MIME type="text" subtype="plain">Dear Susan,�A;�A;I will come to your place tomorrow, thank you for the invitation!�A;Mary.�A;</MIME>
<MIME type="text" subtype="html"><html><body><i>Dear Susan,</i><p>I will come to your place tomorrow, thank you for the invitation!<p><i>Mary.</i></MIME>
</MIME>
<MIME uploadID="att01" />
<MIME uploadID="att02" />
</MIME>
</EMail>
</messageAppend>
S:<response id="A001"/>
C:<clearUploaded id="A002" />
S:<response id="A002"/>
This operation adds the following message to the mailbox:
|
To create messages with MIME parts (attachments) copied from other messages stored on the Server, use the copyMIME element instead of a MIME element:
C:<messageAppend id="A001" targetMailbox="Notes" flags="Seen">
<EMail>
<From realName="Sender Name">fromName@domain</From>
<Subject>Vacation Pictures</Subject>
<MIME type="multipart" subtype="mixed">
<MIME type="text" subtype="plain">The first part of the underwater shots.</MIME>
<copyMIME folder="INBOX" UID="156" partID="3"/>
<copyMIME folder="INBOX" UID="156" partID="4"/>
</EMail>
</messageAppend>
S:<response id="A001"/>
C:<messageSubmit id="A001" useDSN="yes" >
<EMail>
<From realName="Sender Name">fromName@domain</From><Subject>I'll be there!</Subject>
<To realName="Recipient Name">toName@domain</To><X-Mailer>SuperClient v7.77</X-Mailer>
<Bcc>bccName@domain</Bcc>
<MIME type="text" subtype="plain">Dear Susan,�A;�A;I will come to your place tomorrow, thank you for the invitation!�A;Mary.�A;</MIME>
</EMail>
</messageSubmit>
S:<response id="A001"/>
C:<messageSubmit id="A001" targetMailbox="Sent Items" flags="Seen" >
<Envelope-To>a1@domain address</Envelope-To>
<Envelope-To>a2@domain address</Envelope-To>
<EMail>
<From realName="Sender Name">fromName@domain</From><Subject>I'll be there!</Subject>
<To realName="Recipient Name">toName@domain</To><X-Mailer>SuperClient v7.77</X-Mailer>
<Cc>ccName@domain</Bcc>
<MIME type="text" subtype="plain">Dear Susan,�A;�A;I will come to your place tomorrow, thank you for the invitation!�A;Mary.�A;</MIME>
</EMail>
</messageSubmit>
S:<response id="A001"/>
C:<messageSubmit id="A001">
<EMail>
<From realName="Sender Name">fromName@domain</From>
<Subject>Fwd: Sorry, I cannot make it :-(</Subject>
<To realName="Recipient Name">a1@domain</To><X-Mailer>SuperClient v7.77</X-Mailer>
<MIME type="multipart" subtype="mixed">
<MIME type="text" subtype="plain">Dear Susan,�A;�A;Attached please find the message I received this morning...�A;Mary.�A;</MIME>
<copyMIME folder="INBOX" UID="156" />
</EMail>
</messageSubmit>
S:<response id="A001"/>
This operation adds the following message to the mailbox:
|
C:<messageRedirect id="A001" folder="INBOX" UID="156">
<To realName="Recipient Name">a1@domain</To>
<To realName="Recipient-2">a2@domain</To>
</messageRedirect>
S:<response id="A001"/>
The Server sends the following data messages:
MIME parts with the text type and x-vcard or dictionary subtype contain vCard elements.
To include vCard data into a message message (using the messageAppend, messageSubmit operations) include a MIME element with type="text" and subtype="directory". The element body should contain one or more vCard elements.
The Contact-class Mailboxes are used to store special messages ("items") containing only vCard data. In a properly composed item:
Use the following operations to compose and store such a special message:
C:<appendVCard id="A011" targetMailbox="Contacts" >
<vCard>
<NAME>Bjorn Jensen</NAME>
<N><FAMILY>Jensen</FAMILY><GIVEN>bjorn</GIVEN><MIDDLE>A</MIDDLE><PREFIX>Mr.</PREFIX><SUFFIX>II</SUFFIX></N>
<EMAIL><INTERNET /><USERID>bjorn@domain.dom</USERID></EMAIL>
<TEL><WORK /><VOICE /><MSG /><NUMBER>+1 313 747-4454</NUMBER></TEL>
<KEY><x509 /><BINVAL>dGhpcyBjb3VsZCBiZSAKbXkgY2VydGlmaWNhdGUK</BINVAL></KEY>
</vCard>
</appendVCard>
S:<response id="A011"/>
Example 1:
The Client published an iCalendar object to the Calendar calendar.
C:<calendarPublish id="A021" calendar="Calendar">
<iCalendar xmlns="urn:ietf:params:xml:ns:xcal">
<vCalendar method="PUBLISH" prodid="CommuniGate Pro 5.1.7" version="2.0">
<vevent>
<organizer CN="Big Boss">MAILTO:boss@company.dom</organizer>
<attendee CN="Small Boy">MAILTO:boy@company.dom</attendee>
<rrule>FREQ=WEEKLY;BYDAY=MO,TH</rrule>
<dtstamp>20061022T091143Z</dtstamp>
<uid>18927897984@kjjkjkjk-123444</uid>
<sequence>0</sequence>
<summary>Report Meeting</summary>
<dtstart tzid="NorthAmerica/Pacific">20060515T100000</dtstart>
<dtend tzid="NorthAmerica/Pacific">20060515T110000</dtend>
<busystatus>BUSY</busystatus>
<last-modified>20060516T034850Z</last-modified>
<created>20060516T034850Z</created>
<priority>5</priority>
<description>A twice-a-week meeting to discuss the progress of the assigned projects.</description>
</vevent>
</vCalendar>
</iCalendar>
<MIME uploadID="att01" />
<copyMIME folder="INBOX" UID="156" partID="3"/>
</calendarPublish>
S:<response id="A021"/>
Note: If a time value is specified withtout the "Z" suffix, it is assumed to be a local time in the Time Zone selected for the current user.
If an iCalendar element is not specified, the item with the specified message UID (this is a number, and it is not the calendar item UID) is taken from the Calendar. Then all items with the same item UIDs are removed.
If the item is placed successfully, the iCalendar reply message is sent to the item origanizer. Replies are not sent for Event items specifying the current user as an attendee with RSVP=FALSE parameter.
The Server sends the following data messages:
A client can maintain one or several concurrent communication sessions ("calls"). Each call is identified with its callLeg identifier.
body:
body:
body:
body:
C:<callRedirect id="A018" callLeg="inp003" >
<To>user1@example.com</To><To>user2@example.com</To>
</callRedirect>
S:<response id="A018"/>
C:<callReject id="A020" callLeg="inp004" signalCode="603" />
S:<response id="A020"/>
body:
body:
If the otherLeg attribute is specified, the peer attribute is ignored.
If the call transfer operation succeeds, the "callLeg" call is disconnected (the callDisconnected message is sent to the client). Additionally, if the operation was the "attended transfer" one, the client receives the callDisconnected message for the "otherLeg" call, too.
The Server can send the following data messages:
body:
The Server sends the following data messages:
body:
body:
A Roster is a set of items, each item describing a "contact" - some other local or remote user. The user can monitor the presence information of a "contact", and a "contact" can be granted a right to monitor the user's presence information.
attributes:
the update, subscribed, and subscribe operations create a new Roster item if the item with the specified E-mail address does not exist.
attributes:
When a session starts, the user is "virtually offline". The client should use this operation to indicate that the user is online.
When the user disconnects, its session status is automatically changed to unavailable (offline).
The Server sends the following data messages:
If the signalBind operation was used to enable Roster and Presence notifications:
The Server sends the following data messages:
The Server returns one fileInfo message for each file or directory in the specified File Storage directory.
The Server returns a fileData message.
The Server sends the following data messages:
Examples:
C:<fileRead id="A002" fileName="test.txt" limit="15" />
S:<fileData fileName="test.txt"position="0" slice="15" size="22" timeModified="20061018T115836">This is not you</fileData>
S:<response id="A002"/>
C:<fileRead id="A003" fileName="test.txt" limit="15" position="15" />
S:<fileData fileName="test.txt"position="15" slice="7" size="22" timeModified="20061018T115836">r file!</fileData>
S:<response id="A003"/>
C:<fileRead id="A004" fileName="test.txt" limit="15" position="15" type="binary" />
S:<fileData fileName="test.txt"position="15" slice="7" size="22" timeModified="20061018T115836"><base64>ciBmaWxlIQ==</base64></fileData>
S:<response id="A004"/>
C:<fileRead id="A005" fileName="test.txt" position="25" />
S:<response id="A005" errorText="reading beyond the EOF mark" errorNum="500" />
Each Rule in a set has name and priority attributes. Signal Rules also have a stage attribute, specifying when the Rule should be applied.
Each Rule contains zero or more condition elements, zero or more action elements, and zero or one comment subelements:
Example: a Mail Rule storing all messages with the X-Junk: 5 header field in the Junk mailbox. Exception is made for messages coming from authenticated users.
The Server sends the following data messages:
A XIMSS session can communicate with Tasks by sending them Events. Tasks see a XIMSS session as a yet another Task, so they can send Events back to it.
Each XIMSS session maintains a list of Tasks Handles for the Tasks it communicates with. Each handle in the list is associated with an taskID string. The XIMSS client uses these taskID strings to address the Tasks in the list.
If this operation succeeds, the Server returns a taskMeeting message with the found meeting data.
The Server sends the following data messages:
The Server sends a directoryData message for each record found.
The Server sends the following data messages:
An array is presented as a sequence of one or more subValue XML elements.
The XML element body represents an Array element.
An empty array is presented as one subValue XML element without a body.
A dictionary is presented as a sequence of one or more subKey XML elements.
The XML element key attribute presents the dictionary element key, and the XML body represents the dictionary element value.
An empty dictionary is presented as one subKey XML element without a key attribute and without a body.
This XML element represents an E-mail message or its message/rfc822 MIME subpart.
attributes:
body:
The type of each XML sub-element is the field name:
Field categories:
Example:
|
<EMail> <From realName="Mr. Sender.">user1@example.com</From> <To realName="My Friend">user2@example.com</To> <To realName="Not A Friend">user3@example.com</To> <Bcc>user1@example.com</Bcc> <Date timeShift="-25200">20060410T201548Z</Date> <Subject>It's 1:15PM now, the meeting has started!</Subject> </EMail>
This XML element represents a message body or its part (referred to as "part" in the rest of this section).
attributes:
body:
Example:
|
<EMail> <From>user1@example.com</From> <To>user2@example.com</To> <MIME Type="multipart" subtype="alternative" Description="Test Message"> <MIME type="text" subtype="plain" charset="iso-8859-1" type-paramX="valueX"> From where I stay, I can see & hear a lot! </MIME> <MIME type="text" subtype="html" charset="iso-8859-1" type-paramX="valueX"> <HTML><body BGCOLOR="yellow"> <I>From where I stay</I>, I can see &amp; hear a lot! </body></HTML> </MIME> </MIME> </EMail>
This XML element represents a vCard object (as specified in the Jabber vCard XML documents).
attributes:
body:
Example:
|
<vCard> <SOURCE>ldap://cn=bjorn Jensen, o=university of Michigan, c=US</SOURCE> <NAME>Bjorn Jensen</NAME> <N><FAMILY>Jensen</FAMILY><GIVEN>bjorn</GIVEN><MIDDLE>A</MIDDLE><PREFIX>Mr.</PREFIX><SUFFIX>II</SUFFIX></N> <EMAIL><INTERNET /><USERID>bjorn@umich.edu</USERID></EMAIL> <ORG><ORGNAME>U of Michigan</ORGNAME><ORGUNIT>Computer Science Dept.</ORGUNIT></ORG> <TEL><WORK /><VOICE /><MSG /><NUMBER>+1 313 747-4454</NUMBER></TEL> <KEY><x509 /><BINVAL>dGhpcyBjb3VsZCBiZSAKbXkgY2VydGlmaWNhdGUK</BINVAL></KEY> </vCard>
This XML element represents an iCalendar object.
attributes:
body:
This XML element represents a vCalendar object.
attributes:
body:
This XML element represents a VTIMEZONE object.
attributes: none
body: a set of sub-elements:
Example:
|
<vtimezone> <tzid>Europe/Central</tzid> <standard> <dtstart>19710101T030000</dtstart> <tzoffsetto>+0100</tzoffsetto> <rrule>FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU</rrule> </standard> <daylight> <dtstart>19710101T020000</dtstart> <tzoffsetto>+0200</tzoffsetto> <rrule>FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU</rrule> </daylight> </vtimezone>
These XML elements represent VEVENT and VTODO objects.
attributes:
body: a set of sub-elements, each representing one property.
The property parameters are represented as element attributes.
The property value is represented as the element body.
If the value starts with the MAILTO: prefix, this prefix is removed.
Example:
|
<vevent> <organizer CN="Jim Smith">jim_smith@example.com</organizer> <rrule>FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,TU,WE,TH;UNTIL=20060305T000000Z</rrule> <dtstamp>20051204T140844Z</dtstamp> <uid>566852630.4@mail.example.com</uid> <sequence>1</sequence> <summary>test - recurrent</summary> <dtstart tzid="NorthAmerica/Pacific">20051204T100000</dtstart> <dtend tzid="NorthAmerica/Pacific">20051204T110000</dtend> <busystatus>BUSY</busystatus> <last-modified>20051204T140844Z</last-modified> <created>20051204T140844Z</created> <priority>5</priority> </vevent>
This XML element represents an SDP object.
attributes:
body:
This XML element represents an SDP Media object.
attributes:
body:
This XML element represents an SDP Media codec.
attributes:
body:
Example: a sample SDP document and its XML presentation:
|
<sdp ip="[192.168.1.65]" origUser="-" sessionID="6385718" sessionVersion="9999" originIP="[192.168.1.65]"> <media media="audio" ip="[192.168.1.65]:16398" protocol="RTP/AVP" direction="sendrecv"> <codec id="0" name="PCMU/8000" /> <codec id="4" name="G723/8000" /> <codec id="8" name="PCMA/8000" /> <codec id="101" name="telephone-event/8000" format="0-15" /> </media> </sdp>
Example:
When the file is uploaded and added to the "uploaded file set", the Server returns the 200 response code. If uploading failed, the Server returns the 500 response code.
If the "uploaded file set" already contains a file with the specified uploadID value, the old file is removed.