Problem refreshing IMAP/POP3

I am using openHAB 2.5.3-1 (openHABian) on a Raspberry Pi

After installing the Mail binding and configuring an IMAP or POP3 thing and the corresponding channels, I get this warning.

2020-03-31 19:07:35.066 [INFO ] [inding.mail.internal.POP3IMAPHandler] - error when trying to refresh IMAP: Connection reset

The mail counts, that I try to get are not updated. Account and password are correct.

Mail provider: Swisscom (Bluewin)

Thanks to all providing hints and help

Edit: sending mails using the SMTP thing works btw. without a problem

@namraccr are you maintaing the Mail Binding?

I have tried to setup IMAP for four different mail accounts. None works. Sending mail by SMTP does work. There are a number of threads related to that but no solution

Not officially. But if you can provide a full debug log, I’m happy to review.

Make sure to set the logging to TRACE before capturing the log, and please don’t paste a snippet. Attach the log as a file after redacting anything sensitive.

Done. Set logging to trace by set:log TRACE org.openhab.binding.mail

However … NO additional entry in the log files

I didn’t realize the binding was so badly written. Give me a day and I’ll try to build a new jar with better output.

Try this jar.

1 Like

PR created.

For me the Error Message is the same…

I also got some permission/authorisation error from gmail. I don´t know how it is in other Mail systems.


Error Message:

    2020-04-21 18:01:34.546 [WARN ] [caldav.internal.job.EventReloaderJob] - Sardine error while loading calendar entries: Unexpected response (401 - Unauthorized)
com.github.sardine.impl.SardineException: Unexpected response

at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[sardine-5.6.jar:5.6]

at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:40) ~[sardine-5.6.jar:5.6]

at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:35) ~[sardine-5.6.jar:5.6]

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222) ~[httpclient-4.4.1.jar:4.4.1]

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) ~[httpclient-4.4.1.jar:4.4.1]

at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:962) ~[sardine-5.6.jar:5.6]

at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:417) ~[sardine-5.6.jar:5.6]

at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:409) ~[sardine-5.6.jar:5.6]

at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:386) ~[sardine-5.6.jar:5.6]

at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:250) ~[bundleFile:?]

at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:141) [bundleFile:?]

at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [bundleFile:?]

at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [bundleFile:?]

That error message is not remotely the same. It doesn’t even come from the mail binding, but from the CalDAV binding.

Ok cool and how can I solve this to use the Mail Binding?

There is a connection between Gmail and openHAB…because anytime I restart the openHAB service the security Mail from Google comes. (See Screenshot above)