R5 IMAP workload script

Various IMAP workload scripts are as follows.

IMAP initialization workload script sample

Text enclosed in asterisks (**) indicates comments.

**Script to initialize databases for NotesBench IMAP mail script; pause 0 - 5 minutes (5 min. = 300,000 ms.)**

pause 0-300000

**If an error occurs, wait 1 to 5 minutes before retrying**

errordelay 60000-300000

**Create the mail file**

changeto "[MailServer]!!mail[#].nsf" [MailTemplate]

**Set Owner**

Setcalprofile

**IMAP-enable the mail file**

console [MailServer] load convert -m mail[#].nsf
pause 60000

**Ensure there are enough documents in mail database (one time only)**

beginloop
sendssmtpmessage [NormalMessageSize] [MessageLineSize]
mail[#]@[RecipientDomain]
[SMTPHost] [RecipientDomain] [ClientHost]
rewind [NumMailNotesPerUser]
pause 60000

**Open views**

open $FolderInfo
close
open $FolderRefInfo
close
open $Inbox
close
drop

IMAP workload script sample

Text enclosed in asterisks (**) indicates comments.

**Pause a random interval so multiple processes are well-staggered; pause 0-3 minutes (3 min. = 180000 ms)**

Pause 0-180000

**Make sure the script doesn't quit if errors are found.**

if [R5IMAPBreak]
break 0

**If an error occurs, wait 1 to 2 minutes before retrying.**

ErrorDelay 60000-120000

**Begin Outer loop**

BeginLoop

**Establish IMAP connection / Open mail application**

ImailLogin [IMAPHost] Mail[#] NotesBench

**Pause 8 to 12 minutes to let ramp-ups occur**

Pause 480000-720000

**List all mailboxes**

ImailListMailboxes

**Open the INBOX folder**

ImailOpenMailbox INBOX

**Begin Inner loop**

BeginLoop2

**Get the last page of entries in the mailbox**

ImailGetLastEntries

**Wait 5 to 10 seconds to peruse the view**

**Read 5 messages in the mailbox, delete 2, post 1. Read each for 10 to 20 seconds**

ImailFetchOld CURRENT

**Pause 10 to 20 seconds**

Pause 10000-20000
ImailFetchOld NEXT

** Pause 10 to 20 seconds**

Pause 10000-20000
ImailFetchOld NEXT

**Pause 10 to 20 seconds**

Pause 10000-20000

**Delete current message**

ImailDeleteEntry

**Pause 10 to 20 seconds**

Pause 10000-20000
ImailFetchOld NEXT

**Pause 10 to 20 seconds**

Pause 10000-20000
ImailFetchOld NEXT_UNSEEN
ImailSetSeen

**Pause 10 to 20 seconds**

Pause 10000-20000

**Post (add) message to INBOX**

Imailpostmessage [NormalMessageSize] [MessageLineSize] INBOX

**Pause 10 to 20 seconds**

Pause 10000-20000

**Delete another message**

ImailDeleteEntry

**Pause 10- to 20 seconds**

Pause 10000-20000

**Compose 1 new mail message (taking 1 to 2 minutes to write it)**

Pause 60000-120000

**SEND SMTP Message, perform LDAP lookups for specified # of recipients**

SendSmtpMessage [NormalMessageSize] [MessageLineSize]  [NumMessageRecipients] [SMTPHost] [RecipientDomain] [ClientHost] [NthIteration]

**Pause at the desktop for 8+ to 12+ minutes while having a meeting in office**

Pause 515000-755000

**Check for new mail**

ImailCheckForNewMail

**Repeat Inner loop sequence over again (go back to BeginLoop2 statement)**

rewind2 [R5IMAP_LOOP_N]

**Logout and do something else for 3 to 6 minutes**

IMAILCloseMailbox
ImailLogout 
Pause 180000-360000

**Go back to Outer loop (go back again to BeginLoop statement)**

rewind [ScriptIterationLimit]