BASE64编码的用户名密码
我们需要把我们的登录帐号和密码一起编码
可通过以下网站进行编码:
https://c.runoob.com/front-end/693/
接下来我们通过telnet登陆邮件服务器
SMTP 登录并发送邮件
telnet localhost 25 #在服务器上telnet到本地,下面的是正常输出
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 u910.example.com ESMTP iRedMail (Ubuntu)
ehlo example.com #握手
250-u910.example.com
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth plain d3d3QGV4YW1wbGUuY29tAHd3d0BleGFtcGxlLmNvbQBpcmVkbWFpbA== # 输入base 64编码后的用户名和密码
235 2.7.0 Authentication successful
mail from:[email protected] #使用 [email protected] 帐号对外发送邮件
250 2.1.0 Ok
rcpt to:[email protected] #发送邮件到 [email protected] 这个邮箱
250 2.1.5 Ok
data #输入data命令后,下面就是邮件的内容
354 End data with
to:[email protected] #这是邮件里显示的发送给谁。
from:[email protected] #那个帐号发送过来的
subject: test by telnet smtp #邮件的主题
test , just a test ,check the subject whetehr working.
. #写完邮件后,输入一个点,回车,就表示邮件完成。
250 2.0.0 Ok: queued as B6B4820EC9
quit #退出
221 2.0.0 Bye
Connection closed by foreign host.
pop3连接可以在远程使用命令行或者本地来测试pop3
telnet localhost 110 #登录110端口
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user [email protected] #输入登录的邮件帐号
+OK
pass iredmail #帐号的密码,这里直接输入密码就可以
+OK Logged in.
list #查看邮箱里的邮件
+OK 4 messages:
1 1182
2 6195
3 1588
4 878
.
retr 1 #显示第一封邮件内容
quit #退出
+OK Logging out.
Connection closed by foreign host.