OK here is a first pass at modifying gnus-summary-refer-thread to work with imap. It seemed like a good idea to factor out a thread-searching function for nnimap, so I did. Only lightly tested. Regards, Andy