Email configuration smtp doesn't work on 1and1/1und1/ionos hosting, but email app works

I tried this before … in all combinations, as suggested in another thread.

ssl-587, ssl-465, ssl-25
tls-587, tls-465, tls-25
none-25, none-465, none-587

I usually get the error “connection could not be established with host smtp.ionos.de [connection timed out #110]”

The funny thing: the nextcloud is hosted on Ionos/1and1-webspace as is the mail account … This should work in any way.

Hey!
Sounds indeed unnormal.
Did you try starttls as well?
You sure you entered all other information correctly? Serveraddress for example?
Does the mailaccount exist? Correctly written?
Password correct?
What is your login method ?

Hey!
Yes, password correkt … doublechecked, three times, many times …
Yes, of course does the mail account exist. Tested with Thunderbird … everything is fine with it. Correctly written too … checked again and again and also all the other informations.

Yes, I tried starttls (it shows up as “STARTTLS” in the nextcloud admin panel, but in config.php it ist named only “tls”; it seems that there are only the options “ssl”, “tls” and “” in the config.php. If you put “starttls” there, you get “no” in admin panel and the error “Unable to find the socket transport “starttls”” … )

I do not understand the error. Respectively I understand the error in that way, that there is no communication, as if nextcloud would not use the provided information or even would not try to connect. Where can I check this?

alright, I think here is the end of my latin. :smiley:

And I guess you already tried to copy the settings from thunderbird over to nextcloud…?

I ran some tests against my local server and had problems to send email via SMTP too.
Surprisingly sending email failed although an SSL connection (port 465/tcp) has successfully
been established. STARTTLS also failed because the authentication protocol CRAM-MD5 is
not supported by the Nextcloud function.
I was only able to send email using the sendmail interface. Why are you not using sendmail
to send email? If you haven’t installed an email server on your server, you could e.g. install
and use sSMTP as smtp client which provides a sendmail interface.

Update:

I got the system working … in some way:
my provider told me “…port 25 and server smtp.ionos.de resp. smtp.1und1.de are reachable by script …”
So it is working without SSL/TLS or STARTTLS. This lack of security is annoying … I will have to look out for another mail provider (don´t like google or so)

Thank you all for your help and commitment :smiley:
Tobias

Sorry to say that, but I think you have misunderstood how SMTP or email works in general.
The whole transmission process is unsecure by default and there is no guaranty that email
is transferred to its endpoint over a TLS secured connection over the Internet.
So looking for an other email provider will not solve the problem. The only way to send email secured is by using e.g. a PGP/GPG or S/MIME encrypted email.

@j-ed
Of course encryption is one important part of security. That prevents the message from being read by unauthorised people.
The other part of security is, to make sure that you and only you are talking to your counterpart and no one is listening what you are talking about. That is the job of TLS and it protects (it should do so) f.ex. ones email account from being missused. That is, what I want to get from my provider. Nothing more, but also not less.

You are right, that there is no way to guarantee that a mailserver uses a secured connection to the next one and so on. From this point of view email is always an unsecure communication.

Thank you for taking the time to update. I was having exactly the same issue on my self-hosted NextCloud installation and the combination of no encryption, ‘Login’ authentication and port 25 solved my problem as well :grinning:

I’ve tried everything. Including gmail account instead of my hosted ones.
Absolutely no luck. I even tried installing a new instance of nexcloud.
If I try the above suggestions None for encryption and port 25/465/587 I get a huge list of errors to say encryption is required.
Shame there is no way to put phpmail back.

Just figured it out. Ofcourse as soon as my previous post was done. lol.
I could only use an email account that is on the same server as my nextcloud installation.

Hallo allerseits,
im Webmailer von IONOS rechst oben auf das Rollo->Accounts->E-Mail-bearbeiten aufrufen und den komischen Benutzernamen unter “Ausgehender Server” verwenden. Das hat bei mir zum Erfolg geführt.
Der hat nichts mit meinem Login zum Webmailer zu tun.!
Viel Erfolg ,-)

Funktioniert das bei Dir noch? Ich habe es genauso eingestellt, bekomme aber immer noch diesen Fehler:
Beim Senden der E-Mail ist ein Problem aufgetreten. Bitte überprüfe Deine Einstellungen. (Fehler: Connection could not be established with host smtp.ionos.de :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known)

Hallo @AlexKa,

so wie Du es eingestellt hast funktioniert es nicht.
Den Unterschied zwischen SSL/TLS und STARTTLS kennst Du?
Bei STARTTLS wird der Server erst einmal gefragt, ob er überhaupt verschlüsselt arbeiten kann und wenn ja, dann wird mit TLS verschlüsselt.
Du musst also unbedingt STARTTLS eintragen, da der Port 25 kein normaler Verschlüsselungport, wie 465 oder 587, ist.

Gruß
Crashandy

ok, ich habe jetzt STARTTLS eingestellt, trotzdem, gleicher Fehler. Das Passwort ist das Passwort, was ich zum einloggen in den Webmailer benötige oder gibt es da auch noch ein anderes oder eigenes von Ionos, was da irgendwo versteckt in den Einstellung steht?

Ja, das Passwort ist identisch, nicht wie bei T-Online.
Bei mir funktioniert es einwandfrei.

Edit: Reden wir hier von IONOS Webhosting?

mein Emailaccount läuft über Ionos Webmail.

Ganz kurios. Ich habe zwei Clouds, in der einen funktioniert es ganz normal, sogar mit Port 465. Bei der anderen Fehlermeldung, siehe oben. Bei der ersten Cloud funktionieren sogar mehrere Emailadresse, die bei der zweiten nicht funktionieren. Keine Ahnung, welche Einstellung anders ist.

Not sure if anyone is still following this… But just in case:

I faced the same issue with IONOS Cloud (root) and their ready-made Nextcloud-Image.

I actually had to resolve two issues:

  1. Ports 25, 465 and 587 were blocked for outgoing traffic in IONOS firewall - I called support to have the firewall rules changed.

  2. I had to change local hostname from localhost.localdomain to the correct TLD. Otherwise smtp.ionos.de would reject the e-mails without further notification.

Trick for debugging (found it by accident):
Enter an additional @ sign into the E-Mail-From field or config variable (like ‘mail_from_address’ => ‘sender@@’ in ./config/config.php) and also enable mail debug (set ‘mail_smtpdebug’ => 1 in ./config/config.php). This way, the RFC validation will fail and output the e-mail address that actually gets send to SMTP. For whatever reason it uses my server’s local hostname rather than the one configured by ‘mail_domain’ parameter.

Anyways, it works now! :slight_smile:

Hallo,

leider ist mir der zuletzt genannte Trick zu hoch…

Auch ich haben dieses Problem:

die anderen genannten Sicherheits- und Porteinstellungen habe ich schon ausprobiert, allerdings ohne Erfolg.

Der Support von ionos teilt am Telefon mit dies sei ein Nextcloud-Problem sie können nicht helfen.

Mit den gleichen Daten kann ich auf ein Webmailer-Konto zugreifen.

Hat noch jemand eine Idee für mich? Oder ist das Problem schon an anderer Stelle gelöst und veröffentlicht und ich habe es nur noch nicht gefunden? Danke für Hilfe.

Problem gelöst!

Alle Einstellungen wie gehabt, aber von SSL/TLS auf STARTTls umstellen und den Port beibehalten. Sonnst hatt ich den jeweils auch geändert. jetzt klappts.

1 Like