clean up mail read loop