Chỉ hỗ trợ download và xóa mail Cổng(Port) chuẩn:

Một phần của tài liệu điện thoại BlackBerry (Trang 34 - 38)

- Cổng(Port) chuẩn: 110

- .v.v.

b) Lịch sử:

c) Các câu lệnh hỗ trợ:

(1) USER userid Tham số: userid: tên truy cập của người dùng.

Câu lệnh USER cung cấp User của người dùng cho Server.

Câu lệnh này là câu lệnh đầu tiên sau khi thực hiện việc connect với server.

(2) PASS pwd

Câu lệnh PASS cung cấp một mật khẩu dạng plaintext để chứng thực User đã điền ở phía trên. trên.

Thực hiện sau câu lệnh USER, câu lệnh này để điền password khi đăng nhập vào mail, với pwd là chuỗi password. pwd là chuỗi password.

(3) STAT

Cho biết số lượng mail và dung lượng tổng cộng của các mail đó trong hòm thư. Nếu câu lệnh thành công thì nó sẽ trả về dạng +OK #msgs #bytes. Trong đó: lệnh thành công thì nó sẽ trả về dạng +OK #msgs #bytes. Trong đó:

- #msgs: số lượng mail có trong hòm mail.

- #bytes: tổng dung lượng(tính theo đơn vị byte) của các mail trong hòm thư đó.

(4) LIST

Liệt kê số lượng mail và dung lượng của từng mail, mỗi mail liệt kê một dòng, ví dụ như:+OK 3 messages +OK 3 messages

1 12052 305 2 305 3 344400

Ở ví dụ trên hòm mail có 3 mail, được liệt kê ở dưới.

(5) LAST

Trả về số thứ tự của mail được đọc hoặc xóa cuối cùng.

(6) RETR msg#

Gởi về mail thứ msg# trong hòm thư, ví dụ khi thực hiện câu lệnh RETR 3, hòm thư sẽ trả về nội dung mail thứ 3 trong hòm thư. về nội dung mail thứ 3 trong hòm thư.

(7) TOP msg# line#

Gởi về nội dung mail thứ msg# và line# dòng đầu trong mail đó, ví dụ như TOP 3 5 sẽ gởi về nội dung 5 dòng đầu của mail thứ 3. về nội dung 5 dòng đầu của mail thứ 3.

Lưu ý: Không phải server nào cũng hỗ trợ câu lệnh này.

(8) DELE msg#

Đánh dấu là sẽ xóa mail thứ msg# trong hòm thư. Lệnh này chỉ được thực thi thật sự khi lệnh QUIT được thực thi. Nếu kết nối tới server bị ngắt trước khi thực hiện lệnh QUIT. lệnh QUIT được thực thi. Nếu kết nối tới server bị ngắt trước khi thực hiện lệnh QUIT. Câu lệnh xóa mail này sẽ không diễn ra.

(9) RSET

Câu lệnh này sẽ hủy tất cả những thư bị đánh dấu bởi lệnh DELE. Khi thực hiện lệnh QUIT thì các thư đã được RSET sẽ không bị xóa. QUIT thì các thư đã được RSET sẽ không bị xóa.

(10) APOP UsernameEncryptedKey

Cho phép kích hoạt chế độ bảo mật của chứng thực POP3. Khi chế này được kích hoạt, password sẽ không được gởi dưới dạng text thông thường mà gởi dưới dạng chuỗi đã được password sẽ không được gởi dưới dạng text thông thường mà gởi dưới dạng chuỗi đã được mã hóa bằng thuật toán MD5 từ password, process ID và thời gian. (adsbygoogle = window.adsbygoogle || []).push({});

(11) QUIT

Xóa tất cả mail được đánh dấu bằng lệnh DELE. Sau đó ngắt kết nối khỏi server.

3. SMTP( Simple Mail Transfer Protocol)

a) Tổng quan:

Simple Mail Tranfer Protocol là giao thức được định nghĩa để hỗ trợ việc gởi mail.

b) Lịch sử:

c) Các câu lệnh hỗ trợ:

(1) HELO <SP> <domain> <CRLF>

Khởi tạo quá trình trao đổi giữa người dùng và server. Giúp cho server biết được mình đang giao tiếp với ai. đang giao tiếp với ai.

Ví dụ: HELO mydomain.com

(2) MAIL <SP> FROM:<reverse-path> <CRLF> Cho biết ai đang gởi mail.

Ví dụ: MAIL FROM: <mymail@mydomain.com>.

(3) RCPT <SP> TO:<forward-path> <CRLF> Cho biết ai sẽ là người nhận mail.

Ví dụ: RCPT TO: <yourmail@yourdomain.com>.(4) DATA <CRLF> (4) DATA <CRLF>

Cho biết bạn đang gởi nội dung của mail. Nội dung của mail bắt buộc phải kết thúc bằng 5 ký tự “\r\n.\r\n”. ký tự “\r\n.\r\n”.

(5) RSET <CRLF>

Hủy bỏ giao tiếp đang thực hiện(gồm MAIL, RCPT, DATA).

(6) SEND <SP> FROM:<reverse-path> <CRLF>

This command is used to initiate a mail transaction in which the mail data is delivered to one or more terminals. The argument field contains a reverse-path. This command is successful if the more terminals. The argument field contains a reverse-path. This command is successful if the message is delivered to a terminal.

