$OpenBSD: patch-src_imap-login_imap-proxy_c,v 1.3 2011/01/04 13:59:17 pea Exp $
--- src/imap-login/imap-proxy.c.orig	Thu Dec  9 17:39:21 2010
+++ src/imap-login/imap-proxy.c	Thu Dec  9 17:41:00 2010
@@ -436,6 +436,11 @@ int imap_proxy_new(struct imap_client *client, const c
 		client_send_tagline(client, PROXY_FAILURE_MSG);
 		return -1;
 	}
+	if (host == NULL || *host == '\0') {
+		client_syslog_err(&client->common, "proxy: host not given");
+		client_send_tagline(client, PROXY_FAILURE_MSG);
+		return -1;
+	}
 
 	i_assert(client->refcount > 1);
 	connection_queue_add(1);
