Larry Low wrote: > My mistake. Now I know something is wrong. I misunderstood what > UNSEEN meant when you select a mailbox. This was the output of the > SELECT indicating 36 is the first unseen message. The SEARCH returns > no 36 and I am fairly sure there were no messages marked as deleted > with a status of 0 in the database.
/fairly/ sure? Why not do a x fetch 1:* (flags) and /be/ sure. It's perfectly valid for message 36 to be unseen *and* deleted. The status field in the messages table is not really relevant here. That field is never updated by the imap code - only by the pop3 and maintenance code. Whether a message is returned by 'search not seen' is only determined by the seen_flag field. > > A4 SELECT INBOX > * 87 EXISTS > * 1 RECENT > * FLAGS (\Seen \Answered \Deleted \Flagged \Draft) > * OK [PERMANENTFLAGS (\Seen \Answered \Deleted \Flagged \Draft)] > * OK [UIDNEXT 604193] Predicted next UID > * OK [UIDVALIDITY 11957] UID value > * OK [UNSEEN 36] first unseen message > A4 OK [READ-WRITE] SELECT completed > A5 SEARCH UNDELETED ALL > * SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 > 24 25 26 27 28 29 30 31 32 33 34 35 51 52 53 54 55 56 57 58 59 60 61 > 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 > 85 86 87 What are you trying to achieve here? -- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
