1.6 Client Commands (RFC Section 6)

Full compliance, except as noted.

The GroupWise specific XGWTAULIST extension is supported only by the GroupWise POA—and not by the GWIA.

This section briefly outlines the following client commands of IMAP:

1.6.1 Client Commands - Any State (RFC Section 6.1)

The GroupWise IMAP agents support the following client commands in any state:

CAPABILITY Command (RFC Section 6.1.1)

Full compliance.

One example of a CAPABILITY command response from a GroupWise IMAP agent that is configured to support STARTTLS follows:

C; A001 CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS
S: A001 OK CAPABILITY completed

If the agent supports the Trusted Application authentication method, one example of a response follows:

C: A001 CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=XGWTRUSTEDAPP XGWEXTENSIONS
S: A001 OK CAPABILITY completed

CAPABILITY returns XGWEXTENSIONS to indicate that the XGWEXTENSIONS command should be issued to get a list of all the supported GroupWise specific extensions.

NOOP Command (RFC Section 6.1.2)

Full compliance.

The GroupWise IMAP agents return the untagged EXPUNGE or FLAGS responses.

One example of a GroupWise IMAP agent response follows:

C: A004 NOOP
S: * 21 EXISTS
S: * 1 RECENT
S: * OK [UNSEEN 15]
S: A004 OK NOOP completed

LOGOUT Command (RFC Section 6.1.3)

Full compliance.

One example of a GroupWise IMAP agent response follows:

C: A010 LOGOUT
S: * BYE IMAP4rev1 Server Disconnect
S: A010 OK LOGOUT completed

If the Authenticated state was entered from the Trusted Application Authenticated state, the LOGOUT command logs out the user and returns to the Trusted Application Authenticated state. In this case, the untagged BYE response is omitted.

An example of what might be returned follows:

C: A009 LOGOUT
S: A009 OK LOGOUT completed

1.6.2 Client Commands - Non-Authenticated State (RFC Section 6.2)

The GroupWise IMAP agents support the user name and plain text password pair for the LOGIN command but do not support the anonymous user name.

For specific information about subsections, see the following:

AUTHENTICATE Command (RFC Section 6.2.1)

The only authentication mechanism (other than plain text) that the GroupWise IMAP agents support is the GroupWise Trusted Application authentication. The Trusted Application authentication requires the application to provide a valid application name and key (concatenated and base64 encoded as outlined in the GroupWise Trusted Application API documentation).

One example of a GroupWise IMAP agent response follows:

C: A002 AUTHENTICATE XGWTRUSTEDAPP
S: +
C: XGWTRUSTEDAPP VHJ1c3RlZEFwcCBEZW1vADdFNUQ3NjkwMDM4ODAWMDBBRTJF
OEUwMDlBMDBCQjAwN0U1RDc2OTEwMzg4MDAwMEFFMkU4RTAwOUEwMEJCMDA=
S: A002 OK XGWTRUSTEDAPP authentication successful

Once authenticated, the connection is moved to the Trusted Application Authenticated state. From this state, some GroupWise specific commands and a passwordless LOGIN are available.

GroupWise IMAP agents use the "+" continuation character to indicate that a response should follow.

LOGIN Command (RFC Section 6.2.2)

Full compliance.

One example of a GroupWise IMAP agent response follows:

C: A002 LOGIN User1 secret
S: A002 OK LOGIN completed

If the LOGIN command is used after authenticating as a Trusted Application, the LOGIN command requires only the user name. If a password is provided, it is verified. A subsequent LOGOUT command returns the connection to the Trusted Application Authenticated state.

The GWIA supports logins for users from any reachable post office. The POA supports logins for users only on that post office.

An untagged BYE is returned when the POA terminates the connection (unless the application requested a logout).

LOGIN is allowed from the EXAMINE state.

1.6.3 Client Commands - Authenticated State (RFC Section 6.3)

For specific information about subsections, see the following:

SELECT Command (RFC Section 6.3.1)

Full compliance.

The GroupWise IMAP agents return the optional PERMANENTFLAGS and UNSEEN responses. The GroupWise IMAP agents are fully compliant with the mailbox unique identifier validity values as described in the RFC.

An untagged UIDNEXT response is returned on SELECT (for RFC3501 compliance).

The first 4962 items are returned.

The Contacts predefined folder is not selectable. Hidden or accepted folder types are also not selectable.

One example of an agent response follows:

C: A003 SELECT Inbox
S: * 20 EXISTS
S: * 0 RECENT
S: * OK [UNSEEN 15]
S: * OK [UIDVALIDITY 1027023936]
S: * FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)]
S: A003 OK [READ-WRITE] SELECT completed

If the SELECT command is used without specifying a mailbox name, it selects the GroupWise root folder (which is the GroupWise folder that is labeled with the user's name). If SELECT is used in this manner, one example of a response follows:

C: A003 SELECT
S: * 0 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 1047685046]
S: * FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft
   \Seen \*)]
S: A003 OK [READ-WRITE] SELECT completed

EXAMINE Command (RFC Section 6.3.2)

Full compliance.

