Skip to content


การใช้คำสั่ง IMAP เบื้องต้น (2)

การใช้คำสั่ง IMAP ต่อจากหน้าแรก (ซึ่งขณะนี้ได้รวบรวมไปไใน wiki แล้ว

จาก WikiBall

เนื้อหา



การใช้

ก่อนเข้าต้อง CAPABILITY ส่วนของ command ก่อน แล้วจึง login โดยสามารถเปลี่ยน a001 เป็นคำอะไรก็ได้ที่สื่อความหมาย

[]:[8:48am]:[/home/rnejdl] > telnet mail 143
Trying 66.13.175.242...
Connected to tethys.ringofsaturn.com.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS AUTH=LOGIN] tethys.r
ingofsaturn.com IMAP4rev1 2004.350 at Sun, 8 Aug 2004 13:51:21 -0500 (CDT)
<strong>a001 CAPABILITY</strong>
* CAPABILITY IMAP4REV1 LITERAL+ IDLE NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT
 SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND SASL-IR LOGIN-REF
ERRALS AUTH=LOGIN
a001 OK CAPABILITY completed
a002 logout
* BYE tethys.ringofsaturn.com IMAP4rev1 server terminating connection
a002 OK LOGOUT completed
Connection closed by foreign host.


login

โดยใช้คำสั่ง

<strong>a002 login username password</strong>
a002 OK LOGIN Ok.


รายการ Mailbox

<strong>. LIST "INBOX""*"</strong>
* LIST (\HasNoChildren) "." "INBOX.Spam"
* LIST (\HasNoChildren) "." "INBOX.Drafts"
* LIST (\HasNoChildren) "." "INBOX.Trash"
* LIST (\HasChildren) "." "INBOX.Sent"
. OK LIST completed


เลือก Mailbox

<strong>a003 SELECT INBOX</strong>
a003 select INBOX
* FLAGS ($Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ($Forwarded \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 10 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1217305783] Ok
* OK [MYRIGHTS "acdilrsw"] ACL


Fetching a message

<strong>a004 FETCH 1:* FLAGS</strong>
* 1 FETCH (FLAGS (\Seen))
* 2 FETCH (FLAGS (\Seen))
* 3 FETCH (FLAGS (\Seen))
* 4 FETCH (FLAGS (\Seen))
* 5 FETCH (FLAGS (\Seen))


fetch แบบ full header

<strong>a001 FETCH 1 full</strong>
* 1 FETCH (FLAGS (\Seen) INTERNALDATE "15-Mar-2000 13:10:14 -0500" RFC822.SIZE 1
553 ENVELOPE ("Wed, 15 Mar 2000 13:10:11 -0600" "Perl Stuff" (("Rusty Nejdl" NIL
 "rnejdl" "verio.net")) (("Rusty Nejdl" NIL "rnejdl" "verio.net")) (("Rusty Nejd
l" NIL "rnejdl" "verio.net")) ((NIL NIL "rnejdl" "verio.net")) ((NIL NIL "ttodd"
 "verio.net")) NIL NIL "<20000315131011.A5381@tethys.ringofsaturn.com>") BODY ("
TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 359 9))
a05 OK FETCH completed


Fetch ข้อความ

<strong>a006 FETCH 1 body[text]</strong>
* 1 FETCH (BODY[TEXT] {359}
List of commands:

http://www.spu.edu/help/tech/basic-perl/functions.html

Good into class:

http://www.uga.edu/~ucns/wsg/unix/perl/course/introduction.html

Relational Database overview:

http://wdvl.internet.com/Authoring/DB/Intro/client_server_databases.html

--
Rusty Nejdl
"If it ain't broke, it doesn't have enough features yet."
)
a006 OK FETCH completed


Logout

<strong>a007 logout</strong>
* BYE LOGOUT received
a007 OK Completed


จำนวนโควตาเมลล์

. getquotaroot inbox
<strong>a008 QUOTAROOT inbox user.accountname</strong>
* QUOTA user.accountname (STORAGE 31306 2048000)

permission ของเมลล์โฟล์เดอร์

<strong>a009 getacl inbox</strong>
* ACL inbox accountname lrswipcd admin lrswipcda anyone p
a009 OK Completed
  • l – lookup_flag: mailbox is visible to LIST/LSUB commands
  • r – read_flag: SELECT the mailbox, perform CHECK, FETCH, PARTIAL SEARCH, COPY from mailbox
  • s – seen_flag: keep seen/unseen information across session
  • w – write_flag: STORE flags other than SEEN and DELETED
  • i – insert_flag: perform APPEND, COPY into mailbox
  • p – post_flag: send mail to submission address for mailbox
  • c – create_flag: CREATE new sub-mailboxes in any implementation defined hierarchy
  • d – delete_flag: STORE DELETED flag perform EXPUNGE
  • a – administer_flag: perform SETACL

http://bobpeers.com/technical/telnet_imap.php


อ้างอิงจาก

http://networking.ringofsaturn.com/Protocols/imap.php

รับข้อมูลจาก (Reference) :

จาก WikiBall : http://wiki.memoball.info/index.php/การใช้_IMAP_เบื้องต้น

Posted in IMAP. Tagged with .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.