How to view the IMAP flags in an email client?

We are are setting a the IMAP flags using the Java Mail API. Is there is a way to look at these flags in Thunderbird or other client for debugging purposes?

Answers


You can learn enough of IMAP to use socat to try yourself. Here's a sample exchange, I've marked my input with >, and responses with <:

$ socat READLINE ssl:imap.gmail.com:993,verify=0,crlf
< * OK Gimap ready for requests from [ip]
> a LOGIN user@gmail.com password
< * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH
< a OK user@gmail.com User authenticated (Success)

> a SELECT INBOX
< * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded)
< * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded \*)] Flags permitted.
< * OK [UIDVALIDITY 7] UIDs valid.
< * 836 EXISTS
< * 0 RECENT
< * OK [UIDNEXT 36515] Predicted next UID.
< * OK [HIGHESTMODSEQ 3346208]
< a OK [READ-WRITE] INBOX selected. (Success)

> a FETCH 810:820 (FLAGS)
< * 810 FETCH (FLAGS (\Flagged))
< * 811 FETCH (FLAGS ())
< * 812 FETCH (FLAGS (\Seen))
< * 813 FETCH (FLAGS (\Seen))
< * 814 FETCH (FLAGS (\Seen))
< * 815 FETCH (FLAGS (\Seen))
< * 816 FETCH (FLAGS (\Seen))
< * 817 FETCH (FLAGS ())
< * 818 FETCH (FLAGS ())
< * 819 FETCH (FLAGS ())
< * 820 FETCH (FLAGS ())
< a OK Success

> a LOGOUT
< * BYE LOGOUT Requested
< a OK 73 good day (Success)

You will want to at least skim RFC 3501, so that you understand UIDs and message sequence numbers, and section 6.4.5 will tell you the various things you can ask for in a FETCH command, such as flags, envelope, etc.

Each command is preceded by an arbitrary tag. I've used just a in the examples. It's intended to allow pipelining of commands and responses, so that they can be matched up.

The LOGIN command is just the username and password, and SELECT INBOX chooses the mailbox for the following commands to use. FETCH takes a sequence list (in the example, I said messages with sequence numbers between 810 and 820, and a list of items to fetch, in this case, just the flags.


Get Trojit√°, it shows e-mail flags by default. I have no idea how to configure other MUAs to do the same, but I suspect many of them can do this for you as well.


Need Your Help

Creating a sub domain with php

php html subdomain cpanel

I have hosting with a cpanel accelerated 2 panel here I can manually create a sub domain but is there a way to create a sub domain with a php script so they input the sub domain they like then click

Rails object attributes / db migration defaults

ruby-on-rails ruby-on-rails-3

Suppose I have a User class in rails with a boolean is_subscriber attribute.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.