Roundcube - External Emails Are Not Working

I don't know where this IP is coming from...
This looks like a general Windows "i don't know" ip when for example the windows machine does not get an ip from dhcp, it will show some 169.254.x.x. ip address.
The "Search" entry probably makes it that the resolving still does work.

So this 169.254.x.x certainly will not help either.
Remove that one and replace with:
nameserver 1.1.1.1
nameserver 8.8.8.8

and then restart named. Let's see if that makes things better.

As for the occuring timeout, I don't know how to fix that.
 
This looks like a general Windows "i don't know" ip when for example the windows machine does not get an ip from dhcp, it will show some 169.254.x.x. ip address.
The "Search" entry probably makes it that the resolving still does work.

So this 169.254.x.x certainly will not help either.
Remove that one and replace with:
nameserver 1.1.1.1
nameserver 8.8.8.8

and then restart named. Let's see if that makes things better.

As for the occuring timeout, I don't know how to fix that.

Something changed. The Log is showing the difference.

2022-06-02 18:01:44 Received from [email protected] H=server1.webhostmost.com [34.132.146.171] P=esmtpsa X=TLS1.2:ECDHE-ECDSA-AES128-GCM-SHA256:128 CV=no A=login:[email protected] S=695 id=[email protected] T="gggg"
2022-06-02 18:01:44 H=gmail-smtp-in.l.google.com [2607:f8b0:4001:c18::1b] Network is unreachable
 
modify /etc/exim.variables
disable_ipv6=true
restart exim
Thank you, the problem is still present, but here is the Log:

2022-06-02 18:44:31 Received from [email protected] H=server1.webhostmost.com [34.132.146.171] P=esmtpsa X=TLS1.2:ECDHE-ECDSA-AES128-GCM-SHA256:128 CV=no A=login:[email protected] S=693 id=[email protected] T="ggg"
2022-06-02 18:46:38 H=gmail-smtp-in.l.google.com [108.177.120.27] Connection timed out
2022-06-02 18:46:38 ivalik.**@gmail.com R=lookuphost T=remote_smtp defer (110): Connection timed out

The error changed...
 
to another servers emails going?
mailtester for example?

Sorry, didn't quite get it.
What do you mean by that?

I'm just sending an email from RoundCube to my Gmail, and the email won't go through. But I tried sending it vice-versa and my RoundCube is receiving the message.
 
here you will se random email: https://www.mail-tester.com/
send email to it, waint 1 min, then refresh and you will see email rating/problems
I see.

So, I tried sending email to the Yandex Email and here is the Log:
2022-06-02 19:02:28 Received from [email protected] H=server1.webhostmost.com [34.132.146.171] P=esmtpsa X=TLS1.2:ECDHE-ECDSA-AES128-GCM-SHA256:128 CV=no A=login:[email protected] S=683 id=[email protected] T="ggg"
2022-06-02 19:04:35 H=mx.yandex.ru [77.88.21.249] Connection timed out
2022-06-02 19:04:35 dorif****@yandex.ru R=lookuphost T=remote_smtp defer (110): Connection timed out

And here is the Log for the test-email:
2022-06-02 19:04:30 Received from [email protected] H=server1.webhostmost.com [34.132.146.171] P=esmtpsa X=TLS1.2:ECDHE-ECDSA-AES128-GCM-SHA256:128 CV=no A=login:[email protected] S=713 id=[email protected] T="ggg"
2022-06-02 19:06:38 H=reception.mail-tester.com [94.23.206.89] Connection timed out
2022-06-02 19:06:38 [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
 
maybe your provider blocking outgoing email?
try:
telnet smtp.gmail.com 465

and you must see something like this:
Trying 108.177.126.108...
Connected to smtp.gmail.com.
 
maybe your provider blocking outgoing email?
try:
telnet smtp.gmail.com 465

and you must see something like this:
Trying 108.177.126.108...
Connected to smtp.gmail.com.

Telnet is working:

telnet smtp.gmail.com 465
Trying 142.250.136.109...
Connected to smtp.gmail.com.
Escape character is '^]'.
^]
 
Zhenyapan brought me on an idea. MTA's connect to amongst each other on port 25, so it can still be the provider is blocking the mail port.

Try this from your server:
telnet gmail-smtp-in.l.google.com 25
you can copy and paste, I tested on my server and it worked. If you get a timeout now, then port 25 outgoing is blocked.
 
Agree, Google Cloud always block outgoing 25. You must request to open or use 3rd smtp to smartroute with Exim.
 
Zhenyapan brought me on an idea. MTA's connect to amongst each other on port 25, so it can still be the provider is blocking the mail port.

Try this from your server:
telnet gmail-smtp-in.l.google.com 25
you can copy and paste, I tested on my server and it worked. If you get a timeout now, then port 25 outgoing is blocked.
Wow! What a surprise...

You are right. Google Cloud is blocking port 25, I can't do anything about it at all. Even port 2525 won't make the difference.

As an alternative, I decided to go with the SMTP relay server, such as SendGrid. I've got it registered and set the API key already.

I went to the /var/www/html/roundcube/config/config.inc.php

and added everything as SendGrid is showing, which is everything from this guide: https://docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api

However, I'm still in trouble with sending emails from my RoundCube account. What else do I need to use 3rd party SMTP?

By the way, if I'm trying to telnet smtp.sendgrid.net 587 - it's connected successfully.

How do I force RoundCube to use port 587 for outbound emails?
 
Guys, thank you all very much for your support and help. I've got some good changes on my end. Finally, I was able to set everything up and I can successfully send emails!!! Hooray!

So, first of all, I've noticed that my VM does not have Postfix installed. No clue how I didn't notice it anywhere in the manual, but I had to get it installed and was able to configure the ports 25 to 2525.

Here is the link to the Postfix installation instruction and settings: https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid#centos_4

I have to say that I had to register a remote SMTP account with SendGrid. After I've got an account with them (free of charge for the first 10K emails), I had to configure API to connect to my server, it won't work with username and password, instead, you have to use the API key provided by SendGrid.

Here is the link to set up SendGrid API keys: https://docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api

Don't forget to add port 2525 to the CSF, it's not there by default.

-------------------------

I have the next problems and questions.

I'm able to send emails via the main domain of the host: webhostmost.com ([email protected]). It's not working if I have CSF enabled though. Why? I've set port 2525 on TCP as In and Out for IPV4.

Once CSF is enabled, when I'm sending an email, it's giving me the error SMTP -1 and won't send anything. If I turn it Off, works like a charm.

My next problem is the following.

I've created a second user with a different domain (po4ki.net). If I register an email, such as [email protected], the email couldn't be sent.

It's giving me this error right away:

SMTP Error: [550] The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements

If I'm checking logs, It's saying that I have authentication problems. How do I fix that?

What type of DNS do I have to set for the new user with a different domain?

Please, help!
 
Back
Top