[Lula] Mail server ip changed issue.

Alan Ptak aptak at transitiva.com
Thu Jun 29 02:26:09 EDT 2006


On Jun 28, 2006, at 8:17 PM, Jeff Carlson wrote:

> Titu Kim wrote:
>>      I wonder how to solve the mail bounce issue
>> during the process of switching a mail server from one
>> ip to another(same dns name). DNS changes take a while
>> for the latest ip to be refreshed. So, before new ip
>> information about the mail server is refreshed to
>> other dns server, all the mail sent between the gap
>> will be bounced. Any idea?
>
> This is actually even easier than Alan suggests (sorry, Alan).
>
> Assuming you have not had any critical problems with DNS in the  
> recent past, DNS changes do not take a long time to propagate.  But  
> clients will cache responses for the default TTL time.  So what you  
> need to do is make these changes at least one TTL time in advance  
> of your MX change.
>
> For instance, if your TTL is one hour, change your DNS one hour  
> ahead of time.
>
> First, set your default TTL to about five minutes.  This may cause  
> more queries to your DNS server during the migration but it really  
> ought to be no problem.
>
> Second, add a secondary MX record that is the new IP of your mail  
> server.  So when you make the change, an incoming mailer will first  
> try to go to your old IP, fail, then try the new one.
>
> So, it would look like this:
>
> $TTL 300
> @                     IN MX 10 old.mail.example.com.
>                       IN MX 20 new.mail.example.com.
> old.mail.example.com. IN A     10.11.12.13
> new.mail.example.com. IN A     172.16.17.18
>
> After you have made the change, reset your TTL and remove the old  
> primary MX.

No apologies necessary, Jeff and kudos to you for your simpler approach.

I'll still stand by mine if the objective is to ensure that no mail  
gets lost. You make some assumptions that might not hold for even a  
modest amount of email traffic.

I'm also a firm believer in secondary DNS and backup MX services on  
different networks for availability purposes, and use both as  
standard practice. For under $50/year, it's cheap insurance.


_______________________________________________
Lula mailing list
Lula at lula.org
http://www.lula.org/mailman/listinfo/lula


More information about the Lula mailing list