Ad-Hoc-Email-Server icon indicating copy to clipboard operation
Ad-Hoc-Email-Server copied to clipboard

ways to debug why email is not received

Open a18-kaushik opened this issue 2 years ago • 6 comments

Hi, I've configure the server as follows:

  • ubuntu22.04 ec2 on aws
  • started service on port 3000 and smtp port is 25, allowed origins also configured
  • configured MX and A records for domain
  • api server is working fine
  • opened all ports on ec2 firewall

still not able to get email on mailbox , please suggest things i can check for.

a18-kaushik avatar Oct 17 '23 11:10 a18-kaushik

I'd start by telnetting to the SMTP port and check whether that works: https://www.comparitech.com/net-admin/telnet-smtp-test/ .

gcleaves avatar Oct 17 '23 11:10 gcleaves

it says Could not open connection to the host, on port 25: Connect failed

but there is no service running on port 25 when i checked with netstat

a18-kaushik avatar Oct 17 '23 12:10 a18-kaushik

@gcleaves I'm able to open 2525 port for smtp and it shows as listening in netstat

question : do i have to make any more changes to receive mail on 2525 as smtp port in application?

a18-kaushik avatar Oct 18 '23 04:10 a18-kaushik

i think 25 port is necessary to receive incoming requests from any other mail server like gmail and i have no control over that it's strange that running ahem on smtp port 25 doesn't show it as listening in netstat command

a18-kaushik avatar Oct 18 '23 08:10 a18-kaushik

Try netstat at various points in the network. I imagine port 25 IS listening on the container. Can you access port 25 from the docker host? At what point is port 25 blocked? That's where you have a firewall/network issue.

Some low cost hosting providers might block port 25 to prevent misconfigured mail servers from acting a spam relays, but I wouldn't expect Amazon to block it.

Does this help? https://repost.aws/knowledge-center/ec2-port-25-throttle

gcleaves avatar Oct 18 '23 11:10 gcleaves

thanks for the reply, i tried with docker on an alternate mail server and it works for the meanwhile

also for your above reply there is no container, i'm running directly on an ec2 by ssh into it and the provided links states there are restrictions on port 25 for outgoing but here incoming is blocked as it's not listening on port 25

a18-kaushik avatar Oct 18 '23 12:10 a18-kaushik