--------------------------------------------- Sample output of SMTP Client Test Plan script --------------------------------------------- -Ian! D. Allen - idallen@idallen.ca This is typical output from running the sample test_plan.sh script to test an SMTP Client. The sample script is in notes file "testplanscript2.txt". This client being tested still has all its DEBUG messages turned on, which makes debugging and reading the tests easier. Run the test script with input from /dev/null to avoid prompts between tests. Remember to capture stderr as well as stdout in the same output pipe/file. Run the output through "cat -v" to make extra CR characters visible. $ ./test_plan.sh &1 | cat -v >test_out.txt ============================================================== Test 1: A few continuation lines ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 DEBUG first response is: 220 test1 greeting 1 EHLO algonquincollege.com^M DEBUG second response is: 250-test1 response to EHLO 250-test1 option1 250-test1 option2 250-test1 option3 250 test1 optionlast 2 MAIL FROM:^M DEBUG third response is: 250 test1 response to MAIL FROM 3 RCPT TO:^M DEBUG fourth response is: 250 test1 response to RCPT TO 4 DATA^M DEBUG fifth response is: 354 test1 response to DATA 5 Subject: This is a test message^M 6 ^M 7 Body Line 1.^M 8 ..Line starting with a period.^M 9 Body Line 3.^M 10 ..^M 11 Body Line 5.^M 12 .^M DEBUG sixth response is: 250 test1 response to end of DATA 13 QUIT^M DEBUG third response is: 221 test1 response to QUIT (closing) *** Client exit status is 0 ============================================================== Test 2: A fixed small message length ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 DEBUG first response is: 220 test2 greeting 1 EHLO algonquincollege.com^M DEBUG second response is: 250-test2 response to EHLO 250 SIZE 50 DEBUG max message size is '50' 2 MAIL FROM:^M DEBUG third response is: 250 test2 response to MAIL FROM 3 RCPT TO:^M DEBUG fourth response is: 250 test2 response to RCPT TO 4 DATA^M DEBUG fifth response is: 354 test2 response to DATA 5 Subject: This is a test message^M 6 ^M 7 Body Line 1.^M 8 ..Line starting with a period.^M ./smtpclient.pl: Message longer than 50 - truncated ./smtpclient.pl: Message longer than 50 - truncated ./smtpclient.pl: Message longer than 50 - truncated 9 .^M DEBUG sixth response is: 250 test2 response to end of DATA 10 QUIT^M DEBUG third response is: 221 test2 response to QUIT (closing) *** Client exit status is 0 ============================================================== Test 3: A refused greeting ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 DEBUG first response is: 554 test3 refused greeting ./smtpclient.pl: 554 test3 refused greeting *** Client exit status is 69 ============================================================== Test 4: An error refused EHLO - exit status EX_UNAVAILABLE (69) ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 DEBUG first response is: 220 test4 greeting 1 EHLO algonquincollege.com^M DEBUG second response is: 504 test4 error refused EHLO ./smtpclient.pl: 504 test4 error refused EHLO *** Client exit status is 69 ============================================================== Test 5: A temporary refused EHLO - exit status EX_TEMPFAIL (75) ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 DEBUG first response is: 220 test5 greeting 1 EHLO algonquincollege.com^M DEBUG second response is: 421 test5 temporary refused EHLO ./smtpclient.pl: 421 test5 temporary refused EHLO *** Client exit status is 75 ============================================================== Test 6: A line too short. ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 ./smtpclient.pl: Server line 'xx' shorter than 3 *** Client exit status is 75 ============================================================== Test 7: A time-out ============================================================== DEBUG -to user@domain.com -from sender@domain.com -smtpserver localhost -port 55555 DEBUG first response is: 220 test7 greeting 1 EHLO algonquincollege.com^M ./smtpclient.pl: Server connection broken or time out: read timed-out *** Client exit status is 75