`
foodyi
  • 浏览: 7909 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

pop3协议参考

阅读更多

原文地址 http://www.pnambic.com/Goodies/POP3Ref.html

 

Protocol Conventions

 

Post Office Protocol, version 3
POP3 RFC 1939, J. Myers & M. Rose
POP3 uses TCP port 110.

Command Responses
All command responses begin with a status line. The status line consists of a status indicator and a keyword possibly followed by additional information. There are currently two status indicators: positive ("+OK") and negative ("-ERR"). Single line command results are generally provided as additional information which follows the status indicator.

Some commands provide a multi-line response which follows a positive status line. After the status line, the server sends additional lines, each terminated by a CRLF pair. When all lines of the response have been sent, a final line is sent, consisting of a termination octet (decimal code 046, ".") and a CRLF pair. If any line of the multi-line response begins with the termination octet, the line is "byte-stuffed" by pre-pending the termination octet to that line of the response. Hence a multi-line response is terminated with the five octets "CRLF.CRLF".

Command Summary
USER name
Defines the user name for access to a maildrop.
  The user name and password string provide authentication and access to a maildrop.

The server may return a positive response even though no such mailbox exists. The server may return a negative response if mailbox exists, but it does not permit plaintext password authentication.
PASS string
Defines the password string for access to a maildrop.
  The user name and password string provide authentication and access to a maildrop.

If a positive response is received, the maildrop is locked and is ready to receive transaction commands.

Since the PASS command has exactly one argument, a POP3 server may treat spaces in the argument as part of the password, instead of as argument separators.
APOP name digest
Provides maildrop access with an encrypted password
  Allows maildrop authentication without sending a password in the clear over the network.

Servers that implement APOP authentication include an RFC822 ‘msg-id’ timestamp in their banner greeting. The `digest' parameter is calculated by applying the MD5 algorithm [RFC1321] to a string consisting of the timestamp (including angle-brackets) followed by a shared secret (e.g. the password). The `digest' parameter itself is a 16-octet value which is sent in hexadecimal format, using lower-case ASCII characters.
QUIT Terminates the session.
 

If messages were marked as deleted, the server attempts to remove them from the maildrop. If an error is encountered while removing messages, some or none of the messages marked as deleted will be removed.

如果消息被标记为删除,服务器会尝试从邮箱删除他们.如果当删除消息时遇到错误,被标记为删除的消息

将会被部分删除或者不删除.


Whether the removal was successful or not, the server then releases any exclusive-access lock on the maildrop and closes the TCP connection.

无论删除是否成功,服务器都会释放独占邮箱的锁以及释放TCP链接.

STAT
Provides ‘drop-listing’ status of the maildrop.

提供邮箱下拉列表的状态

  The minimal drop listing response is an "+OK" followed by a single space, the number of messages in the maildrop, a single space, and the size of the maildrop in octets. More advanced implementations may include other information.

LIST [msg]
Provides ‘scan-listing’ summary of messages in the maildrop.

提供邮箱信息的扫描列表概要

 

If an argument is given, the scan listing for the message follows the positive response header. With no argument, a multi-line response follows with a scan listing for each message in the maildrop.
如果指定一个参数,消息的扫描列表在一个'+'返回头之后.如果没有参数,一个多行的返回在邮箱中每条

消息的一个扫描列表之后
A scan listing consists of the message-number of the message, followed by a single space and the exact size of the message in octets. More advanced implementations may include other information, as parsed from the message.

一个扫描列表由消息的消息数量组成,其次是一个单独的空格和用8进制表示的消息精确的大小.

 

RETR msg
Retrieves a message from the maildrop.

从邮箱中获得消息

 

The message is sent as a multi-line response, being careful to byte-stuff the termination character.

消息被发送当成一个多行的响应,注意字节型结尾的字符.

DELE msg
Mark the msg as deleted from the maildrop.

标记消息为删除从邮箱中

 

Any future reference to the message-number associated with the message in a command generates an error. The server does not actually delete the message until the session enters the UPDATE state via the QUIT command.

任何未来对关联该删除消息的消息号进行引用都会产生一个错误.服务器不会实际删除消息直到该会话输如更新状态通过 QUIT 命令.

NOOP
No operation.
  The server replies with a positive response.
RSET
Reset all messages that are marked as deleted to unmarked.
  The server replies with a positive response.
TOP msg lines
Sends the headers and the requested lines from the indicated msg.
  The headers and lines are sent as a multi-line response. Note that if the number of lines requested is greater than the number of lines in the body, the entire message is sent.
UIDL [msg]
Provides ‘unique id listing’ of messages in the maildrop.
  If an argument is given, the unique-id-listing for the message follows the positive response header. With no argument, a multi-line response follows with a unique-id-listing for each message in the maildrop.

A unique-id-listing consists of the message-number of the message, followed by a single space and the unique-id of the message. No information follows the unique-id.

The unique-id of a message is an arbitrary server-determined string, consisting of one to 70 characters in the range 0x21 to 0x7E, which uniquely identifies a message within a maildrop and which persists across sessions.

Note that messages marked as deleted are not listed.

 

 

分享到:
评论

