Email not sending/receiving, logs says timed out


It's been a few months since I originally set up my server (Ubuntu 10.04 with EHCP), and I never had email working, but now I must address the issue. Unfortunately I've forgotten quite a bit about how everything works.

My problem is that I cannot send or receive emails. Port 25 is not blocked. I think perhaps I do not have my MX records set correctly, but I cannot seem to find the relative info. for that.

I'm not sure where to start, but I can say that when I do tail -f /var/log/syslog it says: (connect to[]:25: Connection ti med out)

Any help is more than appreciated, I hope all is well and you are having success with ehcp!

Sorry I should have mentioned that I can send/receive email just fine between ehcp mail accounts and from websites hosted on my server.

Also, if I telnet 25, I connect no problem, but I cannot telnet 25, it just hangs forever with no message.

Maybe my ISP does block port 25? I'm confused at this point, I suppose I'll need to call them, but I can now send out email since I did this:

Edited my postfix/ file and setrelay to

Now, I can send emails, just cannot receive them. I suppose the problem is how to tell servers to use this relay to get to me?

I'm such a noob :p

I have confirmed that port 25 is not blocked by my ISP (I do have a business account), and verified that with an open port checker tool. So, port 25 is NOT blocked.

So, why does outgoing mail work with relay? and why still no incoming mail?

When I send an email, this is the message I get (not sendable):

Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)

Received: (qmail 14978 invoked from network); 24 Sep 2010 00:43:32 -0000
Received: from unknown (HELO localhost) (
by with SMTP; 24 Sep 2010 00:43:32 -0000
Received: (qmail 26336 invoked by uid 99); 24 Sep 2010 00:43:32 -0000
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"
User-Agent: Web-Based Email 5.2.32
Message-Id: <>
Subject: works
Date: Thu, 23 Sep 2010 17:43:32 -0700
Mime-Version: 1.0

I cannot figure it out, any help is greatly appreciated!

I did a mail server test at and this is what I get:

Not an open relay.
0 seconds - Good on Connection time
3.323 seconds - Good on Transaction time
OK - resolves to
Warning - Reverse DNS does not match SMTP Banner

I'm lost :(

I think your problem is, some ISP's in world are blocking port 25 starting from year 2009, because of many spam.
So, you need to edit your postfix settings.

look at posts at

Thank you for replying.

I've confirmed that port 25 is not block though.

Here is what I cannot figure out. If I send email from I receive it just fine, but when i send from gmail or qmail, it tells me "Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)".

I've looked into that error message and most everything says MX record problem but I've confirmed that my MX records are correct, and of course why would the test email work?

Also, when I do a test from it tells me I have a private IP address.

This is where I'm loss :(

For whatever reason it appears an MX record lookup of my domain produces an IP address of

I've read everything in your link and everything else I can find here and I just can't put my finger on what this problem is.

Ok so now I went to godaddy and added an 'A' record for Now, when I use mxtoolbox it atleast gives me my ip address, but now a new error message:

: does not like recipient.
Remote host said: 550 #5.1.0 Address rejected
Giving up on

I crossed out my real addresses here, I can provide them if it helps.

Woohhooo :)

No more errors, for whatever reason now it works.

I had to add an 'A' record with as the host pointing to my ip address in godaddy. Strange this godaddy, and at first it gave me those rejection errors, but now I can send/receive email, finally! :)

Many thx bvildini!

Oh I'm sorry I missed your 2nd response, thank you very much for your help, I love ehcp :) Great work my friend!

go to your ehcp,
choose that domain,
click "edit dns template"
look at
"in mx ....."
does it show something different or {webip} or {mailip}
if it is {mailip or webip} or a valid ip, then no problem.
if it is different, just delete all in box, save (this makes it default)

in console,
dig any
what it shows for mx ?

what is your domain? i will check a few things.
my msn:, yahoo/gtalk: ehcpdeveloper