=========================================== Sample output from running autotest_smtp.sh =========================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com Usage (prompting and displaying copy of tests on screen): $ ./autotest_smtp.sh 2>&1 | cat -v | tee test_out.txt Here is a sample of the output that appears in test_out.txt: =============================== Category A: Successful Messages =============================== ==> TEST A-1: A simple message (no continuation lines) ==> Press RETURN to execute this test ... ============================================================== Test A-1: A simple message (no continuation lines) ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 220 test greeting smtpclient.pl: DEBUG sending to server: EHLO wt127-31 1 EHLO wt127-31^M smtpclient.pl: DEBUG server's second response is: 250 test good response to EHLO smtpclient.pl: DEBUG sending to server: MAIL FROM: 2 MAIL FROM:^M smtpclient.pl: DEBUG server's third response is: 250 test good response to MAIL FROM smtpclient.pl: DEBUG sending to server: RCPT TO: 3 RCPT TO:^M smtpclient.pl: DEBUG server's fourth response is: 250 test good response to RCPT TO smtpclient.pl: DEBUG sending to server: DATA 4 DATA^M smtpclient.pl: DEBUG server's fifth response is: 354 test good response to DATA smtpclient.pl: DEBUG sending to server: . 5 From: alleni@algonquincollege.com^M 6 Subject: This is a test message subject line^M 7 ^M 8 Body Line 1.^M 9 ..Body Line 2 starting with a period (should be escaped for SMTP).^M 10 Body Line 3.^M 11 ..^M 12 ...^M 13 Body Line 6.^M 14 .^M smtpclient.pl: DEBUG server's sixth response is: 250 test good response to end of DATA smtpclient.pl: DEBUG sending to server: QUIT 15 QUIT^M smtpclient.pl: DEBUG server's last response is: 221 test good response to QUIT (closing) *** Client exit status is 0 ==> TEST A-2: A few continuation lines ==> Press RETURN to execute this test ... ============================================================== Test A-2: A few continuation lines ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 220 test greeting smtpclient.pl: DEBUG sending to server: EHLO wt127-31 1 EHLO wt127-31^M smtpclient.pl: DEBUG server's second response is: 250-test good response to EHLO 250-test SMTPoption1 (continued) 250-test SMTPoption2 (continued) 250-test SMTPoption3 (continued) 250 test SMTPoptionlast (continued) smtpclient.pl: DEBUG SMTP Option: 'test SMTPoption1 (continued)' smtpclient.pl: DEBUG SMTP Option: 'test SMTPoption2 (continued)' smtpclient.pl: DEBUG SMTP Option: 'test SMTPoption3 (continued)' smtpclient.pl: DEBUG SMTP Option: 'test SMTPoptionlast (continued)' smtpclient.pl: DEBUG sending to server: MAIL FROM: 2 MAIL FROM:^M smtpclient.pl: DEBUG server's third response is: 250 test good response to MAIL FROM smtpclient.pl: DEBUG sending to server: RCPT TO: 3 RCPT TO:^M smtpclient.pl: DEBUG server's fourth response is: 250 test good response to RCPT TO smtpclient.pl: DEBUG sending to server: DATA 4 DATA^M smtpclient.pl: DEBUG server's fifth response is: 354 test good response to DATA smtpclient.pl: DEBUG sending to server: . 5 From: alleni@algonquincollege.com^M 6 Subject: This is a test message subject line^M 7 ^M 8 Body Line 1.^M 9 ..Body Line 2 starting with a period (should be escaped for SMTP).^M 10 Body Line 3.^M 11 ..^M 12 ...^M 13 Body Line 6.^M 14 .^M smtpclient.pl: DEBUG server's sixth response is: 250 test good response to end of DATA smtpclient.pl: DEBUG sending to server: QUIT 15 QUIT^M smtpclient.pl: DEBUG server's last response is: 221 test good response to QUIT (closing) *** Client exit status is 0 ======================== Category B: Minor Errors ======================== ==> TEST B-1: A fixed small message length ==> Press RETURN to execute this test ... ============================================================== Test B-1: A fixed small message length ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 220 test greeting smtpclient.pl: DEBUG sending to server: EHLO wt127-31 1 EHLO wt127-31^M smtpclient.pl: DEBUG server's second response is: 250-test good response to EHLO 250-test SMTPoption1 (continued) 250-test SMTPoption2 (continued) 250-SIZE 50 250-test SMTPoption4 (continued) 250 test SMTPoptionlast (continued) smtpclient.pl: DEBUG SMTP Option: 'test SMTPoption1 (continued)' smtpclient.pl: DEBUG SMTP Option: 'test SMTPoption2 (continued)' smtpclient.pl: DEBUG SMTP Option: 'SIZE 50' smtpclient.pl: DEBUG option SIZE found: max message size is '50' smtpclient.pl: DEBUG SMTP Option: 'test SMTPoption4 (continued)' smtpclient.pl: DEBUG SMTP Option: 'test SMTPoptionlast (continued)' smtpclient.pl: DEBUG sending to server: MAIL FROM: 2 MAIL FROM:^M smtpclient.pl: DEBUG server's third response is: 250 test good response to MAIL FROM smtpclient.pl: DEBUG sending to server: RCPT TO: 3 RCPT TO:^M smtpclient.pl: DEBUG server's fourth response is: 250 test good response to RCPT TO smtpclient.pl: DEBUG sending to server: DATA 4 DATA^M smtpclient.pl: DEBUG server's fifth response is: 354 test good response to DATA ./smtpclient.pl: Message would be longer than 50 - truncated smtpclient.pl: DEBUG sending to server: . 5 From: idallen@algonquincollege.com^M 6 .^M smtpclient.pl: DEBUG server's sixth response is: 250 test good response to end of DATA smtpclient.pl: DEBUG sending to server: QUIT 7 QUIT^M smtpclient.pl: DEBUG server's last response is: 221 test good response to QUIT (closing) *** Client exit status is 0 ============================ Category C: Permanent Errors ============================ ==> TEST C-1: A refused greeting - exit status EX_UNAVAILABLE (69) ==> Press RETURN to execute this test ... ============================================================== Test C-1: A refused greeting - exit status EX_UNAVAILABLE (69) ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 554 test permanent error refused greeting ./smtpclient.pl: 554 test permanent error refused greeting *** Client exit status is 69 ==> TEST C-2: A refused EHLO - exit status EX_UNAVAILABLE (69) ==> Press RETURN to execute this test ... ============================================================== Test C-2: A refused EHLO - exit status EX_UNAVAILABLE (69) ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 220 test greeting smtpclient.pl: DEBUG sending to server: EHLO wt127-31 1 EHLO wt127-31^M smtpclient.pl: DEBUG server's second response is: 504 test permanent error refused EHLO ./smtpclient.pl: 504 test permanent error refused EHLO *** Client exit status is 69 ============================ Category D: Temporary Errors ============================ ==> TEST D-1: A temporary refused EHLO - exit status EX_TEMPFAIL (75) ==> Press RETURN to execute this test ... ============================================================== Test D-1: A temporary refused EHLO - exit status EX_TEMPFAIL (75) ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 220 test greeting smtpclient.pl: DEBUG sending to server: EHLO wt127-31 1 EHLO wt127-31^M smtpclient.pl: DEBUG server's second response is: 421 test temporary refused EHLO ./smtpclient.pl: 421 test temporary refused EHLO *** Client exit status is 75 ==> TEST D-2: An SMTP code shorter than 3 - exit status EX_TEMPFAIL (75) ==> Press RETURN to execute this test ... ============================================================== Test D-2: An SMTP code shorter than 3 - exit status EX_TEMPFAIL (75) ============================================================== smtpclient.pl: 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 D-3: time-out after greeting banner - exit status EX_TEMPFAIL (75) ==> Press RETURN to execute this test ... ============================================================== Test D-3: time-out after greeting banner - exit status EX_TEMPFAIL (75) ============================================================== smtpclient.pl: DEBUG --to user@domain.com --from sender@domain.com --smtpserver localhost --port 55555 smtpclient.pl: DEBUG server's first response is: 220 test greeting smtpclient.pl: DEBUG sending to server: EHLO wt127-31 1 EHLO wt127-31^M ./smtpclient.pl: Server connection broken or time out: *** Client exit status is 75 ============================ Category ???: .... ============================ *** SCRIPT EXIT ./autotest_smtp.sh