Host not found
Open, Needs TriagePublic

Description

Having trouble setting up an IMAP account (Fastmail) with Kube.

Setup is as follows

**> Email address: (email@customdomain.com

IMAP server address: imaps.imap.fastmail.com:993
SMTP address: smtps://smtp.fastmail.com:465**

The result is simply 'host not found' and at the bottom it shows 'disconnected'.

Kube also has a GMAIL account setup with no issues so not sure what the issue is with the FM account

The settings as described here work for me:
https://www.fastmail.com/help/technical/servernamesandports.html

Enter it like this in the settings dialog:
imaps://imap.fastmail.com:993
smtps://smtp.fastmail.com:465

Please note that you will have to use a device specific password that you can setup in the fastmail settings.

Set up as follows with parameters as suggested above as you have done but there is no option for further settings in Kube (yet)

imaps://imap.fastmail.com:993
smtps://smtp.fastmail.com:465

I simply get this:

cmollekopf closed this task as Resolved.Aug 26 2018, 11:19 AM
cmollekopf claimed this task.
kaktux added a subscriber: kaktux.Sep 26 2018, 7:58 AM

Trying out Kube for the first time (Kubuntu 18.08, flatpak)
Same problem here - for gmx mail provider (caldav and carddav left empty).

Server Data is shown here:
https://hilfe.gmx.net/pop-imap/imap/imap-serverdaten.html

First i tried the "normal" data - like any other mail program uses:

imap.gmx.net
and
mail.gmx.net

"Host not found"

I also tried to copy the solution you posted for fastmail
imaps://imap.gmx.net:993
and
smtps://mail.gmx.net:587

Error: "Disconnected - failed to connect to server"

Some time after "Host not found".

cmollekopf reopened this task as Open.Sep 26 2018, 8:16 PM

Weirdly, eventually data synced up for the Fastmail account after showing disconnected, but then once all is synced it resumes to showing 'disconnected - host not found' for both accounts.

Clicking on a folder in either account will cause it to sync.

Kolab Now works perfectly.

Indeed more bizarrely, Kube only syncs the sent folder, which did not initially sync, because I sent a message using Kube.

Now, I have a Fastmail account, with just a fully operational sent folder which synchronises normally.

@cmollekopf what is even more strange is that, with a brand new test Fastmail account it does work.

But with my account on a domain, where the username/login are different to the IMAP host, could this be causing the confusion?

Maybe because the new test account is on fastmail.com and so is IMAP.fastmail.com, that's why it's working?

Very strange.

Strangely - despite the folders not syncing, sending an email forces the Sent folder to sync with Kube, so you just end up with a Sent folder, and then when you delete you have the Trash folder.

So I have Kube set up syncing just my trash folder and sent folder telling me 'Configuration Error'

Still not working.

provider says "mail.mailo.com:993", I tried it and with "imaps://" before and with "impags:/" before (as then it showed green instead of red) and none of them is working. Always "no host found". I asked in one of the kde group and like 5 people said they have exactly the same problem.

I would appreciate some investigation.

In the case of mailo imaps://mail.mailo.com:993 should be correct. I don't have an account there but I'm getting "Warning: {09573c96-3a6f-40f6-87fe-c4e89c339edb}.imapserverproxy : Job failed: "Login failed, server replied: A000002 NO Authenticate mechanism PLAIN unknown ", which seems to indicate that the server does not support imap PLAIN authentication, which is currently the only one that is supported (due to lack of a configuration option for it).

You can look at the logs using journalctl typically, or just start kube from the commandline.

mailo also doesn't advertise which authentication method it does support in it's capabilities. If you know, I'm sure we can fix this with a bit of work.

Warning: {4f753f1e-1199-4b51-bea8-fd909b626645}.synchronizer : Synchronization failed:  Error:  5 Msg:  "Invalid server url: smtps://\nmail.mailo.com:465" 
Warning: {4f753f1e-1199-4b51-bea8-fd909b626645}.synchronizer : Error during sync:  Error:  5 Msg:  "Invalid server url: smtps://\nmail.mailo.com:465" 
Log:     {4f753f1e-1199-4b51-bea8-fd909b626645}.synchronizer : All requests processed. 
Log:     {c5e63138-a611-43d3-bd52-53d7232c6f2e}.org.kde.pim.kimap2 : "Socket disconnected. false" 
Warning: {c5e63138-a611-43d3-bd52-53d7232c6f2e}.org.kde.pim.kimap2 : "Socket error: QAbstractSocket::HostNotFoundError" 
Warning: {c5e63138-a611-43d3-bd52-53d7232c6f2e}.org.kde.pim.kimap2 : "Connection to server lost  QAbstractSocket::HostNotFoundError" 
Warning: {c5e63138-a611-43d3-bd52-53d7232c6f2e}.imapserverproxy    : Job failed:  "Host not found." KIMAP2::LoginJob 105 
Log:     kube.sinkfabric                                            : Received notification:  Notification(Type: "status" , Id: "sync" , Code: 3 , Message: "Synchronization has started." , Entities: () )  
Warning: {c5e63138-a611-43d3-bd52-53d7232c6f2e}.synchronizer.changereplay : Change replay failed:  Error:  2 Msg:  "Host not found." Last replayed revision:  1 
Warning: {c5e63138-a611-43d3-bd52-53d7232c6f2e}.synchronizer              : Changereplay failed:  Error:  2 Msg:  "Host not found." 
Warning: {c5e63138-a611-43d3-bd52-53d7232c6f2e}.synchronizer              : Error during sync:  Error:  2 Msg:  "Host not found."

urls:
imaps://
mail.mailo.com:993
smtps://
mail.mailo.com:465

I'm not sure where that \n is coming from, is that normal?? In general the field is quite strange, a screenshot from yesterday

Selection from the last character on, shouldn't look like this, I suppose.

I don't get the "invalid server url" part if I use smtps:/ with one slash only. I tried the same with imaps but except from the fact that field shows green now (which I interpret as "no error") nothing changes.

I was looking for the error message you posted, but I don't get that one. At least not with just starting "kube", I haven't checked with journalctl yet.

\n in your domain is clearly not normal or correct. One slash only is also incorrect, it's always smtps:// or imaps://.

I believe your provided is not standards compliant in that it doesn't support PLAIN authentication, but requires LOGIN to be used instead.

I think we can support that as a fallback in the near future.

Are you using the flatpak to run kube?

Leon0402 added a comment.EditedJun 4 2020, 6:48 PM

\n in your domain is clearly not normal or correct. One slash only is also incorrect, it's always smtps:// or imaps://.

Maybe that one slash works better, at least for smtps, is due to the \n in it, I don't know. The \n seems to get added automatically, so perhaps a bug in kube? As I said, the text field is kinda weird.

I don't know much about imaps authenfication, the only thing I can tell you is that I couldn't find a message as you described and furthermore everyone in the kde group said he has the same problem. So if that's really the problem, LOGIN seems to be quite common I guess.

I'm using kube from arch linux repos: community/kube 0.8.0-1 [installed]

Anything more I can do?

Edit: Btw. It's not the first time I set up a client with this account, I also tried Nextcloud email as well as mailspring. Both worked fine, so I guess they support LOGIN then?

I suggest you try the flatpak at https://kube-project.com/getit.html

I just pushed out an update that allows you to select CLEARTEXT as authentication method, which should work for your provider.

So I will write this while I experiment due to the fact that I do make progress and identify possible ux problems.

I did install kube from flatpak and running both now to compare.

On my first run with flatpak kube I realized that suddenly all fields appear green (instead of red as described before) and the selection mode was just fine. Unfortunately, it still didn't work, kube told me that I have a "configuration error". On the command line it says "invalid server url".

Next I was trying to see what was wrong with that selection stuff. And in fact if I just copy the address from normal kube with \n to flatpak kube, I get the same problems with marked as being wrong and weird selection. I assume it's due to \n and possibly other characters I can't see (maybe strip them out automatically?). I replaced every single character manually and ensured that no character is coming before or after the url and still the same. But after deleting it completly and typing everything in by hand, it just worked.

In deed I don't get any host/url erros anymore now on normal kube, but the "PLAIN is not a supported authenfication method" stuff. I would say that's progress.

Back to flatpak kube. Double checked everything, even copied the obviosuly working configuarion form normal kube to flatpak kube, still "configuration" error. Tried every possible combination of "starttls" and "authenfication mode", still same error.

Btw. thanks for fixing the stuff so fast, that's great!

Leon0402 added a comment.EditedJun 5 2020, 6:34 PM

Well that's interesting, I can send mails though ;) I just created one and sent it to myself and got it (in a different client).

What does that mean? smtps is working, but imaps not? Slightly confused

Edit: I cannot get emails, I don't even have an inbox, just a drafts and sent folder

If you can send mail, that's just smpt working. The IMAP part is separate.

I'm fairly certain that you need CLEARTEXT as authentication method , and that is only going to be available in the flatpak (since I pushed that update out today), no point in trying anything else.

If you still get a "PLAIN is not supported...." error message then that would indicate that something is broken and you still don't end up using CLEARTEXT.

Ah it doesn't apply the authentification mode without a restart.

With CLEARTEXT recieving emails seems to work now (with inbox) , but I don't have a sent folder anymore (or any other folder) and I get the error:

Warning: {0e3dff77-0fd7-4667-ab2c-9f291d0bd198}.imapserverproxy                 : Job failed:  "Select failed, server replied: A000045 NO Mailbox <Mailspring> does not exist .\n Sent command: EXAMINE\"Mailspring\"" KIMAP2::SelectJob 102 
Warning: {0e3dff77-0fd7-4667-ab2c-9f291d0bd198}.imapserverproxy                 : Examine failed:  "Mailspring" 
Warning: {0e3dff77-0fd7-4667-ab2c-9f291d0bd198}.imapresource                    : Continuing after protocol error:  "Mailspring" Error:  Error:  7 Msg:  "Select failed, server replied: A000045 NO Mailbox <Mailspring> does not exist .\n Sent command: EXAMINE\"Mailspring\""

Mailspring is the other client I use.

Ah, yes, a restart is unfortunately required atm.

So that's a new weird error. It looks like you should have a "Mailspring" folder that it's trying to examine, but the server somehow reports that that folder doesn't exist?

Is there a "Mailspring" folder?

I just took a look at mailo online:

So it says I have "personal folders", one is Mailspring/snooze which I do have in fact in Kube as well. It's the only one besides INBOX.
I guess mailspring, the other client, just created that one for me for some reason.

What's with the other folders though, such as "sent", "drafts", "spam" etc.


They are listed at mailo as well as "generic folders".

I don't know what's going on, but we seem to have moved on to a new error.

Kube only lists subscribed folders, so you could check if you have any folders subscribed at all.

You could also gather more debug output using:

  • "export KIMAP2_TRAFFIC=true"
  • "sinksh trace on"

With that running kube in a console will log the complete IMAP communication, which may contain a lot of sensitive data, but could help with understanding what is happening.

Another alternative would be a test-account, with which I could have a look.

You can also get in direct contact under christian@mkpf.ch, if you wanted to provide debug info that is not suitable for the public.