The GroupWise IMAP agents return the optional PERMANENTFLAGS and UNSEEN responses. GroupWise IMAP agents are fully compliant with the mailbox unique identifier validity values as described in the RFC.

The Contacts predefined folder is not selectable. Hidden or accepted folder types are also not selectable.

One example of an agent response follows:

C: A003 EXAMINE Inbox
S: * 20 EXISTS
S: * 0 RECENT
S: * OK [UNSEEN 15]
S: * OK [UIDVALIDITY 1027023936]
S: * FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
S: * OK [PERMANENTFLAGS ()]
S: A003 OK [READ-ONLY] EXAMINE completed

If the EXAMINE command is used without specifying a mailbox name, it examines the GroupWise root folder (which is the GroupWise folder that is labeled with the user's name). If EXAMINE is used in this manner, one example of a response follows:

C: A003 EXAMINE
S: * 0 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 1047685046]
S: * FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
S: * OK [PERMANENTFLAGS ()]
S: A003 OK [READ-ONLY] EXAMINE completed

CREATE Command (RFC Section 6.3.3)

Full compliance.

GroupWise IMAP agents do not require the server’s hierarchy separator character. If the character is present, it is ignored.

One example of an agent response follows:

C: A003 CREATE "Current Projects"
S: A003 OK CREATE completed

DELETE Command (RFC Section 6.3.4)

Partial compliance.

GroupWise IMAP agents do not allow the deletion of GroupWise predefined folders (including the Inbox). Also, the agents do not permit the deletion of a mailbox that has inferior hierarchical names (or sub-mailboxes).

Recreating a GroupWise mailbox with the same name as an existing mailbox generates a different unique identifier validity value. Because of this functionality, the GroupWise IMAP agents do not keep track of the last used UID of the mailbox.

One example of an agent response follows:

C: A004 DELETE "Current Projects"
S: A004 OK DELETE completed

RENAME Command (RFC Section 6.3.5)

Partial compliance.

The GroupWise IMAP agents do not permit the renaming of GroupWise predefined folders (including the Inbox). However, the agents preserve both the unique identifier validity value of the mailbox being renamed and the UIDs for all messages in the mailbox.

One example of an agent response follows:

C: A004 RENAME "Current Projects" "Old Projects"
S: A004 OK RENAME completed

SUBSCRIBE Command (RFC Section 6.3.6)

Partial compliance.

The GroupWise IMAP agents remove an existing mailbox name from the subscription list when the mailbox is deleted. (Subscription is an attribute of the mailbox.) The agents also validate the mailbox name before subscribing.

The SUBSCRIBE command is disallowed on mailboxes that have the \NoSelect attribute set.

One example of an agent response follows:

C: A004 SUBSCRIBE "Current Projects"
S: A004 OK SUBSCRIBE completed

UNSUBSCRIBE Command (RFC Section 6.3.7)

Full compliance.

One example of an agent response follows:

C: A005 UNSUBSCRIBE "Current Projects"
S: A005 OK UNSUBSCRIBE completed

LIST Command (RFC Section 6.3.8)

Full compliance.

The GroupWise hierarchy character separator character is "/".

One example of an agent response follows:

C: A003 LIST "" ""
S: * LIST (\Noselect) "/" ""
S: A003 OK LIST completed
C: A004 LIST "" *
S: * LIST (\Noinferiors \Marked) "/" "Inbox"
S: * LIST (\Noinferiors \Unmarked) "/" "Sent Items"
S: * LIST (\Noinferiors \Unmarked) "/" "Calendar"
S: * LIST (\Noinferiors \Unmarked) "/" "Checklist"
S: * LIST (\Unmarked) "/" "Cabinet"
S: * LIST (\Unmarked) "/" "Cabinet/New Folder"
S: * LIST (\Noinferiors \Unmarked) "/" "Trash"
S: A004 OK LIST completed

LSUB Command (RFC Section 6.3.9)

Partial compliance.

The GroupWise IMAP agents remove an existing mailbox name from the subscription list when the mailbox is deleted. (Subscription is an attribute of the mailbox.)

The GroupWise hierarchy separator character is "/".

One example of an agent response follows:

C: A003 LSUB "" ""
S: * LSUB (\Noselect) "/" ""
S: A003 OK LSUB completed
C: A004 LSUB "" *
S: * LSUB (\Noinferiors \Marked) "/" "Inbox"
S: * LSUB (\Noinferiors \Unmarked) "/" "Sent Items"
S: * LSUB (\Noinferiors \Unmarked) "/" "Calendar"
S: * LSUB (\Noinferiors \Unmarked) "/" "Checklist"
S: * LSUB (\Unmarked) "/" "Cabinet"
S: * LSUB (\Unmarked) "/" "Cabinet/New Folder"
S: * LSUB (\Noinferiors \Unmarked) "/" "Trash"
S: A004 OK LSUB completed

STATUS Command (RFC Section 6.3.10)

Full compliance.

The STATUS command is disallowed on mailboxes that have the \NoSelect attribute set.

One example of an agent response follows:

C: A005 STATUS Inbox (MESSAGES UIDNEXT RECENT)
S: * STATUS "Inbox" (MESSAGES 20 RECENT 0 UIDNEXT 162)
S: A005 OK STATUS completed

