我面临一个奇怪的问题,其中在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...

有人可以帮助我了解发生了什么吗?

最佳答案

imapwiki.org所示,应避免使用*通配符,因此应使用1 LIST "" %而不是1 LIST "" *不仅如此,LIST是一个宽松定义的命令,在使用1 LIST "" *时通常会产生重复项。使用1 LIST "" %可解决此问题。

关于imap - 现有邮箱不存在获取邮箱,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51914889/

10-14 02:27