Trouble Setting up the SMTP Email service

So I have followed my providers directions to a T but I keep getting this. I have also tried using Mailgun with out any luck. I check the mail error logs and there is not even an attempt to send an email in my logs. Is there some setting that I missing that needs to be turned on?

The SMTP server must accept the email sender’s From-address, specially the the mail domain name @mydomain.something

If the SMTP server has a different domain (f.e. @otherdomain.something) it does not accept the mails from Nextcloud.

Are encryption and port given by your mail provider?
Is SSL enabled in Nextcloud config.php?


Is this with configured with an app password ?

Yes it is configured with an App password

Yes I followed their directions to set it up.
Every other time I have done this SSL was supported.

How about the old school test ? So we can get at least some debug messages.

Okay so I went through all three tests.

Just kept trying to connect but would never connect. Tried ports 465 and 587

Connected right away no issue worked with port 465 and 587

same results as Telnet with ports 465 & 587

I tested the connection on a different linux computer and I had no issues connecting with Telnet Ncat or Openssl. This leads me to believe something on my server is blocking the connection I just need to figure out what. Any ideas where to start?

Here is the info from my mail.log file if it helps. I don’t understand why it’s trying to connect to

Jan 23 19:44:00 li974-226 postfix/qmgr[347455]: 2B3602B8DF: from=<office@{My domain}>, size=15958, nrcpt=1 (queue active)
Jan 23 19:44:00 li974-226 postfix/smtp[407188]: SMTPS wrappermode (TCP port 465) requires setting “smtp_tls_wrappermode = yes”, and “smtp_tls_security_level = encrypt” (or stronger)
Jan 23 19:44:31 li974-226 postfix/smtp[407188]: connect to[]:465: Connection timed out
Jan 23 19:44:31 li974-226 postfix/smtp[407188]: 2B3602B8DF: to=<{My Email Address}>, relay=none, delay=30074, delays=30044/0.01/30/0, dsn=4.4.1, status=deferred (connect to[]:465: Connection timed out)

this should be you or the provider?

Something like this might give some more infos:

traceroute -n -T -p 465
traceroute -n -T -p 587

Maybe “” is part of your postfix config?
Check it, quick and dirty with:
grep -r privateemail /etc/postfix/
or wherever your config is located.
just guessing :sweat_smile:

kind regards

Okay I ran traceroute and it timed out after 30 hops on both ports.

I ran grep and this is what I got

/etc/postfix/ = $myhostname,, {some other domain of mine}.com,,, localhost
/etc/postfix/ = []:465

30 hops is a Lot? I would say this is not on your side. But I might be wrong.
What does it mean compared to the other Linux machine…? Can they trace freely?

Yeah no problem with the other machine. It got it in 10 hops going through a VPN