APPEND Command (RFC Section 6.3.11)

Partial compliance.

An untagged EXISTS response is not sent as a result of the APPEND command, nor is the mailbox created (if it is missing). Appending a message does not send that message. Instead, it inserts the message in the user’s box.

Appending to the GroupWise Sent Items predefined folder or using the reserved, permanent $ImapSent keyword results in setting the Box Type field to Sent.

Appending to the predefined TRASH folder is allowed. APPEND to the Calendar folder creates the item as a GroupWise Note. Also, if iCal information is provided as a text/calendar multi-part alternative, the GroupWise item type is set appropriately.

For RFC compliance, the APPEND command is disallowed on mailboxes that have the \NoSelect attribute set.

One example of an agent response follows:

C: A005 APPEND Inbox (\Seen \Draft) {310}
S: + Ready
C: From: 
  more data 
S: A005 OK APPEND completed

1.6.4 Client Commands - Selected State (RFC Section 6.4)

For specific information about subsections, see the following:

CHECK Command (RFC Section 6.4.1)

Partial compliance.

The GroupWise IMAP agents do not perform any housekeeping as a result of the CHECK command. To identify changes or updates to a mailbox, use the NOOP command.

One example of an agent response follows:

C: A004 CHECK
S: A004 OK CHECK completed

CLOSE Command (RFC Section 6.4.2)

Full compliance.

The CLOSE command expunges messages marked as IMAP \Deleted. These messages are not moved to the TRASH folder, unless the email retention feature is enabled.

One example of an agent response follows:

C: A004 CLOSE
S: A004 OK CLOSE completed

EXPUNGE Command (RFC Section 6.4.3)

Full compliance.

The EXPUNGE command permanently deletes messages marked as IMAP \Deleted. These messages are not moved to the TRASH folder, unless the email retention feature is enabled.

Untagged EXPUNGE responses are returned on the NOOP command.

One example of an agent response follows (when message 14 is the only message that has the \Delete flag set):

C: A004 EXPUNGE
S: * 14 EXPUNGE
S: A004 OK EXPUNGE completed

SEARCH Command (RFC Section 6.4.4)

Partial compliance.

The GroupWise IMAP agents do not support HEADER searching or non-system flag KEYWORD or UNKEYWORD searching. Also, searching with SMALLER and LARGER uses an approximated size.

One example of an agent response follows:

C: A005 SEARCH 1:* OR ANSWERED FLAGGED
S: * SEARCH 4 8 10 13 17 19
S: A005 OK SEARCH completed

FETCH Command (RFC Section 6.4.5)

Full compliance.

If the GroupWise message does not contain a MIME attachment, the size returned by the FETCH RFC822.SIZE, FETCH ALL, and FETCH FAST commands is approximated. When the MIME is generated by the FETCH BODY or FETCH RFC822 commands, the size is not approximated.

FETCH returns the tagged NO response when the POA closes the connection prematurely and aborts the command.

One example of an agent response follows:

C: A004 FETCH 13:18 FLAGS UID
S: * 13 FETCH (FLAGS (\Answered \Seen) UID 150)
S: * 14 FETCH (FLAGS (\Deleted \Seen \Draft) UID 153)
S: * 15 FETCH (FLAGS () UID 156)
S: * 16 FETCH (FLAGS () UID 157)
S: * 17 FETCH (FLAGS (\Flagged) UID 158)
S: * 18 FETCH (FLAGS () UID 159)
S: A004 OK FETCH completed

STORE Command (RFC Section 6.4.6)

Full compliance.

If the .SILENT suffix is not used, the GroupWise IMAP agents return an untagged FETCH response with the updated value of the flags for each specified message.

The FETCH response does not include flag updates made outside the current IMAP session.

One example of an agent response follows:

C: A005 STORE 16:18 +FLAGS (\Seen)
S: * 16 FETCH (FLAGS (\Seen))
S: * 17 FETCH (FLAGS (\Seen \Flagged))
S: * 18 FETCH (FLAGS (\Seen))
S: A005 OK STORE completed

COPY Command (RFC Section 6.4.7)

Full compliance.

The GroupWise IMAP agents preserve the flags and internal date of the messages. If the destination mailbox does not exist, it is not created by the COPY command. In this case, GroupWise IMAP agents returns an error and do not create the mailbox.

COPY and UID COPY are not allowed in the EXAMINE state. Also, COPY to the currently selected mailbox is not allowed.

For RFC compliance, the COPY command is disallowed on mailboxes that have the \NoSelect attribute set.

One example of an agent response follows:

C: A005 COPY 5:8 "Cabinet/New Folder"
S: A005 OK COPY completed

UID Command (RFC Section 6.4.8)

Full compliance.

One example of an agent response follows:

C: A004 UID FETCH 160:161 FLAGS
S: * 19 FETCH (FLAGS (\Seen \Flagged) UID 160)
S: * 20 FETCH (FLAGS () UID 161)
S: A004 OK UID FETCH completed

1.6.5 Client Commands - Experimental/Expansion (RFC Section 6.5)

The GroupWise IMAP agents implemented several experimental commands.