• No results found

School of Computer Studies Seneca College. SMTP Lab SIMPLE MAIL TRANSFER PROTOCOL

N/A
N/A
Protected

Academic year: 2021

Share "School of Computer Studies Seneca College. SMTP Lab SIMPLE MAIL TRANSFER PROTOCOL"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

SMTP Lab

Reference: RFC821 – Simple Mail Transfer Protocol

SIMPLE MAIL TRANSFER PROTOCOL

1. INTRODUCTION

The objective of Simple Mail Transfer Protocol (SMTP) is to transfer mail reliably and efficiently.

SMTP is independent of the particular transmission subsystem and requires only a reliable ordered data stream channel. Appendices A, B, C, and D describe the use of SMTP with various transport services. A Glossary provides the definitions of terms as used in this

document.

An important feature of SMTP is its capability to relay mail across transport service environments. A transport service provides an interprocess communication environment (IPCE). An IPCE may cover one network, several networks, or a subset of a network. It is important to realize that transport systems (or IPCEs) are not one-to-one with networks. A process can communicate directly with another process through any mutually known IPCE. Mail is an application or use of interprocess communication. Mail can be communicated between

processes in different IPCEs by relaying through a process connected to two (or more) IPCEs. More specifically, mail can be relayed between hosts on different transport systems by a host on both transport systems.

- RFC821

Objective: Explore the command/response transaction of the Simple Mail Transfer Protocol

This lab consists of three parts. We will first check the version of the SMTP server and make sure that the SMTP port is on. Secondly, we will establish an interactive SMTP session with the local SMTP server and study some of the major SMTP commands. Lastly, we will use the interactive SMTP session to send email to users on the local machine.

Part I: SMTP Server

(1) Login to you system as a regular user. The default SMTP server installed by Red Hat Linux is sendmail. Find out which version of the sendmail rpm is installed in your system.

Command: _________________________________________________ Sendmail Version: ___________________________________________

(2) SMTP server use one of the well-known ports. What is the port number used by SMTP? ___________

(2)

your system. The 1 one is the output of the “netstat -a” command. Look for the SMTP port number under the “Local Address” column and record the line(s) that contain the SMTP port :

________________________________________________________________________ If you can't find any, you may have to start or restart the SMTP server. For Red Hat, you can try the following command to restart sendmail (which is Red Hat's default SMTP server):

service sendmail restart or service sendmail start (su to root first) (Note: For other Linux distribution or Unix, they may use a different SMTP server.)

(4) The other place is the output of the “ps -ef | grep sendmail” command. Record its output: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ According to the output above, is “sendmail” accepting connection? _______________ (Note: You need a different command if the system is running other SMTP server.)

Part II: SMTP commands

(5) Login as a regular user and execute the commands under the “Command” column and record the output under the “Response” column. Do not proceed if the first command can not establish a

connection to port 25 on the local host.

Command Response telnet localhost 25 HELO domain.com EHLO domain.com NOOP RSET VERB

(3)

Command Response EXPN ops535m VRFY toronto VRFY nobody HELP QUIT

(6) “su” to “root” and backup the file “/etc/mail/sendmail.cf” to “/etc/mail/sendmail.cf.org”. (7) While you are still “su” to “root”, edit the file “/etc/mail/sendmail.cf”, change the line:

O PrivacyOptions=authwarnings,novrfy,noexpn,restrictqrun

to:

O PrivacyOptions=authwarnings,restrictqrun

(8) Save the changes and restart “sendmail” server.

(9) Login as a regular user and execute the commands under the “Command” column and record the output under the “Response” column.

Command Response telnet localhost 25 HELO domain.com EXPN ops535m VRFY toronto VRFY postmaster EXPN postmaster VRFY mailer-daemon EXPN mailer-daemon VRFY manager VRFY somebody

(4)

QUIT

(10) “su” to “root”, backup the file “/etc/aliases” to “/etc/aliases.org” and execute the following command:

echo “ops535m: adm,uucp,ftp” >> /etc/aliases newaliase

(11) Record the output of the above commands:

____________________________________________________________________________ (12) Login as a regular user and execute the command sunder the “Command” column and record the output under the “Response” column.

Command Response

telnet localhost 25 HELO domain.com EXPN ops535m (may take a while to produce the output) VRFY ops535m (may take a while to product the output) QUIT

(13) In the NFS Lab, you were ask to create User 1, User 2 and User 3 with the UIDs 1001, 1002 and 1003. Look up the login name from your /etc/passwd file and record them in the following table:

UID Login_name User Name

(The 5th field of a /etc/passwd record)

User 1 1001

User 2 1002

User 3 1003

(14) “su” to “root” and execute the following commands, replace the place holder “user1”, “user2” and “user3” with the actual login name from the above table:

echo “ops535x: user1,usr2,user3” >> /etc/aliases newaliase

(15) Login as a regular user and execute the commands under the “Command” column and record the output under the “Response” column.

(5)

Command Response

telnet localhost 25 HELO domain.com EXPN ops535x

(may take a while to produce the output)

VRFY ops535x

(may take a while to produce the output)

QUIT

(16) Compare the results from step 5, 9, 12 and 15 and comment on the results.

___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________

(6)

(17) Login as a a regular user and connect to the local SMTP server. Use the information in the following table to send email to user1, user2 and user3 (please translate them into their actual login names on your system), postmaster, ftp, ops535m and ops535x.

From To Message

ws.podx.ca user1 SMTP Lab email message for User 1

Test message 1.

ws.podx.ca user2 SMTP Lab email message for User 2

Test message 2.

ws.podx.ca user3 SMTP Lab email message for User 3

Test message 3.

ws.podx.ca ops535x SMTP Lab email message for ops535x

Test message 4

ws.podx.net postmaster SMTP Lab email message for postmaster

Test message 5

ws.podx.net ftp SMTP Lab email message for ftp

Test message 6

ws.podx.net ops535m SMTP Lab email message for ops535m

Test message 7

(18) Login as user1, user2 and user3 and find out what messages they received:

User Login_name Message receiced

User 1 User 2 User 3

(19) Find out who received the messages addressed to postmaster (Test message 5), ftp (Test message 6) and ops535m (Test message 7)

__________________________________________________________________________ (20) Write up the complete procedure on how to setup on your system a mail alias called “poduser” that includes all users in your group?

References

Related documents

 Trivial File Transfer Protocol (TFTP)  Hypertext Transfer Protocol (HTTP)  Simple Mail Transport Protocol (SMTP).  Simple Network Management

What Must Franchisors Do To Comply With State Franchise Registration And Disclosure Laws.  File an application which includes an FDD, standard franchise agreements and

The Oldowan assemblage from NY 18 site at Nyabusosi (Toro-Uganda). The Stone Technologies of Early Hominids at Koobi Fora, Kenya; An Experimental Approach, Unpublished

In table B.1 (appendix), we summarize the rest of our results comparing the proportion of consistent price changes among treatments, periods, and levels of

And that's a real feeling and experience and this, I think this was a great way to approach, you know, how do you build community, how do you work in South Carolina, how do you

The study clearly showed that a product and substrate database is needed for portable Raman spectroscopy to be usable in the analysis of conservation products, both before and

Small scale stone crushing plants are being operated in most of the area across the country where lime stone resaves exist .The proposed location for setting up a small

Arbitrarily putting compensating zeros at −5, −4 and −2 and designing the required pole location, the root loci, the performance of the compensated systems, and the