close reader when all mails processed