From owner-freebsd-questions Thu Jun 20 19:33:53 2002 Delivered-To: freebsd-questions@freebsd.org Received: from cgpf2.cgp.netins.net (smtp.netins.net [167.142.225.203]) by hub.freebsd.org (Postfix) with ESMTP id 7B39E37B416 for ; Thu, 20 Jun 2002 19:33:23 -0700 (PDT) Received: from [216.248.109.21] (HELO xyz.netins.net) by cgpf2.cgp.netins.net (CommuniGate Pro SMTP 3.5.9) with ESMTP id 79930573; Thu, 20 Jun 2002 21:33:21 -0500 Message-Id: <5.1.0.14.2.20020620213232.041eb200@us-webmasters.com> X-Sender: wd@us-webmasters.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 20 Jun 2002 21:33:12 -0500 To: freebsd-questions@FreeBSD.ORG From: "W. D." Subject: Re: Master qmail alias for all hosted domains? Cc: Giorgos Keramidas In-Reply-To: <20020620213158.GC8735@hades.hell.gr> References: <5.1.0.14.2.20020620134312.04c22a50@us-webmasters.com> <5.1.0.14.2.20020620134312.04c22a50@us-webmasters.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks Giorgos, I'll give it a shot! At 16:31 6/20/2002, Giorgos Keramidas wrote: >On 2002-06-20 13:46 +0000, W. D. wrote: >> Is there some way to set up an alias that forwards: >>=20 >> webmaster@hosteddomain1.com >> webmaster@hosteddomain2.com >> postmaster@hosteddomain1.com >> postmaster@hosteddomain2.com >> . >> . >> . >> etc. >>=20 >> to=20 >>=20 >> webmaster@mymaindomain.com >>=20 >> This would be for all domains on the box. >>=20 >> Ideas? > >You could always use a script that reads named.conf and generates the >alias list on stdout. Running this periodically from cron to update >an alias in ~qmail-alias should be easy after you test it for a while. > >A quick and dirty hack that does something like this could be: > > $ cat makealias.sh > > grep '^zone' /etc/namedb/named.conf | \ > awk '{print $2}' | \ > sed -n -e 's/^"//' -e 's/"$//' -e '/^[[: alpha:]]/ s/^/\&root@/p' > >When run on my home machine, which is called hades.hell.gr (hell.gr >being a fake, unregistered domain), and has a few test domains that I >use for various funny purposes, prints: > > $ sh makealias.sh > &root@hell.gr > &root@example.gr > &root@no.gr > >Redirecting the output to ~qmail-alias/.qmail-admins should be easy: > > $ cat updatealias.sh > sh makealias.sh > ~qmail-alias/.qmail-admins > >- Giorgos > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message Start Here to Find It Fast!=A9 -> http://www.US-Webmasters.com/start.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message