head	1.4;
access;
symbols
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1
	OLDHELM:1.3.0.4
	TIGRIS_NOV_11_2000:1.3
	TIGRIS_SEP_13_2000:1.3.0.2
	TIGRIS_BASELINE:1.3;
locks; strict;
comment	@# @;


1.4
date	2000.11.16.04.31.15;	author edk;	state dead;
branches;
next	1.3;

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

1.2
date	2000.05.09.02.34.30;	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.33;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.4
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.
#


# ezmlm-projmail-add
# --------------------
# Update/create mailing lists using ezmlm-idx (the qmail mailing list
# utility).
#
# Note that qmail must be set up correctly; see Helm::QmailAlias for
# more information on the requirements.
#
# We create mailing lists as both project-list@@domain.org and
# list@@project.domain.org. The cute thing is that due to the way
# qmail expands aliases, they both expand to .qmail-project-list, so
# we don't worry too much.
#
# For domain-wide lists, we use the NULL project in the table
# (project_mlists).

use strict;

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

my $EZMLMMAKE = "/usr/bin/ezmlm/ezmlm-make";
my $EZMLMSUB = "/usr/bin/ezmlm/ezmlm-sub";
my $qmailhome = "$sandbox/tigrisq";
my $list_dir = "$qmailhome/$project_name-$list_name";
my $list_dot = "$qmailhome/.qmail-$project_name-$list_name";
my $list_host = "$project_name.$domain_name";
my $list_monitor = "jrobbins-$project_name\@@collab.net";
my $list_moderator = "jrobbins-mod\@@collab.net";
my $replyto = "<#l#>\@@<#h#>";


my $cmd = "unix command line";

print "ezmlm: call ezmlm-make for $project_name - $list_name with $list_options\n";

system($EZMLMMAKE, "-$list_options", $list_dir, $list_dot, $list_name,
       $list_host)
    or die "$EZMLMMAKE -$list_options $list_dir $list_dot $list_name $list_host failed: $!";

print "ezmlm: subscribing $list_monitor to $list_dir\n";

# inital member
system($EZMLMSUB, $list_dir, $list_monitor)
    or die "$EZMLMSUB $list_dir $list_monitor failed: $!";

# moderator
if (index($list_options, "m") > 0) {
    print "ezmlm: setting $list_dir moderator to $list_moderator\n";
    system($EZMLMSUB, "$list_dir/mod", $list_moderator)
        or die "$EZMLMSUB $list_dir/mod $list_moderator failed: $!";
}

# EVIL prefix
print "ezmlm: setting up prefix for Subject: header\n";
open(PREFIX, ">$list_dir/prefix") or die "open $list_dir/prefix failed: $!";
print PREFIX "[$project_name-$list_name]";
close PREFIX or die "close $list_dir/prefix failed: $!";

# EVIL settting of Reply-To: header
if ($list_name ne "announce") {
    if ($list_name eq "cvs") {
	$replyto = "dev\@@<#h#>";
    }
    print "ezmlm: setting Reply-To: of list to $replyto";
    open (HEADERADD, ">$list_dir/headeradd")
        or die "open $list_dir/headeradd failed: $!";
    print HEADERADD "Reply-To: $replyto";
    close HEADERADD or die "close $list_dir/headeradd failed: $!";
}

# what about the initial subscribers?
@


1.3
log
@Minor syntax corrections.
@
text
@@


1.2
log
@Initial untested passes at ezmlm configuration
@
text
@d110 1
a110 1
open PREFIX ">$list_dir/prefix" or die "open $list_dir/prefix failed: $!";
d119 2
a120 2
    print "ezmlm: setting Reply-To: of list to $replyto"
    open HEADERADD ">$list_dir/headeradd"
@


1.1
log
@initial checkin
@
text
@d76 3
a78 3
my $EZMLMMAKE = "/usr/local/bin/ezmlm/ezmlm-make";
my $EZMLMSUB = "/usr/local/bin/ezmlm/ezmlm-sub";
my $qmailhome = "home/tigrisq";
d91 5
a95 3
#make the list
$cmd = "EZMLMMAKE -$list_options $list_dir $list_dot $list_name $list_host";
print "Running: $cmd\n";
d98 2
a99 2
$cmd = "$EZMLMSUB $list_dir $list_monitor";
print "Running: $cmd\n";
d103 3
a105 2
$cmd = "$EZMLMSUB $list_dir/mod $list_moderator";
print "Running: $cmd\n";
d108 5
a112 8
# prefix
$cmd = "echo '[$project_name-$list_name]' > $list_dir/prefix";
print "Running: $cmd\n";

#inlocal needed?
# is this needed?
$cmd = "echo $1-announce > $list_dir/inlocal";
print "Running: $cmd";
d114 1
a114 1
# set Reply-To: header
d119 5
a123 2
    $cmd = "echo 'Reply-To: $replyto' >> $list_dir/headeradd";
    print "Running: $cmd";
@


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
@d76 3
a78 3
my $EZMLMMAKE = "/usr/bin/ezmlm/ezmlm-make";
my $EZMLMSUB = "/usr/bin/ezmlm/ezmlm-sub";
my $qmailhome = "$sandbox/tigrisq";
d91 3
a93 5
system($EZMLMMAKE, "-$list_options", $list_dir, $list_dot, $list_name,
       $list_host)
    or die "$EZMLMMAKE -$list_options $list_dir $list_dot $list_name $list_host failed: $!";

print "ezmlm: subscribing $list_monitor to $list_dir\n";
d96 2
a97 2
system($EZMLMSUB, $list_dir, $list_monitor)
    or die "$EZMLMSUB $list_dir $list_monitor failed: $!";
d101 2
a102 3
    print "ezmlm: setting $list_dir moderator to $list_moderator\n";
    system($EZMLMSUB, "$list_dir/mod", $list_moderator)
        or die "$EZMLMSUB $list_dir/mod $list_moderator failed: $!";
d105 8
a112 5
# EVIL prefix
print "ezmlm: setting up prefix for Subject: header\n";
open(PREFIX, ">$list_dir/prefix") or die "open $list_dir/prefix failed: $!";
print PREFIX "[$project_name-$list_name]";
close PREFIX or die "close $list_dir/prefix failed: $!";
d114 1
a114 1
# EVIL settting of Reply-To: header
d119 2
a120 5
    print "ezmlm: setting Reply-To: of list to $replyto";
    open (HEADERADD, ">$list_dir/headeradd")
        or die "open $list_dir/headeradd failed: $!";
    print HEADERADD "Reply-To: $replyto";
    close HEADERADD or die "close $list_dir/headeradd failed: $!";
@


