imap 自定义关键字

发布于 2024-09-17 12:57:09 字数 195 浏览 7 评论 0原文

我从哪里开始呢?

我似乎找不到任何明确的文档。 (我可能找错地方了......)。

我希望能够编辑电子邮件的 IMAP 关键字(用于标记目的)。

我有一些非常菜鸟的问题; 它们是如何添加的? 关键字是否直接应用于消息标头(如果是,语法是什么),或者是否有其他类型的 imap 巫毒在起作用......

提前致谢。

where do I begin?

I can't seem to find any definitive documentation. (I am probably looking in the wrong places....).

I want to be able to edit IMAP keywords (for tagging purposes) for email messages.

I have some really noobie questions;
how are they added?
are keywords applied directly to message headers (if so, what is the syntax), or is there some other kind of imap voodoo at work...

thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扬花落满肩 2024-09-24 12:57:34

IMAP 自定义关键字通过 STORE 命令应用于邮件。添加后,当您对 FLAGS 执行 FETCH 时,它们将会被返回,并且可以通过 SEARCH KEYWORD 搜索它们:

A001 FETCH 5 (UID RFC822.SIZE FLAGS)
* 5 FETCH (UID 292 RFC822.SIZE 2554 FLAGS (\Seen))
A001 OK FETCH completed

A002 STORE 5 +FLAGS (pending ignored uninteresting)
* 5 FETCH (FLAGS (\Seen pending ignored uninteresting))
A002 OK STORE completed

A003 FETCH 5 (UID RFC822.SIZE FLAGS)
* 5 FETCH (UID 292 RFC822.SIZE 2554 FLAGS (\Seen pending ignored uninteresting))
A003 OK FETCH completed

A004 SEARCH KEYWORD pending
* SEARCH 5
A004 OK SEARCH completed

请注意,当您通过STORE创建新关键字,服务器应该响应所有系统和用户标记的更新列表在邮箱上定义:

A002 STORE 5 +FLAGS (pending ignored uninteresting)
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen pending ignored uninteresting)
* 5 FETCH (FLAGS (pending ignored uninteresting))
A002 OK STORE completed

某些服务器不允许您创建使用定义的关键字。当您SELECT邮箱时,他们会通过在PERMANENTFLAGS列表末尾不包含\*来让您知道这一点。

STORE 命令允许您将关键字添加到邮件的现有集合中(通过 +FLAGS)、删除它们(-FLAGS)或替换设置一个全新的集合(FLAGS)。

IMAP custom keywords are applied to messages via the STORE command. Once added, they'll be returned when you do a FETCH for FLAGS and they'll be searchable via SEARCH KEYWORD:

A001 FETCH 5 (UID RFC822.SIZE FLAGS)
* 5 FETCH (UID 292 RFC822.SIZE 2554 FLAGS (\Seen))
A001 OK FETCH completed

A002 STORE 5 +FLAGS (pending ignored uninteresting)
* 5 FETCH (FLAGS (\Seen pending ignored uninteresting))
A002 OK STORE completed

A003 FETCH 5 (UID RFC822.SIZE FLAGS)
* 5 FETCH (UID 292 RFC822.SIZE 2554 FLAGS (\Seen pending ignored uninteresting))
A003 OK FETCH completed

A004 SEARCH KEYWORD pending
* SEARCH 5
A004 OK SEARCH completed

Note that when you create a new keyword via STORE, the server should respond with an updated list of all the system and user flags defined on the mailbox:

A002 STORE 5 +FLAGS (pending ignored uninteresting)
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen pending ignored uninteresting)
* 5 FETCH (FLAGS (pending ignored uninteresting))
A002 OK STORE completed

Some servers won't allow you to create used-defined keywords. They'll let you know this by not including \* at the end of the PERMANENTFLAGS list when you SELECT the mailbox.

The STORE command allows you to add keywords to a message's existing set (via +FLAGS), remove them (-FLAGS), or replace the set with an entirely new set (FLAGS).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文