----------------------- Lab #94 for CST8165 due April 14, 2008 (Week 14) ----------------------- -Ian! D. Allen - idallen@idallen.ca Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) Global weight: 1% of your total mark this term. (BONUS) Due at the end of your lab period today (Monday). The deliverables for this lab exercise are to be submitted online on the Course Linux Server using the "netsubmit" method described in the lab exercise description, below. No paper; no email; no FTP. Synopsis: Send email using SMTP (MTA) via netcat. Fetch email using POP3 (MRA/MAA) via netcat. Where to work: connections to the Course Linux Server at 10.50.254.148 Where script sessions are requested, the script sessions must not contain any other commands other than those needed to answer the question. You may need to practice getting the right answer before you run a script session to record it. You can edit the script session afterward to delete minor mistakes in command use. Using netcat to send and receive email -------------------------------------- Class Notes: smtp_session.txt and your Week 13 notes Internet protocols are text-based. You can debug them using a simple text client in a terminal window. Network administrators should know enough SMTP and POP to send and receive a single test email message. 1. Use a model SMTP session (smtp_session.txt) with netcat (not telnet) to send an email message via SMTP to your Course Linux Server [CLS] login userid (same as your Algonquin userid) via 10.50.254.148 : Notes: - the domain name after "HELO" doesn't matter (make one up) - the colon ':' and <> around all email addresses must be present - the SMTP envelope MAIL FROM address doesn't matter (use yours) - the SMTP envelope RCPT TO address should be: abcd0001@localhost where "abcd0001" is replaced by your real CLS login userid - the message body headers and text don't matter (anything will do) - SMTP commands may be entered in lower-case, if you prefer - if things are working, you will get a "250" response after each line Your session will look something like the session below, though you have to use the correct SMTP command lines in the correct order: $ nc -v 10.50.254.148 25 alinux [10.50.254.148] 25 (smtp) open 220 idallen-alinux.algonquincollege.com ESMTP Postfix (Ubuntu) ... say hello to the SMTP server ... 250 idallen-alinux.algonquincollege.com ... give the mail from address (anything) ... 250 2.1.0 Ok ... give the mail recipient address at localhost ... 250 2.1.5 Ok ... indicate you're about to send the message body ... 354 End data with . ... type in a mail message body ... 250 2.0.0 Ok: queued as 8262A1AB2D4 ... exit the SMTP session ... 221 2.0.0 Bye If you store your SMTP commands in a text file, you can use shell input redirection to pass the entire text file into the SMTP port via netcat: $ nc -v 10.50.254.148 25