Avoid unused local variables
Avoid uninitialized/unused variables
Fix IMAP connection issue with default_socket_timeout < 0 and imap_timeout < 0 (#1489090)