Unable to send Emails but able to receive

Stide

Verified User
Joined
Oct 28, 2023
Messages
15
Greetings Team

Am currently not able to send emails from my server on Direct Admin using Exim but am able to send emails. Any idea on how I can go about this

Thanks
 
Exim does not deliver email to port 587, that is a send only port. SMTP needs to use port 25 when communicating with external email servers, so it needs to be open. Same thing with other email servers, they will only talk to your server on port 25 not 587, so it is required to be open.
 
Exim does not deliver email to port 587, that is a send only port. SMTP needs to use port 25 when communicating with external email servers, so it needs to be open. Same thing with other email servers, they will only talk to your server on port 25 not 587, so it is required to be open.
Here is the response i get when i try to connect to port 25

telnet smtp.example.com 25
Trying 64.227.116.246...
Connected to smtp.example.com.
Escape character is '^]'.
220 server.example.com ESMTP Exim 4.96.2-12-g29r61ae2a Sat, 28 Oct 2023 15:41:31 +0000
 
It looks like port 25 is open then, you might also want to make sure that port 25 is open in your firewall for incoming connections too, so your exim can accept emails from external servers.
 
It looks like port 25 is open then, you might also want to make sure that port 25 is open in your firewall for incoming connections too, so your exim can accept emails from external servers.
this is my ufw...still not sending

To Action From
-- ------ ----
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
22/tcp ALLOW Anywhere
2222/tcp ALLOW Anywhere
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
2222/tcp (v6) ALLOW Anywhere (v6)

587/tcp ALLOW OUT Anywhere
25/tcp ALLOW OUT Anywhere
25/tcp (v6) ALLOW OUT Anywhere (v6)
 
What about:
25/tcp ALLOW IN Anywhere
I have allowed 25 as well that is the response and when i try to send, this is the response i get from command tail -f mainlog


2023-10-28 16:51:23 1qwmWx-0000cs-0b <= [email protected] H=([10.194.209.116]) [197.239.14.159] P=esmtpsa X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=no A=plain:[email protected] S=1270 id=[email protected] T="Check" from <[email protected]> for [email protected]
2023-10-28 16:51:23 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1qwmWx-0000cs-0b
 
Yes oke, but then we need the log output.
H=([10.194.209.116]) [197.239.14.159]
That's an internal LAN ip and the external is a 3G ip address, probably of your provider. Problem is that our ip in that case is in Spamhaus.
Also celebratehope.org is not on that ip addres, but that is from a dedicated server.

Seems you are sending from your phone instead of via the smtp of your server.
The server for celebratehope.org with ip 64.227.116.246 is also in a couple of blacklists.

10 mail.celebratehope.org.celebratehope.org No A Record (no glue either)
So this is wrong anymore, the domain name is in here twice.
You don't have an A record for the mail and there is no rDNS/PTR record for your server.

So you have to fix your DNS issues first.
 
Yes oke, but then we need the log output.

That's an internal LAN ip and the external is a 3G ip address, probably of your provider. Problem is that our ip in that case is in Spamhaus.
Also celebratehope.org is not on that ip addres, but that is from a dedicated server.

Seems you are sending from your phone instead of via the smtp of your server.
The server for celebratehope.org with ip 64.227.116.246 is also in a couple of blacklists.

10 mail.celebratehope.org.celebratehope.org No A Record (no glue either)
So this is wrong anymore, the domain name is in here twice.
You don't have an A record for the mail and there is no rDNS/PTR record for your server.

So you have to fix your DNS issues first.
Thank you for the update.

About the blacklist, I have queried a couple of ips and they have all been blacklisted immediately after gaining them.
And actually, I have just queried a new one and it is also under the blacklist.

Now I have created a new account, and a new IP address with the PTR record available and DNS configured am going to share the result of tail -f mainlog once am done
 
You will find a lot of the “new” IP addresses are just recycled from a previous customer, possibly one that was booted for spamming and most will be on an RBL. You need to work with the RBLs to clear the IP, then you will probably have to contact Google, Apple, Yahoo and beg Microsoft to allow emails from your IP, even if they aren’t listed on any RBLs.
 
and they have all been blacklisted immediately after gaining them.
It's like @toml explained. However, if it's with multiple ip's then I wonder if the hoster or datacenter you're with had a lot of spammers before. Sometimes it can be hard to get ip's of the blacklists if they occur from the same subnet (hoster/datacenter) every time.

But to start even trying to get of blacklists, the mailserver settings should be in perfect order.
So SPF and if possible DKIM, you don't need DMARC as requirement (could add it later if you want), but you need the correct A and MX records, correct hostname and rDNS/PTR. Once all is resolved, you should at least get a 8/10 from mail-tester and a 10/10 if everything is perfect. But then you're probably not on a blacklist either.
 
Or there is another option to use SMTP integration to route your emails from local exim to a third party SMTP which is more reliable but bit expensive
 
I have the same problem, i can recieve but not able to send, if i send a test to mail-tester email it still on waiting and finally stop and tell me that my mail has not arrived. If i check exim log i see this:

2024-01-30 22:18:21 Received from [email protected] H=(hope.thecross.com.mx) [127.0.0.1] P=esmtpa A=login:[email protected] S=29049 id=[email protected] T="Prueba desde hope2"
2024-01-30 22:20:30 H=reception.mail-tester.com [94.23.206.89] Connection timed out
2024-01-30 22:20:30 [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out

Already checked the firewall and all the neccesary ports are open.
I have disbled the firewall to test, but still cant' send.
 
When i execute this:
telnet gmail-smtp-in.l.google.com 25

[root@hope2 custombuild]# telnet gmail-smtp-in.l.google.com 25
Trying 2a00:1450:400c:c1d::1a...

But from another server i get this:
[root@hope1 uploads]# telnet gmail-smtp-in.l.google.com 25
Trying 142.250.101.27...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP a10-20020aa78e8a000000b006ddc6a4a5ddsi8824787pfr.94 - gsmtp

I already disabled the firewall and the Trying still...
Any server that i try to telnet port 25 i have the same message Trying...

Why my resolv.conf file changes the 8.8.4.4 to 1.1.1.1? i edit it and then it be 1.1.1.1 again
 
Last edited:
Back
Top