Need Help with MX Records

Discussion in 'Installation/Configuration' started by shackrat, Jul 13, 2006.

  1. shackrat

    shackrat New Member

    Greetings, I'm new to ISPConfig, but have managed to get things up and running for the most part. But I'm stuck on the MX record part which I don't believe is working as it should.

    I have one domain (ex domain1.com) setup as the technical domain, with two NS A records pointing to the server which I'm installing ISPConfig on. No problem, the server is reachable and things are good. They're also registered with the host as nameservers too.

    Now when I try to setup a domain to host a site is where I'm confused. I have that domain (ex domain2.com) pointing to the two nameservers from above ns1.domain1.com and ns2.domain1.com. When I create the site everything goes fine, except for one thing. The MX record is now found.

    DNSReport.com says "MX FAIL MX Category ERROR: I couldn't find any MX records for domain2.com. If you want to receive E-mail on this domain, you should have MX record(s). Without any MX records, mailservers should attempt to deliver mail to the A record for domain2.com. I can't continue in a case like this, so I'm assuming you don't receive mail on this domain."

    In ISPConfig the record looks like:

    Code:
    Mailserver  	  Hostname 
      www.domain1.com  	  www
    First off, shouldn't the mailserver be domain2.com instead of domain1.com? And secondly, why is the www there? If I manually edit the DNS zone in DNS Manager, change the mailserver to domain2.com and delete the hostname, DNSReport says everything is ok.

    So that is where I am lost. How can I make it so that when I create a site the MX automatically goes to site.com and no www as the hostname. Or at the very least, how can I get this working so I can create a site with a valid MX entry? I have tried with the Default MX box checked and unchecked.

    Any help would be appreciated.
     
    Last edited: Jul 13, 2006
  2. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    in ISPConfig go to DNS Manager and edit your site's DNS entries. If they don't exist. Create them!

    For MX to work you do this:
    - create A record with outside IP and hostname 'mail'
    - create MX record, mailserver as 'mail.domain.com' and hostname leave empty, priority 10
    - save and wait for a few hours for DNS to refresh..
    - That's it
     
  3. shackrat

    shackrat New Member

    Thanks for the tip, theRudy, I can do it manually, but my point is that when I first create a site the MX record is not properly created. I have to go back, delete the MX that is created and add my own.

    By default when I create a site, say for instance, newsite.com ISPConfig creates an MX pointing to www.hostingsite.com (hostingsite.com is a fictional name for the technical domain I use for the server). I need it to create a MX record for newsite.com automatically. Seems I can't get it to do that.

    Another example.. I create a site called testing123.com... Check the Create DNS and Create DNS-MX boxes. When the site is created and I go into DNS Manager to check it, I see Mailserver www.hostingsite.com Hostname www. It is my understanding that there should not be a hostname for a primary MX record. If I edit the MX record changing www.hostingsite.com to just newsite.com and delete the hostname, I can go back to dnsreport.com and it says that everything is ok.

    Can anyone shed some light on this?
     
    Last edited: Jul 13, 2006
  4. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Oh right, just tested that myself with my test domain and yes, it adds server hostname + domainname as mailserver and www as hostname for MX record by default.
    Guess i edited it myself then.. No idea how to do that.. right it even adds local IP under DNS A record. Hmm, its time for some forum searching..

    i'll post it here if i find the answer unless someone else posts the solution..

    Edit: right, local ip's have to be edited manually if you are using NAT. As for MX record, i think you'll have to edit that also manually. Might be wrong, still haven't found anything usefull :)

    Edit2: it appears that you'll have to edit it manually each time you add new domain name..
     
    Last edited: Jul 13, 2006
  5. nenad

    nenad ISPConfig Developer ISPConfig Developer

    I allways edit (manually create) MX records. And add (if necessery) A records
    That way it works as it have to work.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    You must also check "Default MX" for the CO-Domain without a hostname. If your web site is www.domain2.com, then there's a Co-Domain domain2.com (without hostname). Check "Default MX" for it, too.

    But the safest way is to use the DNS Manager.
     
  7. blackmask

    blackmask New Member

    i check my dns using this website...www.checkdns.net

    this is the MX report

    "Domain mydomain.com has no MX records, but it has A record for domain. This configuration is not recommended"

    How to solve this problem?



    i have create the mx record and this is my dig status
    dig @mail.mydomain.com any mydomain.com

    ; <<>> DiG 9.3.4 <<>> @mail.mydomain.com any mydomain.com
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22296
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 2

    ;; QUESTION SECTION:
    ;mydomain.com. IN ANY

    ;; ANSWER SECTION:
    mydomain.com. 86400 IN TXT "v=spf1 a mx ptr ~all"
    mydomain.com. 86400 IN SOA ns1.mydomain.com. admin.mydomain.com. 2007121114 28800 7200 604800 86400
    mydomain.com. 86400 IN NS ns1.mydomain.com.
    mydomain.com. 86400 IN NS ns2.mydomain.com.
    mydomain.com. 86400 IN MX 10 bmail.mydomain.com.
    mydomain.com. 86400 IN A 1.2.3.4

    ;; ADDITIONAL SECTION:
    ns1.mydomain.com. 86400 IN A 1.2.3.4
    bmail.mydomain.com. 86400 IN A 1.2.3.4

    ;; Query time: 0 msec
    ;; SERVER: 1.2.3.4#53(1.2.3.4)
     
    Last edited: Dec 12, 2007
  8. falko

    falko Super Moderator ISPConfig Developer

    Can you post the real domain name so that I can check myself?
     
  9. blackmask

    blackmask New Member

    my mistake... i have solve the problem... forgot to change the nameserver to point to my dns server in godaddy..
     

Share This Page