Close logfile after a while waiting for non-smtp input. Bug 1891