That side of things isn't a problem - I am an experienced programmer with lots of experience in client-server programming.
The problem is that the IMAP server I have written doesn't work with Thunderbird. It works fine with Windows Live! Mail, and with Outlook and Outlook Express.
The problem is thus:
Thunderbird connects to the server OK.
It gets the list of mailboxes OK.
It selects a mailbox OK.
It then just disconnects.
At this point on other servers it should be sending a UID request to get the contents of the mailbox, but it doesn't with my server and I can't work out why. Traces follow.
28942: >> * OK [CAPABILITY IMAP4rev1 UIDPLUS QUOTA CHILDREN STARTTLS IDLE] 28942: << 1 STARTTLS 28942: >> 1 OK Start TLS Negotiation Now 28942: << 2 capability 28942: >> * CAPABILITY IMAP4rev1 UIDPLUS QUOTA CHILDREN STARTTLS IDLE 28942: >> 2 OK CAPABILITY Completed 28942: << 3 login "xxxxxx" "xxxxxx" 28942: >> 3 OK LOGIN Ok 28942: << 4 select "Sales" 28942: >> * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) 28942: >> * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited 28942: >> * 311 EXISTS 28942: >> * 311 RECENT 28942: >> * 8 UNSEEN 28942: >> * OK [UIDVALIDITY 1] UIDs valid 28942: >> * OK [UNSEEN 241] Message 241 is first unseen 28942: >> 4 OK [READ-WRITE] Ok 28942: << 5 logout 28942: >> 5 OK LOGOUT Completed
Trace from Courier IMAP:
>> * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information. << 1 login "xxxxxx" "xxxxxx" >> 1 OK LOGIN Ok. << 2 select "INBOX.test" >> * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) >> * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited >> * 4 EXISTS >> * 0 RECENT >> * OK [UIDVALIDITY 1272828277] Ok >> * OK [MYRIGHTS "acdilrsw"] ACL >> 2 OK [READ-WRITE] Ok << 3 getquotaroot "INBOX.test" >> * QUOTAROOT "INBOX.test" "ROOT" >> * QUOTA "ROOT" >> 3 OK GETQUOTAROOT Ok. << 4 UID fetch 1:* (FLAGS) >> * 1 FETCH (UID 1 FLAGS (\Seen)) >> * 2 FETCH (UID 2 FLAGS (\Seen)) >> * 3 FETCH (UID 3 FLAGS (\Seen)) >> * 4 FETCH (UID 4 FLAGS (\Seen)) >> 4 OK FETCH completed. << 5 IDLE >> + entering idle mode << DONE >> 5 OK IDLE completed
The only obvious difference is that courier supports Quota and my server doesn't. Also, I disabled TLS on the courier connection so I could get the trace.
It's really doing my head in. As I say it all works fine on other email clients, but Thunderbird is the one I need to support most. Another thing that's really annoying is that it was working ok at a much earlier stage of the development process (but the others weren't) and I can't work out what has changed.
Any thoughts or ideas would be greatfully received.