SMTP命令
SMTP(Simple Mail Transfer Protocol)简单邮件传输协议
Basic Commands:
HELO(Hello):标识用户身份
MAIL FROM:发件人地址
RCPT TO(Recipient To):接收人地址
DATA:消息内容
RSET(Reset):传输终止,会话重置
VRFY(Verify):验证用户名或邮箱是否存在,大多数邮箱忽略此命令
NOOP(No operation):让服务器应响应一个OK
QUIT:关闭连接Extended Commands:
EHLO(Extended Hello):标识用户身份
AUTH(Authentication):认证连接
STARTTLS(Start Transport Layer Security):
SIZE:消息最大值
HELP:帮助信息
参考:http://www.samlogic.net/articles/smtp-commands-reference.htm
举例
C:telnet smtp.163.com 25
Trying 123.125.50.138…
Connected to smtp.163.com.
Escape character is ‘^]’.
220 163.com Anti-spam GT for Coremail System > (163com[20141201])
C:helo 163.com
S:250 OK
C:auth login
S:334 dXNlcm5hbWU6
C:eHVlY2hhb2FtQDE2My5jb20= //base64加密
S:334 UGFzc3dvcmQ6
C:MTk5MDA5Mj=
S:235 Authentication successful
C:mail from:xuechaoam@163.com
S:250 Mail OK
C:rcpt to:xuechaoam@163.com
S:250 Mail OK
C:data
S:354 End data with .
C:from:1798211707@qq.com
to:xuechaoam@163.com
subject:fuck you!I love you
.
S:250 Mail OK queued as smtp1,C9GowAA3xugOUyRZWsPXAA–.4109S2 1495552836
C:quit
S:221 Bye
Connection closed by foreign host.