[Tutor] imaplib and mutt flags

Bill Campbell bill at celestial.net
Thu Jan 30 03:45:18 CET 2014


I'm writing a python script which uses imaplib to select all
unseen messages from a mail folder to process some messages
flagging them as seen, and leaving others as unseen so they can
be manually processed using the 'mutt' mail client.

After some trial and error, I've figured out how to remove the
\Seen flag from messages I want to look at manually, but I still
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.

I would like to have the script restore the 'N' status flag that
mutt uses instead of 'O'.

The mail server is using courier-imap with Maildir stores on
CentOS Linux.  Mutt access is direct on the file system, not via
IMAP.

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

Political language... is designed to make lies sound truthful and
murder respectable, and to give an appearance of solidity to pure
wind. -- George Orwell


More information about the Tutor mailing list