ounisangw / CS305-23F-Assignment-1

This is a repository for Programming Assignment 1 in SUSTech CS305, Computer Network course.
11 stars 2 forks source link

跨域投递时随机 Timeout #20

Closed IceLocke closed 10 months ago

IceLocke commented 10 months ago

在几个跨域投递的 case 中,在 testbench 中会不定期出现 timeout 的问题(不只是样例 2),但是手动调用 agent 与 server 交互不会出现。

具体表现如下: image

这是 usr1@sustech.edu.cn 发送邮件到 usr1@gmail.com 进行跨域投递时的服务器响应样例:

以下是 exmail.com 的服务器响应

Receive SMTP request from host[127.0.0.1]
[SMTP] Connection established
[SMTP] Response b'220\r\n'
[SMTP] Receive message ehlo IceLocke-PC.
[SMTP] Response b'250\r\n'
[SMTP] Receive message mail FROM:<usr1@mail.sustech.edu.cn>
[SMTP] Response b'250\r\n'
[SMTP] Receive message rcpt TO:<usr1@gmail.com>
[SMTP] Response b'250\r\n'
// 跨域投递开始
[SMTP] Cross domain repost to  ('localhost', 2125)
[SMTP] Cross domain repost, CMD=HELO, resp=220
[SMTP] Cross domain repost, CMD=MAIL, resp=250
[SMTP] Cross domain repost, CMD=RCPT, resp=250
[SMTP] Cross domain repost, CMD=DATA START, resp=250
[SMTP] Cross domain repost, CMD=DATA END, resp=354
// 投递完成后打印原始邮件内容
[SMTP] Receive mail
 Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Subject: test
From: usr1@mail.sustech.edu.cn

dGVzdA==
.
// 投递完成,从 gmail.com 处获取的响应
[SMTP] response=b'250\r\n'
[SMTP] Receive message quit
[SMTP] Response b'221\r\n'

以下是 gmail.com 的服务器响应

Receive SMTP request from host[127.0.0.1]
[SMTP] Connection established
[SMTP] Response b'220\r\n'
[SMTP] Receive message HELO
[SMTP] Response b'250\r\n'
[SMTP] Receive message MAIL FROM:<usr1@mail.sustech.edu.cn>
[SMTP] Response b'250\r\n'
[SMTP] Receive message RCPT TO:<usr1@gmail.com>
[SMTP] Response b'250\r\n'
// 投递到本地信箱
[SMTP] Successfully put main in local mailbox usr1@gmail.com
[SMTP] Receive mail
 Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Subject: test
From: usr1@mail.sustech.edu.cn

dGVzdA==
.
.
[SMTP] response=b'250\r\n'
IceLocke commented 10 months ago

改完了,后面发现是实现细节上有点问题