using own mail server with external domain and dns. Now have internal dns. dkim test not working

Posted by mojotaker on Server Fault See other posts from Server Fault or by mojotaker
Published on 2012-03-09T05:23:15Z Indexed on 2012/04/04 5:31 UTC
Read the original article Hit count: 389

Filed under:

I am not very knowledgeable in this area, but have been able to make great head way. Now i am stuck

I setup my own mail server, e.g I had the domain dns point to my mail server in my office. i was able to set up everything working fine. such as dkim and spf records.

Recently i decided to setup an internal dns server in the office so as to resolve some addresses for some development servers internally.

Ok the problem now is my mail server is sitting on the internal dns server (the mail server is on the same box as the dns server) its still able to send and receive emails but not sure if dkim is working properly.

when i try to do a dkim test "amavisd test keys" i get "invalid (public key: not available)" and i know that that means i have a dns issue.

so what should i do? I am currently looking at my internal dns zonefile and i dont know what to do (i am using bind dns server on an ubuntu-server box).

do i configure a dkim txt record on the local dns ? or is there a way to forward dkim "request" to the external dns ? or do i have this whole thing done wrong ?

To be clear

  • Basically my internal domain name is the same as my external domain name (i.e
  • i have a mail server within my internal domain, that uses my external domain dns (external dns has been setup to point to my emailserver (which of course is now sitting behind my internal dns))
  • dkim (i dont think its working because it fails the dkim test")

Need help in determing the proper setup

What is the proper way to set this up ?

thank you

Update: Here is my local dns zone file

; BIND data file for local loopback interface
$TTL    604800
@       IN      SOA ( //dns and webserver on the same box
                         2012030809     ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
@       IN      NS
@       IN      A
@       IN      AAAA    ::1
ns      IN      A

www     IN      A  //  ip of external domain box (bluehost) work around to let local clients access website
newsletter  IN      A // external ip address of local network  IN A // internal ip of mailbox (mailserver IN A //internal ip of a webserver

© Server Fault or respective owner

Related posts about ubuntu

Related posts about dns