Can receive emails but cannot send

raymondnkosi

Verified User
Joined
Mar 13, 2023
Messages
8
Hi all,

I have recently installed DirectAdmin on AWS EC2.

Everything is working perfectly so far, except my server is not sending emails out.

When I send an email, I get an error that says retry timeout exceeded when I check in DirectAdmin.

I checked the EXIM log and I get the following:
2023-04-18 01:46:28 1poYYG-000WST-1x <= [email protected] H=localhost (server.cmple.solutions) [::1] P=esmtpa A=login:[email protected] S=598 id=[email protected] T="Testing" from <[email protected]> for [email protected]
2023-04-18 01:46:28 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1poYYG-000WST-1x
2023-04-18 01:46:28 1poYYG-000WST-1x H=gmail-smtp-in.l.google.com [2a00:1450:400c:c00::1a] Network is unreachable
2023-04-18 01:48:38 1poYYG-000WST-1x H=gmail-smtp-in.l.google.com [74.125.133.26] Connection timed out
2023-04-18 01:48:38 1poYYG-000WST-1x H=alt1.gmail-smtp-in.l.google.com [2a00:1450:4013:c16::1a] Network is unreachable


Any help would be greatly appreciated.
 
Please edit your post and mask your mail addresses to prevent spam.

As for the problem. Check if port 25 outgoing is open. Check the firewall.
Also, try using telnet to port 25 via SSH for example
telnet gmail-smtp-in.l.google.com 25
see if that works.

Check this post for the firewall settings:
 
Hi Richard,

Please forgive me but I can't seem to figure out how I can edit my own posts here.

I've got port 25 open in CSF, but I've done some research, and it looks like AWS blocks outbound traffic on port 25 (SMTP) of all EC2 instances.

I tried to get EXIM to listen on another port, hoping to send my emails using another port, but that doesn't seem to be working either, yielding the same results.

This is the article I used to get EXIM to listen on another port:
https://docs.directadmin.com/other-...m-to-listen-on-another-port-on-top-of-port-25

I also added this port to my CSF and AWS firewall as well.

Am I going about this the right way, is it possible to send outbound emails using another port besides port 25?
 
Also, here are my telnet results:

[user@server ~]$ telnet gmail-smtp-in.l.google.com 25
Trying 108.177.15.26...
telnet: connect to address 108.177.15.26: Connection refused
Trying 2a00:1450:400c:c00::1b...
telnet: connect to address 2a00:1450:400c:c00::1b: Network is unreachable
 
Hello Raymond.
Please forgive me but I can't seem to figure out how I can edit my own posts here.
No problem, that is possibly because you dod not have a full member status yet, you can always do it once you have that.

and it looks like AWS blocks outbound traffic on port 25 (SMTP) of all EC2 instances.
That is correct, you have to ask them to open port 25 for you. Seen the telnet results, it's indeed blocked.

This is the article I used to get EXIM to listen on another port:
That is only for SMTP ports, so clients connecting to your Exim, not for mail between mailservers.
The only other way to send out mails using another port is via an external mailrelay service also called smtp relay.
Like Sendgrid or many others provide.
 
Hello Raymond.

No problem, that is possibly because you dod not have a full member status yet, you can always do it once you have that.


That is correct, you have to ask them to open port 25 for you. Seen the telnet results, it's indeed blocked.


That is only for SMTP ports, so clients connecting to your Exim, not for mail between mailservers.
The only other way to send out mails using another port is via an external mailrelay service also called smtp relay.
Like Sendgrid or many others provide.
Hi Richard,

Thank you so much for your help with this.

I have now requested AWS to open my port 25 for my EC2 instance.

Thanks again for your help and your quick response.
 
Back
Top