head	1.6;
access;
symbols
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1
	OLDHELM:1.4.0.4
	TIGRIS_NOV_11_2000:1.4
	TIGRIS_SEP_13_2000:1.4.0.2
	TIGRIS_BASELINE:1.4;
locks; strict;
comment	@# @;


1.6
date	2000.11.16.04.31.15;	author edk;	state dead;
branches;
next	1.5;

1.5
date	2000.11.12.22.57.33;	author dlr;	state Exp;
branches;
next	1.4;

1.4
date	2000.08.02.22.37.27;	author kmaples;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.01.23.26.29;	author kmaples;	state Exp;
branches;
next	1.2;

1.2
date	2000.05.05.01.36.34;	author manoj;	state Exp;
branches;
next	1.1;

1.1
date	2000.04.29.00.04.10;	author jrobbins;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.11.12.21.17.42;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.6
log
@these are obsoleted by anzu & eyebrowse
@
text
@#!/usr/bin/perl -w

# ================================================================
# Copyright (c) 2000 Collab.Net.  All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 
# 3. The end-user documentation included with the redistribution, if
# any, must include the following acknowlegement: "This product includes
# software developed by Collab.Net (http://www.Collab.Net/)."
# Alternately, this acknowlegement may appear in the software itself, if
# and wherever such third-party acknowlegements normally appear.
# 
# 4. The hosted project names must not be used to endorse or promote
# products derived from this software without prior written
# permission. For written permission, please contact info@@collab.net.
# 
# 5. Products derived from this software may not use the "Tigris" name
# nor may "Tigris" appear in their names without prior written
# permission of Collab.Net.
# 
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ====================================================================
# 
# This software consists of voluntary contributions made by many
# individuals on behalf of Collab.Net.
#


# qmail-project-delete
# $Id: qmail-project-delete,v 1.5 2000/11/12 22:57:33 dlr Exp $
# --------------------

# Provides functions to update the qmail aliases to match the user list;
# forward all the email addrs to the proper place.  Also, update the config
# files used by qmail to do virtual hosting.



# Note that for this to work (and the qmail mailing lists - see
# Helm::QmailLists) several users must exist and be configured in
# qmail. The user configured in the $qmail_user config parameter
# (see Helm::Config) must exist and qmail be set to use it for
# mail to domain.org (in control/virtualdomains). For each project,
# qmail should map project.domain.org to ${qmail_user}-project.
#
# Note that we create these aliases for each domain, so that mail to
# user@@tigris.org works as well as user@@project.tigris.org.


use strict;


# Process arguments
my $sandbox      = $ARGV[0];
my $project_name       = $ARGV[1];
my $domain_name        = $ARGV[2];
my $brand_name         = $ARGV[3];

print "qmail: install some kind of sorry script to bounce email\n";

my $cmd = "unix command line";

my $qmailhome = "$sandbox/tigrisq";
my $qmailinaccessable = "$qmailhome/inaccessable";
my $project_dotqmail = ".qmail-$project_name";
my $project_sorry_address = "tigris";
#TODO: write a sorry script

print "qmail: getting list of .qmail files to move\n";
opendir QMAILHOME, $qmailhome or die "opendir $qmailhome failed: $!";
my @@listing = readdir(QMAILHOME) or die "readdir $qmailhome failed: $!";
my @@dot_qmail_files = grep  /^$project_dotqmail/, @@listing ;
closedir QMAILHOME or die "closedir $qmailhome failed: $!";

print "qmail: moving .qmail files to an inaccessible location\n";
foreach (@@dot_qmail_files) {
    rename "$qmailhome/$_", "$qmailinaccessable/$_" or die "rename failed: $!";
}

print "qmail: writing new .$project_dotqmail-default file\n";
open DOTQMAIL_DEFAULT, ">$qmailhome/$project_dotqmail-default"
    or die "open $qmailhome/$project_dotqmail-default failed: $!";
print DOTQMAIL_DEFAULT $project_sorry_address;
close DOTQMAIL_DEFAULT
    or die "open $qmailhome/$project_dotqmail-default failed: $!";

@


1.5
log
@Resolved merge conflicts.
@
text
@d51 1
a51 1
# $Id: qmail-project-delete,v 1.1.1.1 2000/11/12 21:17:42 dlr Exp $
@


1.4
log
@Corrected typos.
@
text
@d51 1
a51 1
# $Id: qmail-project-delete,v 1.3 2000/08/01 23:26:29 kmaples Exp $
@


1.3
log
@Fixed typos in perl.
@
text
@d51 1
a51 1
# $Id: qmail-project-delete,v 1.2 2000/05/05 01:36:34 manoj Exp $
d93 1
a93 1
my @@dot_qmail_files = grep { /^$project_dotqmail/ };
d98 1
a98 1
    rename "$qmailhome/$_" "$qmailinaccessible/$_" or die "rename failed: $!";
@


1.2
log
@More untested first passes at Tigris scripts.
@
text
@d51 1
a51 1
# $Id: qmail-project-delete,v 1.1 2000/04/29 00:04:10 jrobbins Exp $
d91 1
a91 1
opendir QMAILHOME $qmailhome or die "opendir $qmailhome failed: $!";
d102 1
a102 1
open DOTQMAIL_DEFAULT ">$qmailhome/$project_dotqmail-default"
@


1.1
log
@initial checkin
@
text
@d51 1
a51 1
# $Id: qmail.pm,v 1.1 2000/03/24 20:33:58 jrobbins Exp $
d84 4
a87 4
my $qmailroot = "/home/tigrisq";
my $qmailinaccessable = "$qmailroot/inaccessable";
my $project_dotqmail = "$qmailroot/.qmail-$project_name";
my $project_sorry_address = "jrobbins-$project_name-sorry\@@collab.net";
d90 17
a106 7
$cmd = "/bin/mv -f $project_dotqmail* $qmailinaccessable";
print "Running: $cmd\n";


$cmd = "echo '" . $project_sorry_address . "' >  $project_dotqmail-default";
print "Running: $cmd\n";

@


1.1.1.1
log
@Merging newhelm tree into helm, as per IZ issue #557.  Previous major version of helm is tagged TIGRIS_NOV_11_2000.
@
text
@d51 1
a51 1
# $Id: qmail-project-delete,v 1.1 2000/10/05 20:05:49 jrobbins Exp $
d84 4
a87 4
my $qmailhome = "$sandbox/tigrisq";
my $qmailinaccessable = "$qmailhome/inaccessable";
my $project_dotqmail = ".qmail-$project_name";
my $project_sorry_address = "tigris";
d90 7
a96 17
print "qmail: getting list of .qmail files to move\n";
opendir QMAILHOME, $qmailhome or die "opendir $qmailhome failed: $!";
my @@listing = readdir(QMAILHOME) or die "readdir $qmailhome failed: $!";
my @@dot_qmail_files = grep  /^$project_dotqmail/, @@listing ;
closedir QMAILHOME or die "closedir $qmailhome failed: $!";

print "qmail: moving .qmail files to an inaccessible location\n";
foreach (@@dot_qmail_files) {
    rename "$qmailhome/$_", "$qmailinaccessable/$_" or die "rename failed: $!";
}

print "qmail: writing new .$project_dotqmail-default file\n";
open DOTQMAIL_DEFAULT, ">$qmailhome/$project_dotqmail-default"
    or die "open $qmailhome/$project_dotqmail-default failed: $!";
print DOTQMAIL_DEFAULT $project_sorry_address;
close DOTQMAIL_DEFAULT
    or die "open $qmailhome/$project_dotqmail-default failed: $!";
@


