'Gets the current message list.
This function\'s implementation is quite expensive for the mapped UID
case.  You must call cachemessagelist() before calling this function!'

def getmessagelist(self):

    retval = {}
    localhash = self._mb.getmessagelist()
    with self.maplock:
        for (key, value) in list(localhash.items()):
            try:
                key = self.l2r[key]
            except KeyError:
                continue
            value = value.copy()
            value['uid'] = self.l2r[value['uid']]
            retval[key] = value
        return retval
