Roundcube - External Emails Are Not Working

hostmost

Verified User
Joined
May 31, 2022
Messages
41
Hello DirectAdmin Gurus!

Server OS: Centos 7

I'm very happy to use your product and was able to set up pretty much everything, even the email server with Roundcube, however, I have an issue that I'm chasing for a week now.

I can log into the Roundcube and see emails, I've also tried to send an email from my personal Gmail and was able to get the message with my Roundcube email account. My problem is that I can't send an external email. Roundcube is telling me the message has been sent successfully, but I'm not getting it with my Gmail account. Any external email is not getting messages sent from my Roundcube account.


I've researched all over the internet and read similar threads regarding this issue, but nothing works out.

If I'm trying to see Roundcube logs using this command: cat /var/www/html/roundcube/logs/errors.log
I'm getting this output:

Failed to load config from /var/www/html/roundcube/plugins/managesieve/config.inc.php in /var/www/html/roundcubemail-1.5.2/program/lib/Roundcube/rcube_plugin.php on line 166 (POST /roundcube/?_task=mail&_action=refresh)

If I log into the Admin side of the DirectAdmin and navigate to Admin > Admin Tools > Mail Queue Administration
I can see the log of each email sent, and all of them are marked as Frozen. When opening the Log, it's showing this message:

2022-05-31 22:31:31 Received from <> R=1nvnZS-0007Hz-Sp U=mail P=local S=2306 T="Warning: message 1nvnZS-0007Hz-Sp delayed 24 hours"
2022-05-31 22:31:31 [email protected] R=lookuphost defer (-1): remote host address is the local host
*** Frozen

Following manuals, I've noticed this website: https://intodns.com/ and if I'm testing my hosting domain (webhostmost.com) it's not complaining, because all the addresses resolve fine.

Something is telling me it's a DNS issue. If that's the case, I wish to know what exact DNS records must be set on the "registrar" side and what DNS records are needed on the actual server-side for the Email server to work correctly.

My server hostname is server1.webhostmost.com and it resolves fine as well.
I've also created reverse lookup and PTR records. DO I have to use my PTR and assign it to the "registrar"? If so, how am I supposed to do that?

Please, help!

By the way, I'm attaching screenshots with the domain registrar as it is now and DNS on the server-side.
 

Attachments

  • registrar.png
    registrar.png
    84.1 KB · Views: 14
  • 2022-06-01_02-35.png
    2022-06-01_02-35.png
    148.6 KB · Views: 13
My Exim version is 4.95. I've tried to build the Exim once again, but still shows 4.95.

However, I tried sending email once again and this is what it's showing through the logs:

2022-06-01 10:59:15 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=655 id=[email protected] T="Gggg"
2022-06-01 10:59:15 ivalik.**@gmail.com R=lookuphost T=remote_smtp defer (-54): retry time not reached for any host for 'gmail.com'
 
you don't have SPF and maybe dkim/dmarc
also there can be problem with local resolver at server
 
you don't have SPF and maybe dkim/dmarc
also there can be problem with local resolver at server
Can anybody suggest how to properly set it up? And where does it suppose to be installed? On the server-side or registrar?
I've tried DirectAdmin manual, but still, nothing changed.
 
if you want to configure it from DA side - you must point your domain to DA sever by nameservers.
Where domain pointed by nameservers - there you configure DNS records.
 
if you want to configure it from DA side - you must point your domain to DA sever by nameservers.
Where domain pointed by nameservers - there you configure DNS records.
Sorry, probably I'm confused or completely out of ideas, but it seems like on the DA side all the DNS records are correct.
Even SPF records.

I attached the screenshot. By the way, if I'm trying to send the email from Roundcube to another user at the same server with Roundcube email, it's giving me an error:

SMTP Error (550): Failed to add recipient "[email protected]" (No such recipient here).
If I'm sending it to Gmail, for example, it's showing as sent, but logs are showing:

2022-06-01 19:11:12 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=681 id=[email protected] T="ggg"
2022-06-01 19:11:12 ivalik.**@gmail.com R=lookuphost T=remote_smtp defer (-54): retry time not reached for any host for 'gmail.com'
 

Attachments

  • 2022-06-01_22-13.png
    2022-06-01_22-13.png
    73.2 KB · Views: 7
Seems po4ki.net does not have an MX record neither A records.

