Email sending to gmail is not working.

Operating System & Version
CloudLinux v7.9.0
cPanel & WHM Version
106.0.10

YesitsRafid

Registered
Nov 29, 2022
2
0
1
Bangladesh
cPanel Access Level
Root Administrator
Hello,

When I try to send an email from my Gmail to my cPanel the mail is received. But if I send something to a Gmail account an error occurs. If I try to send another provider, it works.


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

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

[email protected]
(ultimately generated from [email protected])
retry timeout exceeded
Reporting-MTA: dns; zap.reallyfastserver.com

Action: failed
Final-Recipient: rfc822;[email protected]
Status: 5.0.0
SubjectTest By Rasel
FromMohshin
To[email protected]
DateToday 18:30
Test By Rasel

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

Attachments

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
542
253
138
IN
cPanel Access Level
Root Administrator
Can you share the output for the following command on your server:

Code:
$ telnet smtp.gmail.com 587
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
542
253
138
IN
cPanel Access Level
Root Administrator
Install telnet using:

Code:
# yum install telnet -y
then the telnet command should work
 

ServerHealers

Well-Known Member
Sep 21, 2015
95
53
68
India
cPanel Access Level
Root Administrator

kvngwitty

Registered
Nov 30, 2022
4
1
1
united state
cPanel Access Level
Root Administrator
Instead, you could use the following commands and share the outputs:
[[email protected] ~]$ nc smtp.gmail.com 587
220-ip-172-31-19-103.us-east-2.compute.internal ESMTP Exim 4.95 #2 Thu, 01 Dec 2022 16:43:24 +0000
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
nc smtp.gmail.com 25
500 unrecognized command
 

ServerHealers

Well-Known Member
Sep 21, 2015
95
53
68
India
cPanel Access Level
Root Administrator
View attachment 80509

this is the response i get when I tried to install telnet
In order to install this, you have to switch to root user or run it with sudo as follows:

To switch to root user:

sudo -i
To run as current user centos:

sudo yum install telnet -y

[[email protected] ~]$ nc smtp.gmail.com 587
220-ip-172-31-19-103.us-east-2.compute.internal ESMTP Exim 4.95 #2 Thu, 01 Dec 2022 16:43:24 +0000
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
nc smtp.gmail.com 25
500 unrecognized command
Looks like the server has connection to Gmail SMTP server, however, the second command seems ran incorrectly there. Run below command correctly from your terminal, not from inside nc prompt.

nc smtp.gmail.com 25
 

kvngwitty

Registered
Nov 30, 2022
4
1
1
united state
cPanel Access Level
Root Administrator
In order to install this, you have to switch to root user or run it with sudo as follows:








Looks like the server has connection to Gmail SMTP server, however, the second command seems ran incorrectly there. Run below command correctly from your terminal, not from inside nc prompt.
Using username "centos".
Authenticating with public key "imported-openssh-key"
Last login: Thu Dec 1 16:43:00 2022 from 197.211.58.185
[[email protected] ~]$ sudo -i
[[email protected] ~]# sudo yum install telnet -y
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 63.247.64.58
* cpanel-plugins: 63.247.64.58
* base: download.cf.centos.org
* extras: download.cf.centos.org
* updates: download.cf.centos.org
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-66.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
telnet x86_64 1:0.17-66.el7 updates 64 k

Transaction Summary
================================================================================
Install 1 Package

Total download size: 64 k
Installed size: 113 k
Downloading packages:
telnet-0.17-66.el7.x86_64.rpm | 64 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:telnet-0.17-66.el7.x86_64 1/1
Verifying : 1:telnet-0.17-66.el7.x86_64 1/1

Installed:
telnet.x86_64 1:0.17-66.el7

Complete!
[[email protected] ~]# nc smtp.gmail.com 587
220 smtp.gmail.com ESMTP b11-20020a92dccb000000b002f139ba4135sm2626705ilr.86 - g smtp
nc smtp.gmail.com 25
502 5.5.1 Unrecognized command. b11-20020a92dccb000000b002f139ba4135sm2626705ilr .86 - gsmtp
 
  • Like
Reactions: hmaddy

ServerHealers

Well-Known Member
Sep 21, 2015
95
53
68
India
cPanel Access Level
Root Administrator
Looks like, you are running the nc commands wrong. Run the below command separately instead of from inside the nc prompt of towards 587.

nc smtp.gmail.com 25
OR

telnet smtp.gmail.com 25
Run above command once you logged into the server, and share the outputs here.