o4oren / Ad-Hoc-Email-Server

An ad-hoc disposable temporary mail server. Create and use ad hoc disposable mailboxes for testing or any other purpose.
Apache License 2.0
381 stars 92 forks source link

ways to debug why email is not received #90

Open a18-kaushik opened 11 months ago

a18-kaushik commented 11 months ago

Hi, I've configure the server as follows:

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

gcleaves commented 11 months ago

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

a18-kaushik commented 11 months ago

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 commented 11 months ago

@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 commented 11 months ago

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

gcleaves commented 11 months ago

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

a18-kaushik commented 11 months ago

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