+2006-05-09 Jeffrey Stedfast <fejj@novell.com>
+
+ * camel-smtp-transport.c (smtp_helo): Reverted. David Woodhouse
+ can fix his own damn server since he configured it to be broken.
+
2006-04-21 Jeffrey Stedfast <fejj@novell.com>
* camel-smtp-transport.c (connect_to_server_wrapper): Don't do
}
static gboolean
-hostname_is_valid (const char *name)
-{
- enum { ALNUM, DASH, DOT } state = DOT;
- gboolean dotseen = FALSE;
-
- if (!name)
- return FALSE;
-
- while (*name) {
- switch (state) {
- case ALNUM:
- if (*name == '-') {
- state = DASH;
- break;
- } else if (*name == '.') {
- dotseen = TRUE;
- state = DOT;
- break;
- } /* else ... */
- case DOT:
- case DASH:
- if (!isalnum (*name))
- return FALSE;
- state = ALNUM;
- break;
- }
- name++;
- }
-
- /* If it didn't end with an alphanumeric character, or there were no
- dots, it's invalid */
- if (state != ALNUM || !dotseen)
- return FALSE;
- else
- return TRUE;
-}
-
-static gboolean
smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
{
char *name = NULL, *cmdbuf = NULL, *respbuf = NULL;
addrlen = transport->localaddrlen;
/* force name resolution first, fallback to numerical, we need to know when it falls back */
- if (camel_getnameinfo (addr, addrlen, &name, NULL, NI_NAMEREQD, NULL) != 0 || !hostname_is_valid (name)) {
+ if (camel_getnameinfo (addr, addrlen, &name, NULL, NI_NAMEREQD, NULL) != 0) {
g_free (name);
if (camel_getnameinfo (addr, addrlen, &name, NULL, NI_NUMERICHOST, NULL) != 0) {
name = g_strdup ("localhost.localdomain");