Mail daemon could not connect to my imap gmail account

Is it only for me or this is a bug? The network is working (I’m writing from webpositive now),smtp is working and I can connect to gmail with thunderbird. The error message is “Connection error: Network is unreachable”. I’m on haiku nightly. My configuration for imap is:
Imap server:
User name:
Connection type: SSL.

edit: I forgot to say that I’m using pure gcc4 build.

From this page:

“The IMAP protocol for the mail daemon replacement (MDR) has been removed from this release, due to concerns of losing server side data.”

You could use “BeAM” instead, you can install it from terminal:

installoptionalpackage -a beam
(if i remember correctly)

it be related to

Thanks, Giova84. That helped.

So will the MDR be resurrected for Beta2?
Still no GMail/IMAP support in latest nightly as of today, and I’d prefer system mail instead of a specialized app just for quickly checking/sending mail.

I tried it with a snapshot from September, and it worked with gmail IMAP. That may not be much help if it went south more recently, but I see your antecedent for “still” is a thread from 2013.

But I don’t think “just for quickly checking/sending mail” is really that software’s sweet spot - you may prefer a simple application that rolls up that functionality in one user controlled process.

Thanks @donn, did you enter the server as ‘‘ as provided by Google or did it work with the standard settings?
I was thinking of good old system mail with the newer mail daemon replacement but that has been merged anyway I suppose?

Who knows, we may be talking about different things. I was using mail_daemon, what I understand to be the Haiku system mail solution.

I don’t remember specifically, but presumably used that standard service address. When I had trouble with it on another mail host, someone kindly informed me that I could kill the daemon and invoke it from the command line, and then I’d see a log of what it’s doing on the Terminal screen. If there’s some problem connecting, that should help clarify.

The system mail daemon is the mail_daemon replacement; it was merged (well, more or less) into the Haiku project a long time ago.

1 Like

I’m using a reasonably current nightly and use the default server addresses. Connection type SSL, Login type ESMTP.
I remember having to make some well hidden setting at the Google website to allow ‘unsecure’ access. Details escape me at the moment…

1 Like

Ok will try that, thanks, but I’ll have to check out what insecure access means and if I want to take that risk…
I only found very old issues at haiku Trac so might open a new one with all the latest info so we can get this working well for beta 2, where many people will run into the same problem, flooding the forum and big tracker…

Yes, that is likely the problem. Google by default does not allow plain password login for IMAP these days. You need some OAuth specific thing. More secure maybe, but also not a standard IMAP connection but something Google specific.

The setting at your Google account’s security page is called “Less secure app access”.

1 Like

Haiku Mail can connect with SSL now? I have to try this!

I had already gone “less secure”, I’d forgotten about that issue. Your password goes over SSL encryption, so it isn’t any less secure than most of your other authenticated accesses.

I did write up one thing that used oauth, via curl library. As I remember it, I had to go to site support and get them to make up a special key for my application. There’s some extra hocus pocus beyond just writing the software.

1 Like

Good point with SSL, tried that now and got one step further, see that mail preferences “configure IMAP folders” option tries to connect now for real, but still gives be an “invalid argument error” with today’s nightly…

If you’ve activated Google’s “Less secure app access”, I don’t know what might go wrong. It does work for me… Maybe delete any old mail settings and start from scratch.

Less secure app access disables itself sometimes

To update the situation:
By the end of May 2022, Google won’t allow the mentioned “Less secure app access” any more. mail_daemon would need to learn how to deal with something called ‘XOAUTH2 mechanism’, see ticket #17149.

As Pulkomandy mentioned in that ticket, until that’s done you can generate a special “App Password” that you can then use as before with the mail_daemon. To generate an “App Password”, you need to activate 2-factor-authentication of your Google account, see Sign in with App Passwords - Google Account Help, then generate the password as described in that same document.

Just done it. Works.