Saturday, March 19, 2011

Email "Issues" - Due to Dynamic DNS?

My wife sent my son and I an email, and the address for my son got munged somehow. After an evening of sending test messages it appears that when I get my copy of the email through a forwarding service and the forwarding service fixes my email address it also "fixes" my son's address. His address is to a domain at home, and the home system uses dynamic DNS, and the hosting service has a CNAME alias record to the dynamic address at dyndns.com. So I think the CNAME alias is what is causing the problem.

So my solution is to use the dynamic address service at Namecheap. Since namecheap doesn't have a Macintosh client, I had to go looking for something to use. I found ddclient, which is perl based so therefore compatible.

Dynamic DNS client:
http://sourceforge.net/apps/trac/ddclient/wiki/Usage

Now, there are a couple of problems. One is that I host several domains on the same Snow Leopard Server. So I found a patch that allows ddcleint to update several domains.

Patch for multiple domains:
http://www.op-ezy.co.uk/~ian/blog/2010/09/03/making-ddclient-work-with-multiple-domains-on-namecheap/

The next problem is how to get ddclient running on system start.

Startup items on OS X:
http://osxfaq.com/Tutorials/LearningCenter/HowTo/Startup/index.ws

Set it all up and tested. Got bit a couple of times by the cache. It's really important to delete it when changing the config and testing to see if the provider is getting updates.

rm /var/cache/ddclient/ddclient.cache

It did indeed fix the problem.

No comments: