IMAP 商店总是有收件箱吗?

Does an IMAP store always have an INBOX?

我正在使用 JavaMail 的 IMAP 商店。

打开收件箱时,是否可以假设该名称始终被称为 "INBOX"?

IMAPFolder folder = (IMAPFolder) store.getFolder("INBOX");

或者 "inbox" 名称没有什么特别之处,在瑞典 IMAP 服务器上它可以称为 "inkorg"?

我想这个问题同样适用于 IMAP,除了 JavaMail。

是的。此外,根据 RFC 3501: INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1,INBOX 有一些特殊的启动行为:

5.1。邮箱命名

The case-insensitive mailbox name INBOX is a special name reserved to mean "the primary mailbox for this user on this server". The interpretation of all other names is implementation-dependent.

6.3.3。创建命令

It is an error to attempt to create INBOX or a mailbox with a name that refers to an extant mailbox.

6.3.4。删除命令

It is an error to attempt to delete INBOX or a mailbox name that does not exist.

6.3.5。重命名命令

Renaming INBOX is permitted, and has special behavior. It moves all messages in INBOX to a new mailbox with the given name, leaving INBOX empty. If the server implementation supports inferior hierarchical names of INBOX, these are unaffected by a rename of INBOX.