The reverse-path consists of an optional list of hosts and the sender mailbox. When the list of hosts is present, it is a "reverse" source route and indicates that the mail was relayed through each host is present, it is a "reverse" source route and indicates that the mail was relayed through each host on the list (the first host in the list was the most recent relay). This list is used as a source route to return non-delivery notices to the sender. As each relay host adds itself to the beginning of the list, it must use its name as known in the IPCE to which it is relaying the mail rather than the IPCE from which the mail came (if they are different).

This command clears the reverse-path buffer, the forward-path buffer, and the mail data buffer; and inserts the reverse-path information from this command into the reverse-path buffer. and inserts the reverse-path information from this command into the reverse-path buffer.

(7) SOML <SP> FROM:<reverse-path> <CRLF>

This command is used to initiate a mail transaction in which the mail data is delivered to one or more terminals or more terminals or

mailboxes. For each recipient the mail data is delivered to the recipient's terminal if the recipient is active on the host (and accepting terminal messages), otherwise to the recipient's mailbox. The is active on the host (and accepting terminal messages), otherwise to the recipient's mailbox. The argument field contains a reverse-path. This command is successful if the message is delivered to a terminal or the mailbox.

The reverse-path consists of an optional list of hosts and the sender mailbox. When the list of hosts is present, it is a "reverse" source route and indicates that the mail was relayed through each host is present, it is a "reverse" source route and indicates that the mail was relayed through each host on the list (the first host in the list was the most recent relay). This list is used as a source route to return non-delivery notices to the sender. As each relay host adds itself to the beginning of the list, it must use its name as known in the IPCE to which it is relaying the mail rather than the IPCE from which the mail came (if they are different).

This command clears the reverse-path buffer, the forward-path buffer, and the mail data buffer; and inserts the reverse-path information from this command into the reverse-path buffer. and inserts the reverse-path information from this command into the reverse-path buffer.

(8) SAML <SP> FROM:<reverse-path> <CRLF>

This command is used to initiate a mail transaction in which the mail data is delivered to one or more terminals and mailboxes. For each recipient the mail data is delivered to the recipient's more terminals and mailboxes. For each recipient the mail data is delivered to the recipient's terminal if the recipient is active on the host (and accepting terminal messages), and for all recipients to the recipient's mailbox. The argument field contains a reverse-path. This command is successful if the message is delivered to the mailbox.

The reverse-path consists of an optional list of hosts and the sender mailbox. When the list of hosts is present, it is a "reverse" source route and indicates that the mail was relayed through each host is present, it is a "reverse" source route and indicates that the mail was relayed through each host on the list (the first host in the list was the most recent relay). This list is used as a source route to return non-delivery notices to the sender. As each relay host adds itself to the beginning of the list, it must use its name as known in the IPCE to which it is relaying the mail rather than the IPCE from which the mail came (if they are different).

This command clears the reverse-path buffer, the (adsbygoogle = window.adsbygoogle || []).push({});

forward-path buffer, and the mail data buffer; and inserts the reverse-path information from this command into the reverse-path buffer. command into the reverse-path buffer.

(9) VRFY <SP> <string> <CRLF>

This command asks the receiver to confirm that the argument identifies a user. If it is a user name, the full name of the user (if known) and the fully specified mailbox are returned. the full name of the user (if known) and the fully specified mailbox are returned.

This command has no effect on any of the reverse-path buffer, the forward-path buffer, or the mail data buffer. data buffer.

(10) EXPN <SP> <string> <CRLF>

This command asks the receiver to confirm that the argument identifies a mailing list, and if so, to return the membership of that list. The full name of the users (if known) and the fully specified return the membership of that list. The full name of the users (if known) and the fully specified mailboxes are returned in a multiline reply.

This command has no effect on any of the reverse-path buffer, the forward-path buffer, or the mail data buffer. data buffer.

(11) HELP [<SP> <string>] <CRLF>

This command causes the receiver to send helpful information to the sender of the HELP command. The command may take an argument (e.g., any command name) and return more command. The command may take an argument (e.g., any command name) and return more specific information as a response.

This command has no effect on any of the reverse-path buffer, the forward-path buffer, or the mail data buffer. data buffer.

(12) NOOP <CRLF>

This command does not affect any parameters or previously entered commands. It specifies no action other than that the receiver send an OK reply. action other than that the receiver send an OK reply.

This command has no effect on any of the reverse-path buffer, the forward-path buffer, or the mail data buffer. data buffer.

(13) QUIT <CRLF>

(14) TURN <CRLF>

This command specifies that the receiver must either (1) send an OK reply and then take on the role of the sender-SMTP, or (2) send a refusal reply and retain the role of the receiver-SMTP. role of the sender-SMTP, or (2) send a refusal reply and retain the role of the receiver-SMTP. If program-A is currently the sender-SMTP and it sends the TURN command and receives an OK reply (250) then program-A becomes the receiver-SMTP. Program-A is then in the initial state as if the transmission channel just opened, and it then sends the 220 service ready greeting.

If program-B is currently the receiver-SMTP and it receives the TURN command and sends an OK reply (250) then program-B becomes the sender-SMTP. Program-B is then in the initial state as if reply (250) then program-B becomes the sender-SMTP. Program-B is then in the initial state as if the transmission channel just opened, and it then expects to receive the 220 service ready greeting. To refuse to change roles the receiver sends the 502 reply.

d) Reply codes:

211

Một phần của tài liệu điện thoại BlackBerry (Trang 34 - 38)