Which I can understand from your screenshot.
There it states you are using ns1 and ns2.webhostmost.com but that isn't the case. Both domains are using Google nameservers.
So you either have to copy your records to your Google nameservers, or if you want to use your own nameservers, set them at your registrar.
 
Also in the screenshot, you have to remove server1.webhostmost.com as NS record, because that is not an NS.
You pointed ns1 and ns2 out with a records for NS, server1 is the hostname, you don't use that as NS record, only adds to confusion later on.

Also mail.po4ki.net does not resolve, so they need to be in the Google nameservers too... or like said, change to your own nameservers (not advisable with only 1 ip).
Same for www, probably also ftp and others I didn't check.
 
Also in the screenshot, you have to remove server1.webhostmost.com as NS record, because that is not an NS.
You pointed ns1 and ns2 out with a records for NS, server1 is the hostname, you don't use that as NS record, only adds to confusion later on.

Also mail.po4ki.net does not resolve, so they need to be in the Google nameservers too... or like said, change to your own nameservers (not advisable with only 1 ip).
Same for www, probably also ftp and others I didn't check.
Thank you for all your replies!

I'm still stuck with this Email server.
I went to Registrar and set the NS & DS for Google Cloud DNS (I Can't use ns1.webhostmost.com, because both NS are pointing to the same IP.

I've successfully connected Google Cloud DNS and set everything from there. However, I'm still getting exactly the same results, but the DNS is different this time. I attached screenshots.

I've tried to read logs from the Exim following this command:
cat /var/log/exim/mainlog
And got this output:
2022-06-02 07:56:25 cwd=/etc/csf 4 args: /usr/sbin/sendmail -f root -t
2022-06-02 07:56:25 1nwfgv-00063H-7a <= [email protected] U=root P=local S=730 T="lfd on server1.webhostmost.com: Excessive resource usage: webapps (23259 (Parent PID:23257))" from <[email protected]> for root
2022-06-02 07:56:25 cwd=/etc/csf 4 args: /usr/sbin/sendmail -f root -t
2022-06-02 07:56:25 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1nwfgv-00063H-7a
2022-06-02 07:56:25 1nwfgv-00063H-7a User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063H-7a == [email protected] R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063H-7a ** [email protected]: retry timeout exceeded
2022-06-02 07:56:25 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1nwfgv-00063H-7a
2022-06-02 07:56:25 1nwfgv-00063K-8d <= [email protected] U=root P=local S=730 T="lfd on server1.webhostmost.com: Excessive resource usage: webapps (23260 (Parent PID:23259))" from <[email protected]> for root
2022-06-02 07:56:25 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1nwfgv-00063K-8d
2022-06-02 07:56:25 1nwfgv-00063K-8d User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063K-8d == [email protected] R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063K-8d ** [email protected]: retry timeout exceeded
2022-06-02 07:56:25 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1nwfgv-00063K-8d
2022-06-02 07:56:25 1nwfgv-00063O-9L <= <> R=1nwfgv-00063H-7a U=mail P=local S=2081 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2022-06-02 07:56:25 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1nwfgv-00063O-9L
2022-06-02 07:56:25 1nwfgv-00063O-9L User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063O-9L == [email protected] R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063O-9L ** [email protected]: retry timeout exceeded
2022-06-02 07:56:25 1nwfgv-00063H-7a Completed
2022-06-02 07:56:25 1nwfgv-00063O-9L [email protected]: error ignored
2022-06-02 07:56:25 1nwfgv-00063O-9L Completed
2022-06-02 07:56:25 1nwfgv-00063T-Ap <= <> R=1nwfgv-00063K-8d U=mail P=local S=2076 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2022-06-02 07:56:25 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1nwfgv-00063T-Ap
2022-06-02 07:56:25 1nwfgv-00063T-Ap User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063T-Ap == [email protected] R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2022-06-02 07:56:25 1nwfgv-00063T-Ap ** [email protected]: retry timeout exceeded
2022-06-02 07:56:25 1nwfgv-00063K-8d Completed
2022-06-02 07:56:25 1nwfgv-00063T-Ap [email protected]: error ignored
2022-06-02 07:56:25 1nwfgv-00063T-Ap Completed

I've also decided to try this website once again: https://intodns.com/webhostmost.com and it's showing that everything is resolving just fine.

What am I missing here???
And the main question, if I don't have my Server's NS registered with the main Domain Registrar, will users be able to use their own custom email for their domains assigned with the host?

Please, help!
I'm getting sick of this Email server setup already.
 

Attachments

  • 2022-06-02_10-48.png
    2022-06-02_10-48.png
    103.9 KB · Views: 6
  • 2022-06-02_10-49.png
    2022-06-02_10-49.png
    112.5 KB · Views: 6
Oke lets try.

1.) The rDNS/PTR record should be at the datacenter control panel, not in directadmin and it should point to your hostname, not domain name.
2.) Your DS record should point to a key, if you don't have it, then remove it.
3.) You MX record should point to the domain name, not to the hostname, so not like this:
server1 3600 IN MX 10 mail
but like this:
webhostmost.com. 3600 IN MX 10 mail
4.) I don't use Google DNS, but your NS records all point to "default" in the left screenshot. Probably they need to point to the Google DNS but I'm not sure. I always use our own DNS servers.
 
