Mail TXT record wrong?

angler

Verified User
Joined
Dec 21, 2004
Messages
23
SPF record wrong?

I changed the IP on my server and ran the ipswap script. However when sending email to my account hosted on DA, my mail server(at work) is reporting this:

sendmail[15586]: k1GGLWk2015584: to=<[email protected]>, ctladdr=<[email protected]> (1023/1023), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30390, relay=mail.abc.com. [old_ip_addy], dsn=4.0.0, stat=Deferred: Connection refused by mail.abc.com.

I noticed in my DNS settings for abc.com the TXT record has this:

abc.com. "v=spf1 a mx ip4:old_ip_addy ?all"

This the case for all domains hosted. It lists the old ip address. Is this the cause of the mail error since it is pointed to the wrong ip?

If so what config files contain this TXT record so I can change all domains?

Edit:
I also ran the command:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
 
Last edited:
You will probably have to go through DA's DNS manager, delete and readd the string with the correct IP address one by one.

If you have a lot of domains it might be worthwhile writing a snippet of perl code to search and replace the IP address in all of the named database files, which is where it's kept.
 
something like:

Code:
cd /var/named
perl -i.bak -p -e 's/209.237.253.164/206.132.219.2/ig' *.db
Where 209.237.253.164 would be the old IP# and 206.132.219.2 would be the new IP#.

Once you've verified the changes were made correctly you can delete the .bak files.

However this will NOT update the serial numbers, which means that slaves won't automatically update :( .

If use slave servers and need to make sure they update you'll have to increment the serial numbers in each zone as well.

Then be sure to restart BIND.

Jeff
 
There definitely has to be a way to update the serials on each domain automatically. This is virtually impossible if you're migrating a server with 1000s of domains.

After renaming the IP's can you just do this?

Code:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

I am looking at migrating a server to another IP block at the same ISP's datacenter. Please let me know if anyone can think of anything else... I also need to know ... does the ipswap.sh script work for reseller IP's too? I have a reseller with 5-6 IP's that are on the old block as well.
 
admonet said:
There definitely has to be a way to update the serials on each domain automatically. This is virtually impossible if you're migrating a server with 1000s of domains.

After renaming the IP's can you just do this?

Code:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
Yes.
I am looking at migrating a server to another IP block at the same ISP's datacenter. Please let me know if anyone can think of anything else... I also need to know ... does the ipswap.sh script work for reseller IP's too? I have a reseller with 5-6 IP's that are on the old block as well.
It should.

Jeff
 
Back
Top