PDA

View Full Version : ISPConfig mail server problem


mcardo
20th October 2008, 21:39
When I configure my Email client I can only get it to work using my WAN IP as the pop3 and smtp server. When I put server1.mydomain.com Outlook will not find the server. I have the following config:

management>server>settings
name: server1
host: server1
domain: mydomain.com
IP: lan ip

DNS Manager
server: server1
domain: mydomain.com
IP: wan IP

A records
server1 to wan ip
ns1 to wan ip
MX record server1.mydomain.com
cname
pop3 to server1.mydomain.com
smtp to server1.mydomain.com

Under godaddy DNS manager I have:
A record
@ to wan ip
* to wan ip (* stands for all hosts, www, www3, sql, mail, etc...)

My server is configured as the primary name server under the DNS manager of Godaddy.


What am I missing?

till
21st October 2008, 07:36
1) Delete all dns recrds form the dnsm manager as you use godaddy as dns server and not ispconfig.
2) Make sure that you forwarded the ports for pop3, imap and smtp from your router to your server.

mcardo
21st October 2008, 14:57
I understand that I could use godaddy as my DNS but I want my server to be the DNS server. Can this be done?

falko
21st October 2008, 18:20
Yes: http://www.howtoforge.com/ispconfig_dns_godaddy

mcardo
21st October 2008, 18:52
My server will handle the DNS. Godaddy has my two dns servers so it will not have options to configure any records since I'm using my server. The tutorial is of no help.

falko
22nd October 2008, 13:04
Why? Sorry, but I don't understand the problem...

mcardo
22nd October 2008, 14:28
Godaddy is my registrar. I removed both the DNS servers that godaddy provided and configured my two DNS servers ns1.mydomain.com and server1.mydomain.com. These two are actually the same machine.

I have all the necessary ports being forwarded from the router to the server (110, 25, 443, 80, 22, 21, 53, 995, etc...) , that's not the problem. The problem, I believe is my lack of DNS knowledge =( and therefore don't know exactly what my settings should be.

I have my ISPconfig configured like the following (forget about what you read on my first post)

Management>server>settings
Server: server1
Hostname: server1
Domain: mydomain.com
IP: LAN IP

DNS Manager
Server: server1
Domain: mydomain.com
IP: WAN IP

DNS Entry options
Nameserver 1: ns1.mydomain.com
Nameserver 2: server1.mydomain.com
(I also have these two under management>server>settings>dns)

A Record
server1 to WAN IP
ns1 to WAN IP

CNAME
pop3.mydomain.com
smtp.mydomain.com

MX
server1.mydomain.com

and I also configured the antispam feature to
mydomain.com

When I browse to www.mydomain.com (to access my existing ISPconfig website, I get a "server not found" which means my DNS is not working, right?)

When I browse to mydomain.com I get an ISPConfig page that says "This is shared IP, type the address instead of the IP...." (so mydomain.com is being forwarded to my WAN IP, but when I add prefixes I get no response, not from the mail server not from the web server)


Why is my DNS not working? I did the perfect server config twice and everything installed flawlessly, I have gotten it to work before with godaddy's default DNS servers and the proper A records, but now that I have removed both of those default DNS servers and added mine I can't get my www.mydomain.com page to work.

falko
23rd October 2008, 16:28
First make sure that your router forwards port 53 (TCP and UDP) to your DNS server.

If you're hosting mydomain.com on the nameserver ns1.mydomain.com, you need a glue record: http://en.wikipedia.org/wiki/Domain_Name_System#Circular_dependencies_and_glue_ records

You can try http://www.intodns.com/ to find out what's wrong.

mcardo
23rd October 2008, 17:11
1. Port 53 UDP & TCP are being forwarded to my server.

2. This is some of the output from into DNS:

PARENT
"Domain NS records Nameserver records returned by the parent servers are:

ns1.mydomain.com. ['67.83.55.173'] [TTL=172800]
ns2.mydomain.com. ['67.83.55.173'] [TTL=172800]"

