Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP error "Creating account failed: Could not connect to IMAP: Error connecting to mail server." #2960

Closed
fds2610 opened this issue Apr 21, 2020 · 4 comments

Comments

@fds2610
Copy link

fds2610 commented Apr 21, 2020

Expected behavior

want to add an imap account to mail app

Actual behavior

does not create account

Mail app

1.3.2

Strato: imap.strato.de:993

Server configuration

Ubuntu 18.04

Apache

MySQL

php 7.3

NC 18.0.3

Client configuration

FF 75

Win10

I can access the imap-server from my thunderbird client using exact same credentials and data.
provider tells me they support only thunderbird, outlook, ios and android.

nextcloud-log says:

{"reqId":"CMBZbC19hqBNRpA7daHN","level":0,"time":"2020-04-21T15:08:41+00:00","remoteAddr":"192.168.2.43","user":"fs@dsd","app":"PHP","method":"POST","url":"/index.php/apps/mail/api/accounts","message":"stream_socket_client(): unable to connect to ssl://imap.strato.de:993 (Connection timed out) at /var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php#293","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.3.0"}
{"reqId":"CMBZbC19hqBNRpA7daHN","level":4,"time":"2020-04-21T15:08:41+00:00","remoteAddr":"192.168.2.43","user":"xxxxxxx","app":"mail","method":"POST","url":"/index.php/apps/mail/api/accounts","message":"Creating account failed: Could not connect to IMAP: Error connecting to mail server.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.3.0"}

horde-imap-log:

Tue, 21 Apr 2020 15:05:18 +0000
Connection to: imap://imap.strato.de:993/
Slow Command: 20.02 seconds
Connection failed: Error connecting to server.

@ChristophWurst
Copy link
Member

(Connection timed out)

Is the mail host reachable from the nextcloud host? Did you use the correct port?

@fds2610
Copy link
Author

fds2610 commented Apr 21, 2020

Hi @ChristophWurst , well.
IPv4 works fine, but IPv6 times out...
$ ping -4 imap.strato.de
PING imap.strato.de (81.169.145.103) 56(84) bytes of data.
64 bytes from imap.strato.de (81.169.145.103): icmp_seq=1 ttl=246 time=20.7 ms

How can i make mail use IPv4 ?

ok, if i disable IPv6 on the main (internet) interface by OS, mail can connect to the imap server. maybe it could be a feature-request to add an option to "manual settings" to use IPv4 / IPv6 or both.

so, please remove my "bug" label and add "feature-request" or "enhancement".

@no-response no-response bot removed the needs info label Apr 21, 2020
@ChristophWurst
Copy link
Member

How can i make mail use IPv4 ?

Use the IP.

If your host name resolves to an ipv4 and an ipv6 but just one of the two is usable then I would say your network setup is invalid.

@fds2610
Copy link
Author

fds2610 commented Apr 24, 2020

Hello Christoph, thanks for your review of this question. As this is more a networking / operatingsystem issue instead of a nextcloud topic I will close it now.
BTW: using the IP address is worse than disabling unused IPv6 in the OS, because many mail provider change their IP addresses without notice. That is the reason for using DNS. I assume you know all of this, but i write it doen in case future users encounter similar problems. thanx again !

@fds2610 fds2610 closed this as completed Apr 24, 2020
@no-response no-response bot removed the needs info label Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants