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

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: