Alessandro Vesely writes:

On Sat 29/Dec/2012 11:18:53 +0100 Asmaa Ahmed wrote:
[re-arranged for inline replying]
> Date: Sat, 29 Dec 2012 10:45:58 +0100, From: ves...@tana.it
>> On Sat 29/Dec/2012 04:29:34 +0100 Asmaa Ahmed wrote:
>>
>>> I wonder how does courier-imap know that the client is connected, so he
>>> starts processing his messages from 'new' directory to 'cur' directory?
>>
>> Daemon processes are "listening" on the IMAP ports. When they "accept"
>> a new connection they get to know about it.
>
> Is there any possibility to force courier-imap to consider a client
> is always connected?

The client has to do something more than simply being connected, in
order for messages to be moved from new to cur.  I guess it has to list
the folder content.

Pretty much. Processing of the new directory occurs as part of the SELECT command, which opens some folder in the mailbox.

The IMAP client specifies which folder it wants to look by sending the SELECT command, naming some folder. Subsequent IMAP commands refer to that folder.

Another SELECT command gets sent to look at the messages in another folder. A single IMAP connection looks at a single folder at a time.

An IMAP server responds to a SELECT with a bunch of stuff that includes the count of messages in the folder:

a SELECT INBOX
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 26 EXISTS
* 1 RECENT
* OK [UIDVALIDITY 343506161] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
a OK [READ-WRITE] Ok

The "EXISTS" and "RECENT" messages give the count of messages in the folder: 26 messages over all, and one of them was "recent". To form this response, courier-imap looks at new, moves anything it finds there to cur, then counts what's now in cur.

Attachment: pgp4DSXD5lvqu.pgp
Description: PGP signature

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to