Oke lets try.

1.) The rDNS/PTR record should be at the datacenter control panel, not in directadmin and it should point to your hostname, not domain name.
2.) Your DS record should point to a key, if you don't have it, then remove it.
3.) You MX record should point to the domain name, not to the hostname, so not like this:
server1 3600 IN MX 10 mail
but like this:
webhostmost.com. 3600 IN MX 10 mail
4.) I don't use Google DNS, but your NS records all point to "default" in the left screenshot. Probably they need to point to the Google DNS but I'm not sure. I always use our own DNS servers.

Thank you for the reply. Did everything, not working.

1. rDNS/PTR is set on the Google Cloud DNS side and pointing to the hostname (server1.webhostmost.com)
2. DS has been set on the Google Domains Registrar side.
3. MX is pointing to the domain name everywhere, on the registrar and DirectAdmin side.
4. Default in Google Cloud DNS defines the default Network with settings added manually. To confirm everything is OK, I attached the screenshot with all sections opened.

Logs are showing the same result, however, I'm getting back a Warning message saying that It'll retry to deliver the message later.
 

Attachments

  • 2022-06-02_18-15_2.png
    2022-06-02_18-15_2.png
    107 KB · Views: 3
  • 2022-06-02_18-15_1.png
    2022-06-02_18-15_1.png
    54 KB · Views: 3
  • 2022-06-02_18-15.png
    2022-06-02_18-15.png
    112.5 KB · Views: 3
3. MX is pointing to the domain name everywhere, on the registrar and DirectAdmin side.
You didn't used my example, now it's
webhostmost.com. 3600 10 MX webhostmost.com.
I said
webhostmost.com 3600 10 MX mail (or mail.webhostmost.com)
so should be like it is in directadmin, it's not the same in the middle screenshot.

You're still messing up NS records, which you shouldn't do. You only need 2, end of story.

On the cloud DNS site I now als see 2 differnet ip's for NS2 for example, shouldn't be the case.
I think you should get somebody with DNS knowledge to fix things for you. It's just a mess this way.

Just the be sure, what's the content of /etc/resolve.conf file?
 
You didn't used my example, now it's
webhostmost.com. 3600 10 MX webhostmost.com.
I said
webhostmost.com 3600 10 MX mail (or mail.webhostmost.com)
so should be like it is in directadmin, it's not the same in the middle screenshot.

You're still messing up NS records, which you shouldn't do. You only need 2, end of story.

On the cloud DNS site I now als see 2 differnet ip's for NS2 for example, shouldn't be the case.
I think you should get somebody with DNS knowledge to fix things for you. It's just a mess this way.

Just the be sure, what's the content of /etc/resolve.conf file?
Thank you!

Seems like I have progress on my end. I've checked logs for the Email Que and here is the output:
2022-06-02 17:14:25 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="fff"
2022-06-02 17:16:32 H=gmail-smtp-in.l.google.com [173.194.196.27] Connection timed out
2022-06-02 17:16:32 ivalik.**@gmail.com R=lookuphost T=remote_smtp defer (110): Connection timed out

Here is the output from my /etc/resolve.conf

GNU nano 2.3.1 File: /etc/resolv.conf

# Generated by NetworkManager
search us-central1-a.c.blue-bee-web-web-host.internal c.blue-bee-web-web-host.internal google.internal webhostmost.com
nameserver 169.254.169.254

By the way, the IP inside of the resolv.conf is not the actual IP of the Virtual Machine (web server). I don't know where this IP is coming from...
 
Back
Top