After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734853 - CamelNetworkService fails to connect to 'localhost'
CamelNetworkService fails to connect to 'localhost'
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.13.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 735652 (view as bug list)
Depends on:
Blocks: 731585
 
 
Reported: 2014-08-15 11:23 UTC by Fabien Tassin
Modified: 2014-09-04 09:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabien Tassin 2014-08-15 11:23:56 UTC
using evo 3.13.4, I can't use smtp auth anymore. This used to work (for years) with the same server side setup, it worked at least until 3.13.1, not sure when it started to fail.

The situation is:
- evo imapx account configured to post using SMTP on a server+port, using authentication, and STARTTLS. The server is localhost:587 which is an ssh tunnel to a remote server.
- when I try to check for the supported authentication types, I get none (they are all stroke out) and I can't post either.

In the evo log, I see:

(evolution:13213): camel-CRITICAL **: network_service_connect_sync: assertion 'connectable != NULL' failed

(I even tried CAMEL_DEBUG=smtp and even CAMEL_DEBUG=all to get more data, nada)

I get the same assert when I try to post a mail on that account with evo showing a not-very-helpful message:

  An error occurred while sending. How do you want to proceed?
  The reported error was "Cannot send message: service not connected.".

here is the stack of the assert:

Breakpoint 4, g_log (log_domain=log_domain@entry=0x7ffff6de7909 "camel", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, 
    format=format@entry=0x7ffff3c2076a "%s: assertion '%s' failed") at /build/buildd/glib2.0-2.40.0/./glib/gmessages.c:1067
1067	in /build/buildd/glib2.0-2.40.0/./glib/gmessages.c
(gdb) bt
  • #0 g_log
    at /build/buildd/glib2.0-2.40.0/./glib/gmessages.c line 1067
  • #1 g_return_if_fail_warning
    at /build/buildd/glib2.0-2.40.0/./glib/gmessages.c line 1080
  • #2 network_service_connect_sync
    at camel-network-service.c line 622
  • #3 connect_to_server
    at camel-smtp-transport.c line 139
  • #4 smtp_transport_query_auth_types_sync
    at camel-smtp-transport.c line 655
  • #5 service_query_auth_types_thread
    at camel-service.c line 2287
  • #6 g_task_thread_pool_thread
    at /build/buildd/glib2.0-2.40.0/./gio/gtask.c line 1213
  • #7 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.40.0/./glib/gthreadpool.c line 307
  • #8 g_thread_proxy
    at /build/buildd/glib2.0-2.40.0/./glib/gthread.c line 764
  • #9 start_thread
    at pthread_create.c line 312
  • #10 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111
  • #0 g_log
    at /build/buildd/glib2.0-2.40.0/./glib/gmessages.c line 1067
  • #1 g_return_if_fail_warning
    at /build/buildd/glib2.0-2.40.0/./glib/gmessages.c line 1080
  • #2 network_service_connect_sync
    at camel-network-service.c line 622
  • #3 connect_to_server
    at camel-smtp-transport.c line 139
  • #4 smtp_transport_connect_sync
    at camel-smtp-transport.c line 408
  • #5 service_shared_connect_thread
    at camel-service.c line 555
  • #6 g_task_thread_pool_thread
    at /build/buildd/glib2.0-2.40.0/./gio/gtask.c line 1213
  • #7 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.40.0/./glib/gthreadpool.c line 307
  • #8 g_thread_proxy
    at /build/buildd/glib2.0-2.40.0/./glib/gthread.c line 764
  • #9 start_thread
    at pthread_create.c line 312
  • #10 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111


if I telnet manually on localhost:587, the (remote) server is fine and is correctly reporting tls & auth after the initial EHLO:

250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-STARTTLS
Comment 1 Matthew Barnes 2014-08-15 14:12:03 UTC
If you're using "localhost" as your SMTP server, then I suspect:

https://git.gnome.org/browse/evolution-data-server/commit/?id=30ae9231fef6ddf4948294dc63d3c82c5ff719e1
Comment 2 Fabien Tassin 2014-08-15 16:42:22 UTC
hm, good catch. It's a simple string match. I can then workaround it by using "localhost.localdomain" which is the same thing (on Ubuntu) and indeed, it works. Excellent.
I guess the ews "fix" should be reworked somehow. After quickly reading it, it seems it was more a workaround than a fix.
Comment 3 Matthew Barnes 2014-08-15 17:49:41 UTC
Yeah, I don't know the backstory on that.  We'll have to wait for Milan.
Comment 4 Ian Campbell 2014-08-20 23:44:11 UTC
FWIW I saw this as well (recent evolution from jhbuild) and using 127.0.0.1 instead of the literal "localhost" worked for me.
Comment 5 Milan Crha 2014-08-27 12:49:59 UTC
I'm not sure why you call the "ews" change a workaround. It doesn't make much sense to try to connect to 'localhost' (when checking whether the host is online or offline), but the problem is that the same 'connectable' is used for actual connection, which is correct to be done (and I missed that part). The other issue is that there is no way to distinguish between user-entered 'localhost' and the default value of 'localhost' for that property. Yes, the default value is 'localhost', instead of an empty string. These are the main obstacles I faced with the design before the "ews" fix.
Comment 6 Milan Crha 2014-08-27 13:19:31 UTC
I chose a different approach now, which works. Thinking of it, connecting to localhost makes sense too, especially when targeting certain port where the service should be listening, thus my initial change was not correct.

Created commit b8674dd in eds master (3.13.6+) [1]
Created commit f64da6b in eds evolution-data-server-3-12 (3.12.6+)

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=b8674dd
Comment 7 Jordi Mallach 2014-09-04 09:50:22 UTC
*** Bug 735652 has been marked as a duplicate of this bug. ***