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?
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html

Hi,

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.

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

Ncat
Connected right away no issue worked with port 465 and 587

Openssl
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 email.privateemail.com

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 email.privateemail.com[198.54.117.245]: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 email.privateemail.com[198.54.117.245]:465: Connection timed out)

ok,
this should be you or the provider?

Something like this might give some more infos:

traceroute -n -T -p 465 smtp.fastmail.com
traceroute -n -T -p 587 smtp.fastmail.com

Maybe “privateemail.com” 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
sambilanet

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/main.cf:mydestination = $myhostname, email.privateemail.com, {some other domain of mine}.com, li974-226.members.hostprovider.com, localhost.members.hostprovider.com, localhost
/etc/postfix/main.cf:relayhost = [email.privateemail.com]: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