"DNS Parent sent Glue Good. The parent nameserver sent GLUE, meaning he sent your nameservers as well as the IPs of your nameservers." <----- Glue records are fine. I added my server as hosts under the Godaddy manager with Name and IP.

NS
"NS records from your nameservers NS records got from your nameservers listed at the parent NS are:
Oups! I could not get any nameservers from your nameservers (the ones listed at the parent server). Please verify that they are not lame nameservers and are configured properly." <----- this might be supportive info for the theory that I have a misconfiguration within my ISPConfig application.

"Same Glue Hmm,I do not consider this to be an error yet, since I did not detect any nameservers at your nameservers." <------- Another glue record needs to be configured in my ISPConfig??? I have both ns1 and ns2 pointing to my WAN IP under my DNS A record. ?!?!?

"Error Mismatched NS records WARNING: One or more of your nameservers did not return any of your NS records."

"ERROR: One or more of your nameservers did not respond:
The ones that did not responded are:
my.wan.ip.address"

"Multiple Nameservers ERROR: Looks like you have less than 2 nameservers. According to RFC2182 section 5 you must have at least 3 nameservers, and no more than 7. Having 2 nameservers is also ok by me."

"Missing nameservers reported by your nameservers You should already know that your NS records at your nameservers are missing, so here it is again:

ns1.mydomain.com.
server1.mydomain.com. "

falko
24th October 2008, 21:00
Can you post the zone file of mydomain.com?

mcardo
24th October 2008, 22:41
Falko:

These are the contents of my "named.conf" file. I'm running Ubuntu 8.04. Is that what you mean by "zone file"?

options {
pid-file "/var/run/bind/run/named.pid";
directory "/etc/bind";
auth-nxdomain no;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." {
type hint;
file "db.root";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "db.local";
};
zone "cardorepub.com" {
type master;
file "pri.cardorepub.com";
};


This is my "pri.cardorepub.com" file:

$TTL 86400
@ IN SOA ns1.cardorepub.com. mcardo99.hotmail.com. (
2008102405 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS ns1.cardorepub.com. ; Inet Address of name server 1
NS ns2.cardorepub.com. ; Inet Address of name server 2
;

MX 10 mail.cardorepub.com.

cardorepub.com. A 67.83.55.173
ns1 A 67.83.55.173
cardorepub.com A 67.83.55.173
ns2 A 67.83.55.173
mail A 67.83.55.173
www A 67.83.55.173

pop3 CNAME mail.cardorepub.com.
smtp CNAME mail.cardorepub.com.

cardorepub.com. TXT "v=spf1 a mx ptr ~all"


Check the attached image for my godaddy setup and the attached .pdf for my "intodns" output.


Note: I'm not using, as you can see, godaddy's nameservers. Would the only way to make this work be by using at least one godaddy's name server along with mine? (I have tried using one godaddy's nameserver (with A records "ns1" to WAN IP and "@" to Wan IP) and mine with a slave zone with the godaddy info and it worked well) If this doesn't work, that's the setup I'm going to use.

brunski
24th October 2008, 22:55
mcardo,
FYI - i was able to use mixed Name Servers with godaddy following the tutorial you sent me. I've had no issues as of yet anyhow

brunski
24th October 2008, 23:04
mcardo,
I checked my zone file too, and this is what shows different from yours:

