Problem receiving smtp on ec2

Hi all -

I configured exim4 on my ec2 instance, and I can successfully send email TO external addresses, but I cannot RECEIVE email to my domain.

for example, sending from a gmail acct to “ubuntu@mydomain.com”

I receive nothing.

I presume I am not configuring the exim4 listening ipaddresses correctly but I’ve tried many combinations

all google searches keep yielded results for integrating amazon SES and I DON’T want to BLOODY user their service, I want to do it myself

any help is greatly appreciated; i already wasted half the day figuring this shit out.

EDIT:

some details,
firstly, thanks to /u/phil-99 for clueing me in on the need for MX records, so that was created on route 54

initial question comes to mind, does the exim4 mail server really require it’s own ec2 instance? Right now it’s running on the same machine as my apache instance for the domain.

Next - inbound security rule for port 25 has been greenlit for smtp connections

Currenty it is configured to listen to 0.0.0.0 for network interfaces. does this need to be my elastic IP, public ip? I understand it’s not meant to be 127.0.0.1

Haven’t testing remoting into 25 yet, but thats next on my troubleshooting.

I’m confident I have set-up exim with the appropriate domain config as per docs and a number of other walk-throughs.

Current performance:
send/receive emails from-to local acct.s

receive emails from my server to external gmail accts

receive emails from gmail to my server

looking at the panic log at current exim config yields no notifications

Furthermore, the exim4 queue has a couple old messages frozen, but these are from outgoing emails withprevious configs - emailing TO my server leaves no trace on the server


Related discussions:

You’ve not provided anywhere near enough info to help here.

DNS: Have you set up MX records? Let them propagate? Can you do a lookup on these using a random lookup site?

Ports: Have you opened port 25 on the appropriate security groups and ACLs? Machine firewalls? Can you connect to port 25 remotely? Can you see traffic coming in using tcpdump or similar?

Config: have you set up exim with the appropriate domain config?

Fill out this form, profit: https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request

edit: yeah you have issues receiving and not sending but it may help. it’s a good idea to get the throttling removed on any mail server.

Can you use telnet to deliver a message to your server? If this works, it means something is wrong with your MX records, if it doesn’t, something with your setup. Try it from local on your server first, then from some external host. Many home connections block 25 outbound however.

https://mediatemple.net/community/products/dv/204404584/sending-or-viewing-emails-using-telnet

So I spun up telnet from an ubuntu box, connecting from a random cafe wifi location, using the domain name for my host (testing the dns lookup) I CAN connect to port 25

telnet [domain] 25

yields

220 ip-xxx-xx-xx-xx.xxxxxxx.internal ESMTP Exim 4.82 Ubuntu [DATE/TIME STAMP]

currently troublesjhooting

So I spun up telnet from an ubuntu box, connecting from a random cafe wifi location, using the domain name for my host (testing the dns lookup) I CAN connect to port 25

telnet [domain] 25

yields

220 ip-xxx-xx-xx-xx.xxxxxxx.internal ESMTP Exim 4.82 Ubuntu [DATE/TIME STAMP]

currently troublesjhooting:

EDIT:

INTERESTING! Telneted a test message asper your linnk, then logged into the ec2 instance, checked my email, LO BEHOLD it successfully received an email via a telnet connection on port25!!

interdasting