Date: Thu, 20 Jun 2002 21:33:12 -0500 From: "W. D." <WD@US-Webmasters.com> To: freebsd-questions@FreeBSD.ORG Cc: Giorgos Keramidas <keramida@ceid.upatras.gr> Subject: Re: Master qmail alias for all hosted domains? Message-ID: <5.1.0.14.2.20020620213232.041eb200@us-webmasters.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20020620213232.041eb200>