diff options
| author | Jeffrey Stedfast <fejj@ximian.com> | 2003-11-06 16:26:26 +0000 |
|---|---|---|
| committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-11-06 16:26:26 +0000 |
| commit | e163920a3ed3b6aa40e7d48671e237951f9432b1 (patch) | |
| tree | e785ef46ff98dbeadbe4ca69d13b2c2b11da43ba | |
| parent | de90151fe0913c948b2a458ee6e1351ed2df8541 (diff) | |
| download | evolution-data-server-before-eds-merge.tar.gz | |
Don't bother trying to see if the server advertises EHLO. Simply alwaysbefore-eds-merge
2003-11-05 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (connect_to_server): Don't
bother trying to see if the server advertises EHLO. Simply always
try EHLO and fall back to HELO if EHLO fails. Fixes bug #50535.
| -rw-r--r-- | camel/ChangeLog | 6 | ||||
| -rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 27 |
2 files changed, 15 insertions, 18 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index a1d59ee9e..faff76a42 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2003-11-05 Jeffrey Stedfast <fejj@ximian.com> + + * providers/smtp/camel-smtp-transport.c (connect_to_server): Don't + bother trying to see if the server advertises EHLO. Simply always + try EHLO and fall back to HELO if EHLO fails. Fixes bug #50535. + 2003-11-05 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (camel_smime_context_describe_part): new diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 6e15b33ce..b8dbaa6c1 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -309,27 +309,18 @@ connect_to_server (CamelService *service, int try_starttls, CamelException *ex) g_free (respbuf); return FALSE; } - if (strstr (respbuf, "ESMTP")) - transport->flags |= CAMEL_SMTP_TRANSPORT_IS_ESMTP; } while (*(respbuf+3) == '-'); /* if we got "220-" then loop again */ g_free (respbuf); - /* send EHLO (or HELO, depending on the service type) */ - if (!(transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP)) { - /* If we did not auto-detect ESMTP, we should still send EHLO */ - transport->flags |= CAMEL_SMTP_TRANSPORT_IS_ESMTP; - if (!smtp_helo (transport, ex)) { - if (!transport->connected) - return FALSE; - - /* Okay, apparently this server doesn't support ESMTP */ - camel_exception_clear (ex); - transport->flags &= ~CAMEL_SMTP_TRANSPORT_IS_ESMTP; - if (!smtp_helo (transport, ex) && !transport->connected) - return FALSE; - } - } else { - /* send EHLO */ + /* Try sending EHLO */ + transport->flags |= CAMEL_SMTP_TRANSPORT_IS_ESMTP; + if (!smtp_helo (transport, ex)) { + if (!transport->connected) + return FALSE; + + /* Fall back to HELO */ + camel_exception_clear (ex); + transport->flags &= ~CAMEL_SMTP_TRANSPORT_IS_ESMTP; if (!smtp_helo (transport, ex) && !transport->connected) return FALSE; } |
