我面临一个奇怪的问题,即在LIST命令中显示一个邮箱,但是当我选择它时,它说“邮箱不存在”。我也可以选择子文件夹。
x login <email> <pwd>
x OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY NOTIFY METADATA QUOTA] Logged in
x list "" "*"
* LIST (\HasChildren) "/" ABC
* LIST (\HasNoChildren \UnMarked) "/" ABC/aaa
* LIST (\HasChildren \UnMarked) "/" Spam
* LIST (\HasChildren) "/" INBOX
* ... other mailboxes
x OK List completed (0.026 + 0.000 + 0.025 secs).
选择ABC邮箱会使邮箱不存在,但由于其子文件夹不存在:
x SELECT "ABC"
x NO Mailbox doesn't exist: ABC (0.006 + 0.000 + 0.005 secs).
x SELECT "ABC/aaa"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANEN....
选择“垃圾邮件”或“收件箱”或其他任何文件夹都可以:
x SELECT "Spam"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Delete
x SELECT "INBOX"
* OK [CLOSED] Previous mailbox closed.
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded $cl_1 $cl_2)
* OK [PERMANENTFLAG...
有人可以帮助我了解发生了什么事吗?
答案 0 :(得分:0)
如imapwiki.org所示,应避免使用*通配符,因此应使用1 LIST "" %
而不是1 LIST "" *
除此之外,LIST
是一个宽松定义的命令,在使用1 LIST "" *
时通常会产生重复。使用1 LIST "" %
可解决此问题。