Fixed a wrong status test in local scan mail handling.