Mailserver working on LAN, not outside it: DNS problem?

Discussion in 'Installation/Configuration' started by brunus, Mar 6, 2008.

  1. brunus

    brunus New Member

    Hi,
    I've a Perfect Ubuntu 6.06 configuration. The mailserver is perfectly working in my LAN, meaning that I can also send and receive emails from from all email accounts, even other than my domain's one.
    When I try to use my domain's email address from outside the LAN, to receive or send, the mailserver mail.ecolefrancaise.bi is not reacheable.
    I paste here below the output of the dig command, from inside the lan...

    ; <<>> DiG 9.4.1-P1 <<>> mail.ecolefrancaise.bi
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6743
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mail.ecolefrancaise.bi. IN A

    ;; ANSWER SECTION:
    mail.ecolefrancaise.bi. 86400 IN A 192.168.1.1
    mail.ecolefrancaise.bi. 86400 IN A 84.254.187.34

    ;; AUTHORITY SECTION:
    ecolefrancaise.bi. 86400 IN NS efbujagateway.ecolefrancaise.bi.
    ecolefrancaise.bi. 86400 IN NS dns1.nic.bi.

    ;; Query time: 1 msec
    ;; SERVER: 192.168.1.1#53(192.168.1.1)
    ;; WHEN: Thu Mar 6 20:19:42 2008
    ;; MSG SIZE rcvd: 123

    ...and from outside of it

    ; <<>> DiG 9.4.1-P1 <<>> mail.ecolefrancaise.bi
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 33088
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mail.ecolefrancaise.bi. IN A

    ;; Query time: 829 msec
    ;; SERVER: 193.219.193.190#53(193.219.193.190)
    ;; WHEN: Thu Mar 6 20:18:08 2008
    ;; MSG SIZE rcvd: 40

    In the DNS control panel I've set a A Record for mail.ecolefrancaise.bi for both the private IP 192.168.1.1 and the public one 84.254.187.34
    and a MX record mail.ecolefrancaise.bi

    efbujagateway.ecolefrancaise.bi is my hostname in postfix's main.cf file

    I need a configuration that allows me to use my domain's email addresses outside the LAN as well as within the LAN, in case internet connection is down.

    What's wrong?

    thanks,

    Paolo
     
    Last edited: Mar 6, 2008
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Code:
    server2:~# dig ns ecolefrancaise.bi
    
    ; <<>> DiG 9.3.4 <<>> ns ecolefrancaise.bi
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62320
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; QUESTION SECTION:
    ;ecolefrancaise.bi.        IN   NS
    
    ;; ANSWER SECTION:
    ecolefrancaise.bi.      3591    IN    NS        [B][COLOR="Red"]ns1.nic.bi.[/COLOR][/B]
    ecolefrancaise.bi.      3591    IN    NS        [B][COLOR="Red"]cni1.cbinf.com.[/COLOR][/B]
    
    ;; ADDITIONAL SECTION:
    cni1.cbinf.com.         172790  IN    A 196.2.12.200
    
    ;; Query time: 28 msec
    ;; SERVER: 213.191.92.84#53(213.191.92.84)
    ;; WHEN: Fri Mar  7 18:20:17 2008
    ;; MSG SIZE  rcvd: 101
    
    server2:~#
    Are these your own name servers?
     
  3. brunus

    brunus New Member

    No Falko,
    those are my registrars' ns servers.
    My registrar is the burundian nic, responsible for the .bi domain.
    They don't let their clients manage their own ns, like goDaddy does.
    I only need mail.ecolefrancaise.bi to be reacheable from outside the LAN. That's all.

    Paolo

    PS
    I've just realised that I've written dns1.nic.bi whereas your dig gave ns1.nic.bi
    I've just copied what I got here from their whois: http://tinyurl.com/22mlau
     
    Last edited: Mar 7, 2008
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You must then create DNS records for mail.ecolefrancaise.bi on your registrar's name servers.
     
  5. brunus

    brunus New Member

    Falko,
    is this true even if the mail.ecolefrancaise.bi mailserver is on the same machine having the public ip associated to www.ecolefrancaise.bi?

    Would it be easier to just reconfigure postfix to be active on www.ecolefrancaise.bi?

    thanks,

    brunus
     
  6. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Yes, thats the case even if the www subdomain is on the same server. I recommend that you create the A-Record in the nameserver of your registrar.
     
  7. brunus

    brunus New Member

    Thank you guys,
    it worked!

    Paolo
     

Share This Page