From owner-freebsd-isp Mon Dec 18 9:38:50 2000 From owner-freebsd-isp@FreeBSD.ORG Mon Dec 18 09:38:45 2000 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mail.psknet.com (orion.psknet.com [63.171.251.4]) by hub.freebsd.org (Postfix) with SMTP id 68A2737B400 for ; Mon, 18 Dec 2000 09:38:44 -0800 (PST) Received: (qmail 68144 invoked from network); 18 Dec 2000 17:38:43 -0000 Received: from arcadia.psknet.com (HELO arcadia) (63.171.251.7) by orion.psknet.com with SMTP; 18 Dec 2000 17:38:43 -0000 From: "Troy Settle" To: Subject: RE: Off topic - shell skills Date: Mon, 18 Dec 2000 12:38:24 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal X-AntiVirus: scanned for viruses by Pulaski Networks (http://www.psknet.com) using AMaViS (http://www.amavis.org) Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ok kids, Re-read my post. I did NOT say to use a CNAME as the MX. I suggested that you create a CNAME record to point mail.CUSTOMER.com to point to mail.ISP.net. The MX record would be to the A record for mail.ISP.net. Now, to change the mail server for 1 domain or 697823 domains, you only have to edit a single record in a single zone. That would be the A record for mail.ISP.net. This is valid, and if you actually read my post, you'll see that. In fact, there's no reason that a customer's zone file can't look something like: $ORIGIN customer.com. @ IN A 192.168.10.123 IN MX 10 mail.ISP.net. www IN CNAME @ Note that there is no record for mail.customer.com at all, it's simply not needed since the customer uses the ISP's mail server. This is how I did all of my zones at one time (I now use a script to assemble zone files from a database). And no, this will not fit everyone's needs, but it works for me and several other ISPs that I've consulted for. Any more objections to my suggestion? -- Troy Settle Pulaski Networks 540.994.4254 It's always a long day, 86400 doesn't fit into a short ** -----Original Message----- ** From: owner-freebsd-isp@FreeBSD.ORG ** [mailto:owner-freebsd-isp@FreeBSD.ORG]On Behalf Of Troy Settle ** Sent: Monday, December 18, 2000 7:20 AM ** To: Livens Wim; 'Dave Wilson'; freebsd-isp@FreeBSD.ORG ** Subject: RE: Off topic - shell skills ** ** ** ** Dave, ** ** As a future timesaver (because you will have to do this again ** someday), you ** might want to take the time now to eliminate all A records to ** mail, and set ** the following: ** ** mail IN CNAME mail.ISP.net. ** @ IN MX 10 mail.ISP.net. ** ** By doing this, you've dropped your editing needs to 1 line in 1 ** zone file. ** ** G'luck, ** ** -Troy ** ** ** ** ** -----Original Message----- ** ** From: owner-freebsd-isp@FreeBSD.ORG ** ** [mailto:owner-freebsd-isp@FreeBSD.ORG]On Behalf Of Livens Wim ** ** Sent: Monday, December 18, 2000 5:51 AM ** ** To: 'Dave Wilson'; freebsd-isp@FreeBSD.ORG ** ** Subject: RE: Off topic - shell skills ** ** ** ** ** ** > How do I write a shell script that will change: ** ** > ** ** > mail IN A 10.1.1.58 ** ** > ** ** > to: ** ** > ** ** > mail IN A 10.0.0.1 ** ** > ** ** > ** ** > ? ** ** > ** ** > I need this script to parse through each zone, so when it ** ** > finds "10.1.1.58" ** ** > in a zone it will change the "10.1.1.58" to "10.0.0.1". ** ** > Please help if you can. ** ** ** ** Just to give you an awk-alternative: pipe your zonefiles through this: ** ** ** ** awk '/10.1.1.58/ {if ($1=="mail"&&$2=="IN"&&$3="A") print ** ** $1"\t"$2"\t"$3"\t10.0.0.1"; else print $0;} !/10.1.1.58/ {print}' ** ** ** ** It's probably far from optimal but it will not just change *any* ** ** occurance ** ** of that ip address, as in the sed example; only the A records ** for hosts ** ** named "mail". ** ** ** ** -- ** ** Wim Livens ** ** Internet Engineer ** ** COLT Telecom ** ** Brussels ** ** ** ** ** ** ** ** To Unsubscribe: send mail to majordomo@FreeBSD.org ** ** with "unsubscribe freebsd-isp" in the body of the message ** ** ** ** ** ** ** ** To Unsubscribe: send mail to majordomo@FreeBSD.org ** with "unsubscribe freebsd-isp" in the body of the message ** ** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message