I'm running Debian Sarge, with Exim4 as my mailserver. I am also running Bind9 to host my own DNS for my domain. Basically, the problem is that Exim doesn't like the way I've setup DNS (or at least I think that's what's wrong). My zone file for my domain looks like this:
Code:
$ORIGIN mydomain.ca.
$TTL 1D
@ IN SOA ns1.mydomain.ca. postmaster.mydomain.ca. (
2006061426 ; serial, todays date + todays serial
21600 ; refresh, seconds
3600 ; retry, seconds
1728000 ; expire, seconds
21600 ) ; minimum, seconds
;
IN NS ns1.mydomain.ca.
IN NS ns1.secondarynameserver.org.
IN TXT "v=spf1 a mx -all"
IN MX 5 mail
;
localhost IN A 127.0.0.1
ns1 IN A my.v4.ip.address
@ IN A my.v4.ip.address
@ IN AAAA my:v6::address
www IN A my.v4.ip.address
mail IN A my.v4.ip.address
Now, where I have "mydomain.ca" is obviously the domain that I've purchased, and host the DNS for. The "my.v4.ip.address" is the IP address assigned to me by my ISP, and v6 is the v6 block for that same IP.
Anyway, everything resolves fine, webpage works, etc.
The problem is, exim wants my /etc/hosts file to look like this
Code:
127.0.0.1 mydomain.ca
192.168.0.1 server.mydomain.ca server
and not this way (which I think is proper)
Code:
127.0.0.1 localhost.localdomain localhost
192.168.0.1 server.mydomain.ca server
It needs to have the domain name as 127.0.0.1, else it returns:
Code:
2006-06-14 09:27:47 lowest numbered MX record points to local host: mydomain.ca (while verifying <myusername@mydomain.ca> from host (host name from which the email is coming in from)
2006-06-14 09:27:47 temporarily rejected RCPT <myusername@mydomain.ca>: lowest numbered MX record points to local host
After some googling, I think I know what this error "means", but I'm not sure what to do to correct it. As you can see in my zone file above, my MX record does not point to localhost or 127.0.0.1, so I'm really not sure what the problem could be. Unless Exim doesn't like the fact that mail.mydomain.ca and mydomain.ca have the same IP address? Exim will send mail outside the local network just fine, it's incoming mail that is not allowed through.
Thanks in advance for any suggestions.
Mike