* movemail.c: Fix race condition and related bugs (Bug#8836).