'Pass 2: Remove locally deleted messages on dst.
Get all UIDs in statusfolder but not self. These are messages
that were deleted in \'self\'. Delete those from dstfolder and
statusfolder.
This function checks and protects us from action in dryrun mode.'

def __syncmessagesto_delete(self, dstfolder, statusfolder):

    deletelist = [uid for uid in statusfolder.getmessageuidlist() if ((uid >= 0) and (not self.uidexists(uid)) and (self._sync_deletes or (not dstfolder.uidexists(uid))))]
    if len(deletelist):
        if (not self.repository.account.dryrun):
            statusfolder.deletemessages(deletelist)
        deletelist = [uid for uid in deletelist if dstfolder.uidexists(uid)]
        if len(deletelist):
            self.ui.deletingmessages(deletelist, [dstfolder])
            if (not self.repository.account.dryrun):
                dstfolder.deletemessages(deletelist)
