Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a dovecot server (maildir). Some clients check their mail through desktop client (POP3) and from their smartphones (IMAP). The problem is that when a message is downloaded through POP3 and gets moved from new to cur folder, the IMAP client does not notify when receiving the message (it is received silently and it is already marked as read). I know that POP3 does not take care about read/unread flags, it justs moves the message in cur folder as it is downloaded, but why does IMAP show the message as read ? The goal here is to make POP3 and IMAP treat read/unread status separately. Is there any way to do so ?

The option to leave the messages is checked, every message is being received both through POP3 and IMAP, but after the mail is retrieved from POP3, in IMAP it appears as read. In dovecot is set pop3_no_flag_updates = no. If I set it to yes, the problem is solved, but all mail stays in "new" folder. It is not being moved to cur.

share|improve this question
add comment

2 Answers 2

Yeah with POP3 make sure you check the option leave messages on the server. Because when pop3 checks the messages it's technically reads the messages.

share|improve this answer
    
The option to leave the messages is checked, every message is being received both through POP3 and IMAP, but after the mail is retrieved from POP3, in IMAP it appears as read. In dovecot is set pop3_no_flag_updates = no. If I set it to yes, the problem is solved, but all mail stays in "new" folder. It is not being moved to cur. –  Joleng May 16 '12 at 7:11
add comment

You say that if you set pop3_no_flag_updates=yes that the mail remains in the /new folder, I believe that is by design.

One reason is that the original maildir specification states that messages in the new folder cannot have flags. So if it isn't setting a flag, there is no reason for it to move it to /cur (if it isn't doing a part of the work, it won't do any of it I suspect).. For example (from the courier maildir page):

Applications that read mail from maildirs should do it in the following order:

When opening a maildir or a maildir folder, read the tmp subdirectory and delete any files in there that are at least 36 hours old.

Look for new messages in the new subdirectory. Rename new/filename, as cur/filename:2,info. Here, info represents the state of the message, and it consists of zero or more boolean flags chosen from the following: “D” - this is a 'draft' message, “R” - this message has been replied to, “S” - this message has been viewed (seen), “T” - this message has been marked to be deleted (trashed), but is not yet removed (messages are removed from maildirs simply by deleting their file), “F” - this message has been marked by the user, for some purpose. These flags must be stored in alphabetical order. New messages contain only the :2, suffix, with no flags, indicating that the messages were not seen, replied, marked, or deleted.

Why it could't move it to cur anyways.. I don't know, but I suspect it may have something to do with the RFCs, you might want to ask Timo

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.