@ IN SOA NS1.BRUXARU.COM. root.localhost. (

yours

@ IN SOA ns1.cardorepub.com. mcardo99.hotmail.com. (


maybe that hotmail entry is what's causing some issue on your end :confused:

mcardo
24th October 2008, 23:04
Could be. I'll change it and see....



mcardo,
FYI - i was able to use mixed Name Servers with godaddy following the tutorial you sent me. I've had no issues as of yet anyhow

Did you go to www.intodns.com? How was your report? Does it see your servers fine?

brunski
24th October 2008, 23:12
www.intodns.com?[/url] How was your report? Does it see your servers fine?

well you can check it out: bruxaru.com

It does have some issues i need to iron out. -
i'm still having issues with mail, but i haven't done any trobleshooting ye, like i told you before i can receive but not send - maybe due to the errors in intodns

falko
25th October 2008, 11:10
Falko:

These are the contents of my "named.conf" file. I'm running Ubuntu 8.04. Is that what you mean by "zone file"?

options {
pid-file "/var/run/bind/run/named.pid";
directory "/etc/bind";
auth-nxdomain no;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." {
type hint;
file "db.root";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "db.local";
};
zone "cardorepub.com" {
type master;
file "pri.cardorepub.com";
};


This is my "pri.cardorepub.com" file:

$TTL 86400
@ IN SOA ns1.cardorepub.com. mcardo99.hotmail.com. (
2008102405 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS ns1.cardorepub.com. ; Inet Address of name server 1
NS ns2.cardorepub.com. ; Inet Address of name server 2
;

MX 10 mail.cardorepub.com.

cardorepub.com. A 67.83.55.173
ns1 A 67.83.55.173
cardorepub.com A 67.83.55.173
ns2 A 67.83.55.173
mail A 67.83.55.173
www A 67.83.55.173

pop3 CNAME mail.cardorepub.com.
smtp CNAME mail.cardorepub.com.

cardorepub.com. TXT "v=spf1 a mx ptr ~all"


Check the attached image for my godaddy setup and the attached .pdf for my "intodns" output.


Note: I'm not using, as you can see, godaddy's nameservers. Would the only way to make this work be by using at least one godaddy's name server along with mine? (I have tried using one godaddy's nameserver (with A records "ns1" to WAN IP and "@" to Wan IP) and mine with a slave zone with the godaddy info and it worked well) If this doesn't work, that's the setup I'm going to use.

I've just cehcked your domain at intodns.com ( http://www.intodns.com/cardorepub.com ), and the problem is that your nameservers are not authoritative for the domain, but ns51.domaincontrol.com and ns52.domaincontrol.com.

mcardo
25th October 2008, 17:24
Falko:

I've been changing my config. Today saturday in the morning my configuration wasn't the same as it was when I posted all those attachements above. Check out my attachments above. How do I make my server Authoritative? Keep in mind I only have one server, one public IP and I'm creating two A records in my server (ns1 to public IP and ns2 to same public IP) therefore I'm "pretending" two servers, but it's actually only one.

I'd like my "two servers" ns1.cardorepub.com and ns2.cardorepub.com to do the DNS job for my domain and also make them Authoritative of my domain.

falko
26th October 2008, 15:02
You must do this somewhere in the GoDaddy web interface (which I'm not familiar with).

mcardo
27th October 2008, 13:41
Well its all the same concept.

I am assigned, by default, two nameservers from godaddy. I have the option of registering "hosts" of my own (using name and ip e.g. ns1.cardorepup.com and my public ip) and replace the ones assigned by godaddy with mine, therefore loosing the ability of managing records under godaddy's interface because, this would be done under ISPConfig in my servers. So I'm hosting the domain myself.

Now Under godaddy I have Three "places" where I can change things, I can register hosts (by name and public ip) I can change nameservers and, if I'm using goaddy's nameservers, which I'm not, I can change A records, cname, mx, txt, etc...

1. Is there anything else that would normally be available under registrars website to change the authoritative server to my own server?

2. Could I make the registrar believe I have two severs when I actually have one? (using A records I'm registering two servers and making them my only 2 DNS servers)

falko
28th October 2008, 15:03
2. Could I make the registrar believe I have two severs when I actually have one? (using A records I'm registering two servers and making them my only 2 DNS servers)

That depends on the registrar. I'd talk to GoDaddy about this.

mcardo
28th October 2008, 17:31
Ok. leaving the previous Idea behind. I'm settling for mixed servers (my server as primary and godady's as secondary)

Under godaddy's DNS control I only have:
A record of mydomain.com to my public IP.
A record of myserver to my public IP
Also Godaddy has my server and one of its own dns servers set as primary and secondary respectively.

Under my server's DNS settings I have:
A records www, mail, myserver... all these records pointing to my public IP
MX record myserver.mydomain.com
CNAME pop3 and smtp pointing to myserver.mydomain.com
I have my server and godaddy's as primary and secondary DNS server.

It seems like, when I try to browse to "www.mydomain.com", I don't get the page unless I add A record www to the godaddy DNS zone. Also "intodns.com" tells me it didn't find any MX records or www records when I have them binded in my server.... And intodns.com tells me godaddy's dns server is primary and mine secondary.

falko
29th October 2008, 12:47
How long did you wait after your changes? It can take up to 72 hours until DNS changes propagate.

mcardo
29th October 2008, 13:37
Must have been a time issue, it usually works within the 20 minutes or so... Well it works now.

Would my server still resolve names if I remove the A record of "myserver" to my public IP from the Godaddy DNS Control? (this would only leave the godaddy dns control with A record of mydomain.com to my public IP and no other records)

note: considering I have it under Godaddy's list of DNS servers, shouldn't it still resolve DNS name requests?

falko
30th October 2008, 14:55
Would my server still resolve names if I remove the A record of "myserver" to my public IP from the Godaddy DNS Control? (this would only leave the godaddy dns control with A record of mydomain.com to my public IP and no other records)

Are you using myserver as the hostname for your DNS server, or rather something like ns1?

mcardo
30th October 2008, 15:21
I'm actually using server1 as my dns server name, same as the host name of my server under ISPConfig.

Under godaddy
Hosts: server1.cardorepub.com to my public IP

Dns servers:
server1.cardorepub.com <---my dns server
ns52.domaincontrol.com <---godaddy's dns server

A records:
cardorepub.com to my public IP
server1 to my public IP

Under my server's ISPConfig

Management>server>settings:
Servername: Sever 1 (default from installation)
Host: server1
IP: public IP

Dns servers:
server1.cardorepub.com
ns52.domaincontrol.com

(Under both management>server>settings>dns and DNS management>options)

$TTL 86400
@ IN SOA SERVER1.CARDOREPUB.COM. mcardo99.hotmail.com. (
2008102904 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS SERVER1.CARDOREPUB.COM. ; Inet Address of name server 1
NS NS52.DOMAINCONTROL.COM. ; Inet Address of name server 2
;

MX 10 server1.cardorepub.com.

cardorepub.com. A 69.115.170.14
www A 69.115.170.14
server1 A 69.115.170.14

smtp CNAME server1.cardorepub.com.
pop3 CNAME server1.cardorepub.com.

cardorepub.com. TXT "v=spf1 a mx ptr ~all"


That is my current configurations and I'm holding it for the moment as I am able to access my webpage. Please see my www.intodns.com/cardorepub.com report and tell me what you think.

I get various results at different time without changing anything anywhere. At times I get mismatched NS records and the servers are reported as non-responsive. Also at times I get no "MX" record and no "WWW" "A record" is found, when I actually have those configured under my ISPConfig DNS settings. I've pasted my zone file.

Thank you all for the time you guys take to help others.

falko
31st October 2008, 16:21
Is your nameserver running? What's the output of netstat -tap? Are there any BIND-related errors in your logs?

mcardo
1st November 2008, 15:28
netstat -tap

(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:mysql *:* LISTEN -
tcp 0 0 *:5900 *:* LISTEN -
tcp 0 0 *:www *:* LISTEN -
tcp 0 0 *:81 *:* LISTEN -
tcp 0 0 server1.cardorep:domain *:* LISTEN -
tcp 0 0 localhost.locald:domain *:* LISTEN -
tcp 0 0 localhost.localdoma:ipp *:* LISTEN -
tcp 0 0 localhost.localdoma:953 *:* LISTEN -
tcp 0 0 *:smtp *:* LISTEN -
tcp 0 0 *:https *:* LISTEN -
tcp6 0 0 [::]:imaps [::]:* LISTEN -
tcp6 0 0 [::]:pop3s [::]:* LISTEN -
tcp6 0 0 [::]:pop3 [::]:* LISTEN -
tcp6 0 0 [::]:imap2 [::]:* LISTEN -
tcp6 0 0 [::]:ftp [::]:* LISTEN -
tcp6 0 0 [::]:ssh [::]:* LISTEN -
tcp6 0 0 ip6-localhost:953 [::]:* LISTEN -
tcp6 0 0 [::]:smtp [::]:* LISTEN


syslog

Nov 1 10:15:15 server1 named[5570]: starting BIND 9.4.2-P2 -u bind -t /var/lib/named
Nov 1 10:15:15 server1 named[5570]: found 1 CPU, using 1 worker thread
Nov 1 10:15:15 server1 named[5570]: loading configuration from '/etc/bind/named.conf'
Nov 1 10:15:15 server1 named[5570]: listening on IPv4 interface lo, 127.0.0.1#53
Nov 1 10:15:15 server1 named[5570]: listening on IPv4 interface eth0, 192.168.2.2#53
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 127.IN-ADDR.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 254.169.IN-ADDR.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: D.F.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 8.E.F.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: 9.E.F.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: A.E.F.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: automatic empty zone: B.E.F.IP6.ARPA
Nov 1 10:15:15 server1 named[5570]: command channel listening on 127.0.0.1#953
Nov 1 10:15:15 server1 named[5570]: command channel listening on ::1#953
Nov 1 10:15:16 server1 named[5570]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2
Nov 1 10:15:16 server1 named[5570]: zone cardorepub.com/IN: loaded serial 2008110102
Nov 1 10:15:16 server1 named[5570]: running
Nov 1 10:15:16 server1 named[5570]: zone cardorepub.com/IN: sending notifies (serial 2008110102)

Note: Although netstat -tap doesn't show port 53 or bind listed, I think it is running. Syslog doesn't show any warnings.

falko
2nd November 2008, 14:42
tcp 0 0 server1.cardorep:domain *:* LISTEN -
tcp 0 0 localhost.locald:domain *:* LISTEN
It's running (take a look at /etc/ services - port 53 is named "domain" there).

This is what I'm getting:

mh1:~# dig ns cardorepub.com

; <<>> DiG 9.3.4 <<>> ns cardorepub.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9856
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;cardorepub.com. IN NS

;; ANSWER SECTION:
cardorepub.com. 3600 IN NS ns51.domaincontrol.com.

;; ADDITIONAL SECTION:
ns51.domaincontrol.com. 115969 IN A 216.69.185.26

;; Query time: 399 msec
;; SERVER: 213.191.92.84#53(213.191.92.84)
;; WHEN: Sun Nov 2 14:40:07 2008
;; MSG SIZE rcvd: 81

mh1:~#
ns51.domaincontrol.com seems to be the only authoritative nameserver...

mcardo
6th November 2008, 16:29
I guess my problem is solved falko!!! I had to change my router.
Thanks for the help. The only warning I get from intoDNS is that I only have one server.

This is how I have it working now:

I have only one server and one public IP.
I added two hosts to godaddy, server1 and server2 with both the same public IP.
I added both to the DNS server list under godaddy.


In my server, ISPConfig is setup like this:

DNS servers
server1.mydomain.com
server2.mydomain.com.

A record:
server1 to public IP
server2 to public IP

Cname
www to server1.mydomain.com
pop to server1.mydomain.com
smtp to server1.mydomain.com

MX
server1.mydomain.com

ALL WORKS FLAWLESSLY. I decommissioned my crappy Belkin F5D-8233-4, it's only pretty in the outside. Get something that works people. To know whether you're router is doing a good job at forwarding ports test your server plugged directly into the modem and make sure your Internet Service Provider is not blocking any ports (usually they block 80 (web server port) and 25 (mail server outgoing port). Use www.canyouseeme.org to check for port forwarding and www.intodns.com to test your DNS configuration.

Again I have only one Machine and one public IP and made my website and domain work fine with godaddy.
It is recommended to use two or more DNS servers with each their own public IP, but for people like me, who only want to experiment, doesn't really matter using only one machine.