相关推荐

    RFC1939-POP3协议

    《POP3协议》RFC1939 是互联网标准草案,主要描述了Post Office Protocol的第三版,即POP3,这是一个用于接收电子邮件的协议。该协议主要用于小型设备或资源有限的节点,比如个人计算机或工作站,这些设备无法长期...

    pop3协议

    ### POP3协议详解 #### 一、概述 **POP3协议**(Post Office Protocol Version 3)是一种互联网标准协议,主要用于客户端从服务器上获取电子邮件。该协议最初是为了满足那些资源有限的小型网络节点的需求,例如...

    基于POP3协议的邮件客户端系统的设计与实现毕业论文.docx

    基于POP3协议的邮件客户端系统的设计与实现毕业论文 ...该论文涵盖了电子邮件、POP3协议、Socket套接字编程、Visual C#等多个方面的知识点,对电子邮件客户端系统的设计和实现具有重要的参考价值。

    C#使用POP3协议构建客户端邮件接收源代码

    标题中的"C#使用POP3协议构建客户端邮件接收源代码"是指使用C#编程语言实现一个基于POP3(Post Office Protocol version 3)协议的邮件客户端,该客户端能够连接到邮件服务器,接收并处理电子邮件。POP3是一种标准的...

    python+POP3实现批量下载邮件附件

    本文主要介绍了如何使用Python编程语言配合POP3协议来实现批量下载邮箱中的邮件附件。以下是对本文内容的详细解读,包括知识点、技术细节和操作步骤。 知识点一:Python的基础使用和第三方库 Python是一种广泛使用...

    pop3以太网报文可用wireshark打开

    pop3协议以太网报文,可以用wireshark软件打开,适用于学习pop3报文解析,学习各种以太网协议可参考本人其他下载文件

    pop3.rar_DEMO_VC POP3_pop3_pop3 vc

    标题“pop3.rar_DEMO_VC POP3_pop3_pop3 vc”指的是一个关于POP3协议的VC++编程示例,这个示例程序包含了源代码。POP3(Post Office Protocol version 3)是互联网上用于接收电子邮件的标准协议之一。在这个示例中,...

    SMTP&POP3协议详细&MIME规范

    该压缩包包含三个文档,分别是SMTP协议详解,POP3协议详解,MIME规范详解,文档中详细介绍了一个邮件发送和接收的过程分析,协议本身的包含的命令和工作过程,为开发邮件代理的客户端提供技术基础。如下是部分SMTP...

    POP3.rar_pop3_pop3.

    这个“POP3.rar_pop3_pop3.”文件很可能包含了一个完整的POP3协议实现,将该协议的功能集成到一个类中,便于开发者在自己的应用程序中使用。通过这个压缩包,我们可以深入理解POP3的工作原理以及如何在实际项目中...

    smtp_pop3简介

    smtp协议,pop3协议,简介,为邮箱开发者提供一点参考为邮箱开发者提供一点参考

    pop3.rar_pop3_pop3 winsock

    POP3(Post Office Protocol version 3)是一种广泛用于互联网上的电子邮件接收协议。它允许用户从邮件服务器上下载邮件,...通过分析和理解这些代码,你可以深入学习如何使用WinSock和POP3协议构建自己的邮件客户端。

    Linux平台POP3信箱客户端实现技术.pdf

    POP3协议分为三个状态:验证状态、事务状态和更新状态。在验证状态,客户端可以发送USER、PASS、APOP和QUIT命令进行身份验证;在事务状态,可以执行NOOP、STAT、LIST、RETR、TOP、DELE、RSET和UIDL等命令来操作邮件...

    用STMP和POP3实现email客户端

    你可以通过阅读和分析源代码,加深对STMP和POP3协议以及C#邮件操作的理解,也可以直接运行项目作为学习和参考。 总结来说,STMP和POP3是实现电子邮件客户端的重要组成部分,C#提供了方便的API来实现这两个协议的...

    电子邮件收发原理和实现(POP3, SMTP) [整理]

    POP3协议是“下载并删除”模型,意味着一旦邮件被下载,通常它会被从服务器上移除,尽管现代的POP3实现允许用户选择保留服务器上的邮件。 SMTP协议则用于将邮件从发送方传递到接收方。SMTP服务器之间通过TCP/IP连接...

    POP3邮件编程实现.zip

    1. **POP3协议**:POP3是一种互联网标准协议,用于从邮件服务器下载邮件。它允许用户在本地设备上存储邮件,以便离线阅读和管理。POP3通常用于那些希望将邮件存储在本地而不是云端的用户。 2. **Python实现**:...

    用java实现pop3邮件服务器.rar_java pop3 server_java 邮件服务器_pop3 java_服务器 j

    2. **POP3协议实现**:在Java中实现POP3服务器,我们需要理解并实现POP3的各个命令,如`CAPA`(能力列表)、`USER`(用户认证)、`PASS`(密码验证)、`LIST`(邮件列表)、`RETR`(获取邮件内容)、`DELE`(标记...

    C#通过POP3获取邮件

    本教程将详细介绍如何在C#中利用POP3协议来获取邮件。 首先,我们需要理解POP3的基本工作原理。POP3允许客户端应用程序连接到邮件服务器,并下载存储在该服务器上的邮件。一旦邮件被下载,通常会从服务器上删除,...

    SMTP、POP3收发邮件

    例如,libcurl支持SMTP和POP3协议,并且可以方便地集成到C++项目中。 在`src`目录下,可能包含的是实现SMTP和POP3功能的源代码文件,如SMTPClient.cpp、POP3Client.cpp等,其中可能包含了连接、认证、发送/接收邮件...

    POP3电子邮件客户端及服务器的设计与实现

    知网下载的论文通常经过学术审查,因此,大连理工大学韩金侠的硕士学位论文对于理解 POP3 协议的实现原理有着较高的参考价值。论文可能详细阐述了 POP3 客户端和服务器的设计理念、系统架构、功能实现、测试结果及...

Global site tag (gtag.js) - Google Analytics