DNS MX Configuration

  • Hi! I've two domains and I use just DNS configuration. Domains are foo.ba and bar.fo


    I've a server with a static IP and I've assigned server.foo.ba to it for FQDN requirement installation of IMSCP.


    So the DNS record is
    server.foo.ba A STATIC_IP


    Then I've installed successfully IMSCP 1.1.0-rc2.3 and I've created a new site bar.fo
    I want to use IMSCP mailserver, NOT an external mailserver.
    Now I want to proceed configuring the DNS record


    It would be fine to use following configuration?


    http://www.bar.fo A STATIC_IP


    The MX record should be MX server.foo.ba OR http://www.bar.fo ???


    Many thanks in advance!

  • too much bar and foo there :D Confusing ;)


    Anyway, the MX records for both domains should point to the mailserver. Which in you case is "server.foo.ba".


    Also do not forget to set the reverse lookup for the mail server name, otherwise your mail will be rejected by most mail servers.


    But I would highly recommend you read up some stuff before you set up a mail server! Be sure to understand everything about MX records, open relays, etc. If the mail sever is not configured correctly you might end up sending out spam and get your IP listed on blacklists.

  • "http://www.bar.fo A STATIC_IP" is not correct


    "www.bar.fo A STATIC_IP" is correct


    The MX record must be the SMTP server addres so in your case "server.foo.ba" (but "www.bar.fo" work too if the A exist)
    you can also create "mail.bar.fo A STATIC_IP" and MX record to "mail.bar.fo"


    warning : do not forget reverse DNS PTR

    Debian 6 with proxmox 2 - OpenVZ - KVM
    I-mscp 1.0.3.0 migrate from ispcp 1.0.7
    dovecot + zarafa + z-push + maia mail guard + apacheITK


  • too much bar and foo there :D Confusing ;)


    Yeah sorry :blush:



    Also do not forget to set the reverse lookup for the mail server name, otherwise your mail will be rejected by most mail servers.


    But I would highly recommend you read up some stuff before you set up a mail server! Be sure to understand everything about MX records, open relays, etc. If the mail sever is not configured correctly you might end up sending out spam and get your IP listed on blacklists.


    Can you give me some default config for IMSCP in order to avoid rejections, blacklists, etc?



    "http://www.bar.fo A STATIC_IP" is not correct


    "www.bar.fo A STATIC_IP" is correct


    You're right!



    warning : do not forget reverse DNS PTR


    Do you have a small example for me?


  • Can you give me some default config for IMSCP in order to avoid rejections, blacklists, etc?


    The default settings alredy have the important things set. I was only saying that it helps to know and understand what's going on ;) Try to read up on those topics, google them, etc.




    Do you have a small example for me?


    http://en.wikipedia.org/wiki/Reverse_DNS_lookup
    This is something you can normally set in the admin panel of your server hosting company. The reverse lookup of the IP should give the same domain name as the mail server identifies himself in the HELO.

    Edited once, last by MuhKuh ().

  • DNS query type PTR on 192.0.2.4 --> returns PTR-record="hostname.example.com" (1 result)
    DNS query type A on "hostname.example.com" --> returns A-record=192.0.2.4 (1 result)


    http://en.wikipedia.org/wiki/Forward_Confirmed_reverse_DNS

    Debian 6 with proxmox 2 - OpenVZ - KVM
    I-mscp 1.0.3.0 migrate from ispcp 1.0.7
    dovecot + zarafa + z-push + maia mail guard + apacheITK


  • DNS query type PTR on 192.0.2.4 --> returns PTR-record="hostname.example.com" (1 result)
    DNS query type A on "hostname.example.com" --> returns A-record=192.0.2.4 (1 result)


    http://en.wikipedia.org/wiki/Forward_Confirmed_reverse_DNS


    Unfortunately my domain reseller does not offers ptr configuration.
    So I moved to this solution.


    Doing a reverse lookup on my STATIC_IP it gives me the real CNAME record, let's say cool.1.2.3.4.blah.com


    So I changed the hostname with cool.1.2.3.4.blah.com and reconfigured IMSCP. Then I tested cool.1.2.3.4.blah.com with this tool http://mxtoolbox.com/diagnostic.aspx and I see all green :D Could be enough to stay "carefree"?


  • So I changed the hostname with cool.1.2.3.4.blah.com and reconfigured IMSCP. Then I tested cool.1.2.3.4.blah.com with this tool http://mxtoolbox.com/diagnostic.aspx and I see all green :D Could be enough to stay "carefree"?


    Some more strict spam filters might rate a hostname like xxx-xxx-xxx-xxx.clients.your-server.com with a lower rating because it looks like a generated one that could even come from a dynamic IP. So you could end up with mails being marked as spam.


    There are even mail servers that reject your mail completely when using such hostnames. You will get something like:

    Code
    1. 550 5.7.1 We do not accept mail from dynamic-IP hosts or generic/machine-generated hostnames - you must get a custom reverse-DNS name from your ISP for your host


    I would suggest to ask your hoster about a change of the reverse entry.

    Edited once, last by MuhKuh ().