Use external email server

I have my site and a few clients sites hosted on my webserver running ehcp. For email they are using third party options. When a email is sent from the site to a user via a form or app the email never makes it(users email is

so on server trying to send to will not work. if i send the email to another domain (doesn't matter if its on the same server or not) it works.

Any ideas?

check following:

  • what you mean by 3rd party? a webmail instead of squirrelmail? or something other than postfix? or other than ehcp? is email hosted on same server or another server ?
  • does your server have real ip or internal private ip ? if private, hosts file needs to be updated (ehcp->options->update hosts file)
  • what your logs say ?
  • My email is hosted through a different server / service (gmail)\

    IP is static outside

    Email to and from works fine. It's just when the server tries to email from localhost to the user it never sends anything. If i change the email in the app im using to another address it works fine.

    can you write your dns template/dns records here ?
    also your domainname ? i will check a little.

    most probably, you have an internal dns resolution issue in your server.

    domain is

    $TTL 86400
    @ IN SOA ns.{domainname}. {dnsemail} (
    {serial} ; Serial
    10800 ; Refresh
    1200 ; Retry
    86400 ; Expire
    86400 ) ; Minimum

    {domainname}. IN NS ns.{domainname}.
    ns.{domainname}. IN A {dnsip}
    ns1.{domainname}. IN A {dnsip}
    ns2.{domainname}. IN A {dnsip}
    dns.{domainname}. IN A {dnsip}
    dns1.{domainname}. IN A {dnsip}
    dns2.{domainname}. IN A {dnsip}
    {domainname}. IN A {webip}
    mail.{domainname}. IN A {mailip}
    smtp.{domainname}. IN A {webip}
    webmail.{domainname}. IN A {webip}
    ftp.{domainname}. IN CNAME {domainname}.
    www.{domainname}. IN CNAME {domainname}.
    {domainname}. IN MX 1
    {domainname}. IN TXT "v=spf1 a mx"


    * IN A {webip}

    it was {domainname}. IN MX 10 mail.{domainname}. for my mx record. I changed it per another post i read.

    most probably, your server has dns resolution issue, relted to itself.
    your dns of ehcp should be working, no problem with it.

    in your server, try this, in console:

    dig any

    can you see mx record as gmail ?

    if not,
    open /etc/resolv.conf of your server,
    nameserver localhost
    nameserver anotherone_provided_by_your_isp

    this way, your server will look into itself for mx of that domain, and will send emails, I hope..

    see you

    So I am still having the same issue. I use ehcp for my website hosting and gmail for my email hosting. Everything works fine but php email forms from the server to my email address. Does it matter if I chose DNS hosting or if I setup the domain like normal?

    I use an external inbound and outbound Email proxy (spam server) as well.

    Everything works great, by setting the (domainname}. IN MX 1 record to our Email proxy for domains hosted on the server 1.

    However, for domains we host on an ehcp server 2, the 'DNS Only Hosting' on server 1 is causing a problem.

    Any Email sent from SquirrelMail or RoundCube on server 1 is attempting to find the user/domain on server 1, rather than going to the Email proxy.

    It sounds like a DNS issue, but I have been unable to find out what is causing it.

    My DNS looks like:
    mail.{domainname}. IN A
    {domainname}. IN MX 10 mail.{domainname}.
    {domainname}. IN TXT "v=spf1 a mx"