1、题目描述:
For an electronic mail application you are to describe the SMTP-based communication that takes place between pairs of MTAs. The sender’s User Agent gives a formatted message to the sending Message Transfer Agent (MTA). The sending MTA communicates with the receiving MTA using the Simple Mail Transfer Protocol (SMTP). The receiving MTA delivers mail to the receiver’s User Agent. After a communication link is initialized, the sending MTA transmits command lines, one at a time, to the receiving MTA, which returns a three-digit coded response after each command is processed. The sender commands are shown below in the order sent for each message. There is more than one RCPT TO line when the same message is sent to several users at the same MTA. A message to users at different MTAs requires separate SMTP sessions.
HELO myname Identifies the sender to the receiver (yes, there is only one L)
MAIL FROM:< sender > Identifies the message sender
RCPT TO:< user > Identifies one recipient of the message
DATA Followed by an arbitrary number of lines of text comprising the message body, ending with a line containing a period in column one.
QUIT Terminates the communication.
The following response codes are sent by the receiving MTA:
221 Closing connection (after QUIT)
250 Action was okay (after MAIL FROM and RCPT TO specifying an acceptable user, or completion of a message)
354 Start sending mail (after DATA)
550 Action not taken; no such user here (after

这是一个关于模拟SMTP协议传输电子邮件的题目,描述了MTA之间的交互过程。输入包含MTA信息和消息,输出显示SMTP会话。题目要求实现从发送者到接收者的邮件传递,并处理接收MTA的响应代码,包括成功和错误情况。
最低0.47元/天 解锁文章
960

被折叠的 条评论
为什么被折叠?



