[Tutor] imaplib and mutt flags

Bill Campbell bill at celestial.net
Thu Jan 30 17:44:24 CET 2014


On Thu, Jan 30, 2014, Alan Gauld wrote:
> On 30/01/14 02:45, Bill Campbell wrote:
>> I'm writing a python script which uses imaplib
>
> We don't get many messages about imaplib so I'm
> not sure how many folks here know about it.

I've used it off and on for years, but still don't know much
about it :-).

>> After some trial and error, I've figured out how to remove the
>> \Seen flag from messages I want to look at manually,
>
> Then it's probably a good idea to post at least a code
> extract showing us how you are going about that.
> We work better when we have code to look at...
>
>> have a bit of a problem in that when I open the folder with mutt
>> using direct access to the Maildir folder in the file system,
>> mutt flags these parsed but unseen messages with the 'O' instead
>> of 'N' which is uses for new messages.
>
> We have some mutt users so they may be able to p[itch in here.
>
>> The mail server is using courier-imap with Maildir stores on
>> CentOS Linux.  Mutt access is direct on the file system, not via
>> IMAP.
>
> OK, Final missing piece is which Python version?

On this machine, Python 2.4.6.

It seems my main problem is more related to the way that
courier-imap and mutt handle the Maildir stores.  Mutt
distinguishes unread messages as 'N' where the messages are in
the $folder/new directory and 'O' in $folder/cur, and moves them
from cur to new when one manually changes the flag to 'N'.

The IMAP protocol hides the mail store so one cannot manage the
message files as this depends on the physical storage format,
Maildir, UW IMAP, etc.

The bottom line is that this isn't an imaplib/python problem.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

The problems we face today are there because the people who work for a
living are now outnumbered by those who vote for a living. -- Anonymous


More information about the Tutor mailing list