Server cannot receive emails from external addresses.

Hey guys,

I'm new here on Linode but so far I really like it.

I'm having a problem with my server though regarding receiving emails.

I have DirectAdmin installed along with exim and dovecot and I can send emails to external and internal addresses successfully but I cannot seem to receive emails from external addresses. I can send emails internally to another internal email address. That works fine but if I send an email from say a hotmail account to my server I get a message a few hours later saying delivery failed because it could not connect to the mail server.

I'm not sure what I'm doing wrong. I am running CentOS 5.3.

From what I understand, exim is my MTA, I'm not sure if I need to install an MDA as well? I'm kinda confused on the subject because I can still send internal mail.

If anyone can help I would really appreciate it. If more details are necessary, please ask.

Thanks.

7 Replies

@Lightning_Rider:

I can send emails to external and internal addresses successfully but I cannot seem to receive emails from external addresses.
1) Do you have MX records set up correctly (and propogated) for your domain ?

2) What do your exim and syslog logs say when you try and send an email to yourself from outside ?

3) Can you initiate a manual smtp session to your server (e.g. telnet mx.example.com 25) ?

Thanks for your reply. I really appreciate the help with this…

I believe the MX records are okay and propagated. I used the Linode DNS manager to set it up. In the DNS Manager under MX I have:

mail.mydomain.com 10 Default

I can connect to my server through telnet and I get a confirmation message from exim after I connect. However, I changed the port to connect on port 26 instead of 25, could this be affecting anything? Would I have to specify to use port 26 instead of 25 somewhere in the MX to let the world know that you must connect on 26 instead of 25?

I'm not an expert at reading logs but I didn't see anything unusual in them that would point to a problem. At least from what I could tell.

Hmm…

I changed the port back to 25 and it seems to work no problem!

I'm still curious though, if I wanted to use a different port, would I have to specify something in the MX record?

Thanks for your help, the telnet idea gave me the clue to try looking at the ports.

@Lightning_Rider:

However, I changed the port to connect on port 26 instead of 25, could this be affecting anything?
Yes. Most other mail servers will still want to send mail to you via port 25.

You can give your users another port or two, either via setting Exim to also listen on a few other ports, or redirecting from 26 -> 25 via Iptables (or some frontend), but this is normally for sending from behind dastardly network firewalls, where someone has brightly decided that if anyone is attempting to send mail via a different mail server, they must either be out of their mind and stopped at once, or have clicked on the latest piece of rubbish in their Outlook Express 97™ inbox, etc.

@Lightning_Rider:

I'm still curious though, if I wanted to use a different port, would I have to specify something in the MX record.
DNS doesn't normally handle ports.

If you want mail to also be accepted via another port, these can be set via iptables and/or at the application level (exim).

@mjrich:

DNS doesn't normally handle ports.

SRV records handle ports. MX records do not.

Exim by default doesn't check srv records (though they can be enabled via the check_srv option for the dnslookup router), so there are probably a fair few mail servers out there that would have to rely on a failover.

No idea about Postfix et al. though…

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct