Archive for the ‘protocol’ Category

POP3 vs IMAP

Thursday, August 5th, 2010

POP3 and IMAP are application-layer Internet standard protocols used by local e-mail clients to retrieve e-mails from a remote server over a TCP/IP connection. Virtually all modern e-mail clients and mail servers support both protocols as a means of transferring e-mail messages from a server.

They are both text-based. Both transmit more or less same amount of data.

Here is the brief comparison of both:

POP3 IMAP
Intended message store Client Server
Download message YES YES
Download message headers YES YES
Download specific message part (single attachment) NO YES
Delete message YES YES
Send message NO (use SMTP) NO (use SMTP)
Get only unseen messages NO YES
Mark message Seen/Unseen NO YES
Server side search NO YES
Folders NO YES
Sent items NO YES
SSL YES YES
Push email NO YES

Mail.dll supports both POP3 and IMAP (and SMTP), give it a try at:
http://www.lesnikowski.com/mail/

IMAP: LIST, XLIST and LSUB

Thursday, June 24th, 2010

In IMAP protocol there are two commands to retrieve a folder list from the server.
Most servers use LIST command, some servers support XLIST command (GMail does).

XLIST provides additional folder flags such as \Inbox or \Spam (which are very useful if folder names are localized).

You can read more about XLIST here:
http://www.lesnikowski.com/blog/index.php/localized-gmail-imap-folders/

Unfortunately when you ask for subscribed folders with LSUB , those additional flags are not send by the server. There is no such thing as XLSUB command.

The only way to workaround this limitation is to first download all folders with flags using XLIST, then use LSUB to get subscribed folders and finally match the flags by name.