To do this we need to assign a random 30 character string as a variable, and then post this as the message ID sent with each new email that SilkPerformer sends during the SMTP loadtest. The sample scripts below will allow you to do this: Outlook: benchmark SilkPerformerRecorder use "WebAPI.bdh" dcluser user VUser transactions TInit : begin; TMain : 1; var dclrand MsgId : RndStr(30..30); // Assign a random 30 character string to be used as a substitute for the message ID dcltrans transaction TInit begin end TInit; transaction TMain var hPop0 : number; hSmtp0 : number; nMsgNumber : number; nMsgSize : number; begin WebPopConnect(hPop0, "192.16.11.21", 110); WebPopUser(hPop0, "user1"); WebPopPass(hPop0, "password"); WebPopStat(hPop0, nMsgNumber, nMsgSize); WebPopQuit(hPop0); WebPopShutdown(hPop0); WebSmtpConnect(hSmtp0, "192.16.11.21", 25); WebSmtpHello(hSmtp0, "user1"); WebSmtpMail(hSmtp0, " "); WebSmtpRecipient(hSmtp0, " "); //Replace the Message Id in the WebSmtpData function, so that each //time this will be a different string WebSmtpData(hSmtp0, "From: \"User 1\" \r\n" "To: \"User 2\" \r\n" "Subject: Test message\r\n" "Date: Mon, 27 Jan 2003 17:22:55 -0000\r\n" "Message-ID: \r\n" "MIME-Version: 1.0\r\n" "Content-Type: text/plain;\r\n" "\tcharset=\"iso-8859-1\"\r\n" "Content-Transfer-Encoding: 7bit\r\n" "X-Priority: 3 (Normal)\r\n" "X-MSMail-Priority: Normal\r\n" "X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)\r\n" "Importance: Normal\r\n" "X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200\r\n" "\r\n", 17); WebSmtpQuit(hSmtp0); WebSmtpShutdown(hSmtp0); ThinkTime(2.5); end TMain; Outlook Express benchmark SilkPerformerRecorder use "WebAPI.bdh" dcluser user VUser transactions TInit : begin; TMain : 1; var dclrand MsgId : RndStr(30..30); // Assigning a random 30 character string to be used as a substitute for the message ID dcltrans transaction TInit begin end TInit; transaction TMain var hPop0 : number; hSmtp0 : number; nMsgNumber : number; nMsgSize : number; begin WebSmtpConnect(hSmtp0, "180.182.222.244", 25); WebSmtpHello(hSmtp0, "user1"); WebSmtpMail(hSmtp0, " "); WebSmtpRecipient(hSmtp0, " "); //Replace the Message Id in the WebSmtpData function, so that each //time this will be a different string WebSmtpData(hSmtp0, "Message-ID: \r\n" "To: \"user2\" \r\n" "Subject: Test\r\n" "Date: Thu, 23 Jan 2003 11:50:46 -0800\r\n" "MIME-Version: 1.0\r\n" "Content-Type: multipart/mixed;\r\n" "\tboundary=\"----=_NextPart_000_0007_01C2C2D5.AA42EAD0\"\r\n" "X-Priority: 3\r\n" "X-MSMail-Priority: Normal\r\n" "X-Mailer: Microsoft Outlook Express 5.50.4807.1700\r\n" "X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700\r\n" "\r\n", 457); WebSmtpQuit(hSmtp0); WebSmtpShutdown(hSmtp0); end TMain;
↧