[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Script to fix existing RaQ3 sites for catch-all
- Subject: Re: [cobalt-users] Script to fix existing RaQ3 sites for catch-all
- From: Chris Adams <cmadams@xxxxxxxxxx>
- Date: Fri Feb 25 07:43:36 2000
Once upon a time, cantrell@xxxxxxxxx <cantrell@xxxxxxxxx> said:
> It seems the directory for the required update is not available. Is there
> another location. In addition, I assume by the looks of it, these are customer
> updates, not Cobalts?
>
> Thanks
> -chris
The update that fixes the problem with the interface (the one from
ftp.cobaltnet.com) is provided by a Cobalt employee, but it is not
an "official" patch (I guess it hasn't gone through QA etc.). The
script below was written by me. I'm just another customer - and I
wrote a script to fix the problem on my RaQ3s and I figured others
might find it useful.
--
Chris Adams <cmadams@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Information Services
I don't speak for anybody but myself - that's enough trouble.
> > I threw together a script that will go through and setup the necessary
> > aliases for existing users so that catch-all email addresses will work
> > (after applying Duncan Laurie's patch). It seems to work fine on my
> > RaQ3s, but of course there is no warrenty (if it formats your hard
> > drive, you're on your own :-) ).
> > --
> > Chris Adams <cmadams@xxxxxxxxxx>
> > Systems and Network Administrator - HiWAAY Information Services
> > I don't speak for anybody but myself - that's enough trouble.
> >
> >
> > #!/usr/bin/perl -w
> >
> > # Script to fixup RaQ3 accounts so catch-all email addresses don't catch
> > # all email for the domain.
> > #
> > # Just run this script as root on a RaQ3.
> > #
> > # You should first apply Duncan Laurie's patch, available from
> > # ftp://ftp.cobaltnet.com/pub/users/duncan/raq3/raq3-catchall.patch.bz2
> > #
> > # Chris Adams <cmadams@xxxxxxxxxx>
> > # HiWAAY Information Services
> >
> > use DB_File;
> > use Cobalt::Email;
> > use strict;
> >
> > my $debug = 0;
> > if (@ARGV && ($ARGV[0] eq "-d")) {
> > $debug = 1;
> > shift @ARGV;
> > }
> >
> > my %virt = Cobalt::Email::mail_virtuser_list_alias;
> > my %routes = Cobalt::Email::mail_virtuser_list_route;
> >
> > opendir (S, "/home/sites") or die "/home/sites: $!";
> > while (defined (my $f = readdir (S))) {
> > next if ($f =~ /^\.{1,2}$/);
> > next if ($f eq "home");
> > next if ($f =~ /^site\d+$/);
> >
> > opendir (U, "/home/sites/$f/users") or die "/home/sites/$f/users: $!";
> > while (defined (my $u = readdir (U))) {
> > next if ($u =~ /^\.{1,2}$/);
> > next if ($u eq "admin");
> > next if (! getpwnam ($u));
> >
> > my $virt = $u . "\@" . $f;
> > next if (defined ($virt{$virt}));
> > $virt{$virt} = $u;
> > print "Adding $virt => $u\n" if ($debug);
> > }
> > closedir (U);
> > }
> > closedir (S);
> >
> > Cobalt::Email::mail_build_virtusertable (\%virt, \%routes) if (! $debug);
> >
> >
> > _______________________________________________
> > cobalt-users mailing list
> > cobalt-users@xxxxxxxxxxxxxxx
> > http://list.cobalt.com/mailman/listinfo/cobalt-users
> >
>
>
>
>
> ---------------------------------------------
> This message was sent using www.emailMY.com.
> Logon Today for Your Free Email Account./
>
>
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-users