diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c
index 68d2dd9..1b1de5c 100644
--- a/camel/camel-sasl-gssapi.c
+++ b/camel/camel-sasl-gssapi.c
@@ -79,6 +79,13 @@ extern gss_OID gss_nt_service_name;
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), CAMEL_TYPE_SASL_GSSAPI, CamelSaslGssapiPrivate))
 
+static const char spnego_OID[] = "\x2b\x06\x01\x05\x05\x02";
+static const gss_OID_desc gss_mech_spnego = {
+       6,
+       &spnego_OID
+};
+
+
 #ifndef GSS_C_OID_KRBV5_DES
 #define GSS_C_OID_KRBV5_DES GSS_C_NO_OID
 #endif
@@ -114,6 +121,7 @@ struct _CamelSaslGssapiPrivate {
 	gint state;
 	gss_ctx_id_t ctx;
 	gss_name_t target;
+	gss_OID mech;
 };
 
 #endif /* HAVE_KRB5 */
@@ -315,6 +323,10 @@ sasl_gssapi_challenge_sync (CamelSasl *sasl,
 		if (ai == NULL)
 			goto exit;
 
+		/* HTTP authentication should be SPNEGO not just KRB5 */
+		if (!strcmp (service_name, "HTTP"))
+			priv->mech = (gss_OID)&gss_mech_spnego;
+
 		str = g_strdup_printf ("%s@%s", service_name, ai->ai_canonname);
 		camel_freeaddrinfo (ai);
 
@@ -489,5 +501,6 @@ camel_sasl_gssapi_init (CamelSaslGssapi *sasl)
 	sasl->priv->state = GSSAPI_STATE_INIT;
 	sasl->priv->ctx = GSS_C_NO_CONTEXT;
 	sasl->priv->target = GSS_C_NO_NAME;
+	sasl->priv->mech = GSS_C_OID_KRBV5_DES;
 #endif /* HAVE_KRB5 */
 }
