IMAP test logic

Prev Next

Catchpoint’s IMAP monitor enables you to test the availability and performance of an IMAP server. In addition to checking the availability of the server, it provides options to search for messages in the authenticated user's inbox, and to send a new message as well.

Note that the IMAP protocol is not designed for sending email messages. If you choose the New Message option in the IMAP test, the Catchpoint monitor creates a new message in the authenticated user's sent folder. This message may be sent if the email server is configured to automatically send messages placed in the sent folder.

When configuring an IMAP test, the following settings affect the IMAP commands sent by the agent:

Setting Name

Description

Test Location The name or address of the IMAP server to test

New Message

  • Selected: The agent will create a new message in the "Sent" folder
  • Unselected: The agent will not create a new message in the "Sent" folder
From The "From" address for the message created in the "Sent" folder
To One or more email addresses to put in the "To" field of the message created in the "Sent" folder
CC One or more email addresses to put in the "CC" field of the message created in the "Sent" folder
BCC One or more email addresses to put in the "BCC" field of the message created in the "Sent" folder
Subject The subject of the email message
Message The content of the email message
Search Term(s) to be searched for in the authenticated user's inbox.
Authentication

The type of authentication required by the IMAP server. Options include:

  • None
  • Plain
  • Login
  • CRAM-MD5
User Name The user name to authenticate with
Password The password to authenticate with

Example

The following example shows an IMAP test configuration and the equivalent IMAP commands executed at runtime, as well as example server responses representing a successful test.

Test Location imaps://imap.gmail.com:993/
New Message Selected
From alice@gmail.com
To bob@gmail.com
Subject IMAP Testing
Message This is a test message created by the Catchpoint IMAP test
Search "App password created"
Authentication Plain

Runtime IMAP Commands

S: * OK Gimap ready for requests from <client ip address>

C: F00000000 CAPABILITY

S: * CAPABILITY IMAP4rev1 <list of capabilities> OK

C: F00000001 AUTHENTICATE PLAIN <BASE64 encrypted Username and Password>

S: * CAPABILITY IMAP4rev1 <list of capabilities> OK alice@gmail.com authenticated (Success)

C: F00000002 NAMESPACE

S: * NAMESPACE ((\"\" \"/\")) NIL NILF00000002 OK Success

C: F00000003 LIST \"\" \"INBOX\"

S: * LIST (\\HasNoChildren) \"/\" \"INBOX\"F00000003 OK Success

C: F00000004 LIST (SPECIAL-USE) \"\" \"*\"

S: * LIST (\\All \\HasNoChildren) \"/\" \"[Gmail]/All Mail\"* LIST (\\HasNoChildren \\Trash) \"/\" \"[Gmail]/Bin\"* LIST (\\Drafts \\HasNoChildren) \"/\" \"[Gmail]/Drafts\"* LIST (\\HasNoChildren \\Sent) \"/\" \"[Gmail]/Sent Mail\"* LIST (\\HasNoChildren \\Junk) \"/\" \"[Gmail]/Spa]"])

S: m\"* LIST (\\Flagged \\HasNoChildren) \"/\" \"[Gmail]/Starred\"F00000004 OK Success

C: F00000005 LIST \"\" \"[Gmail]\"

S: * LIST (\\HasChildren \\Noselect) \"/\" \"[Gmail]\"F00000005 OK Success

C: F00000006 LIST \"\" \"%\" RETURN (SUBSCRIBED CHILDREN)

S: * LIST (\\HasNoChildren \\Subscribed) \"/\" \"INBOX\"* LIST (\\HasNoChildren \\Subscribed) \"/\" \"Sent\"* LIST (\\HasChildren \\NonExistent \\Subscribed) \"/\" \"[Gmail]\"F00000006 OK Success

C: F00000007 EXAMINE INBOX (CONDSTORE)

S: * FLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen $NotPhishing $Phishing)* OK [PERMANENTFLAGS ()] Flags permitted.* OK [UIDVALIDITY 1] UIDs valid.* 7 EXISTS* 0 RECENT* OK [UIDNEXT 8] Predicted next UID.* OK [HIGHESTMODSEQ 2875]F00000007 OK [REA]"])

S: D-ONLY] INBOX selected. (Success)

C: F00000008 UID SEARCH RETURN () CHARSET US-ASCII SUBJECT \"App password created\"

S: * ESEARCH (TAG \"F00000008\") UID ALL 4F00000008 OK SEARCH completed (Success)

C: F00000009 UID FETCH 4 (BODY.PEEK[])

S: * 4 FETCH (UID 4 MODSEQ (2081) BODY[] <message body>

S: F00000009 OK Success

C: F00000010 LIST \"\" \"%\" RETURN (SUBSCRIBED CHILDREN)

S: * LIST (\\HasNoChildren \\Subscribed) \"/\" \"INBOX\"* LIST (\\HasNoChildren \\Subscribed) \"/\" \"Sent\"* LIST (\\HasChildren \\NonExistent \\Subscribed) \"/\" \"[Gmail]\"F00000010 OK Success

C: F00000011 APPEND Sent {330}

S: + go ahead

C: From: \"alice\" <alice@gmail.com>Date: Fri, 07 Jan 2022 12:56:06 +0000Subject: IMAP testing Message-Id: <IR8FTCI5RFU4.AB6IIDDC1ITZ2@VM-SN2012R2-AP1>To: bob <bob@gmail.com> MIME-Version: 1.0Content-Type: text/plain; charset=utf-8

C: This is a test message created by the Catchpoint IMAP test.

C:

S: F00000011 OK [APPENDUID 15 13] (Success)

C: F00000012 LOGOUT

S: * BYE LOGOUT RequestedF00000012 OK 73 good day (Success)