Great Circle Associates Majordomo-Users
(September 1999)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: new lists and creating aliases - update db
From: "Greg W" <redhat_list @ hotmail . com>
Date: Wed, 29 Sep 1999 10:42:09 GMT
To: majordomo-users @ GreatCircle . COM

Hi all

How could we get the script below to add aliases to the aliases file while 
its doing the rest.....in this case it would need to create ...

I use RH 5   aliases file is in   /etc/alaiases

it looks as if it should already be creating this



#!/usr/bin/perl

## $VARIABLES should be self explanitory
## this generates the additions to the aliases file and prints to STDOUT
## released with majordom rpm under GPL
## use at your own risk :) but it works for me.

$HOME="/usr/lib/majordomo";
$DATA="/var/lib/majordomo";

$LISTNAME="test";
$LISTOWNER="test\@domain.com";
$HOSTNAME="domain.com";

$MAKEDIRECTORYS="yes";

print <<EOF
######  definitions for majordomo list ${LISTNAME} ##
##############    regular list    ###################

${LISTNAME}-owner:          ${LISTOWNER}
owner-${LISTNAME}:          ${LISTNAME}-owner
${LISTNAME}-approval:       ${LISTNAME}-owner
owner-${LISTNAME}-outgoing: ${LISTNAME}-owner

${LISTNAME}:   "|/$HOME/wrapper resend -R -r ${LISTNAME} -l ${LISTNAME} -h
${HOSTNAME} ${LISTNAME}-outgoing"
${LISTNAME}-outgoing:     "|/usr/sbin/bulk_mailer
${LISTNAME}-owner\@${HOSTNAME} /$DATA/lists/${LISTNAME}",
${LISTNAME}-archive, ${LISTNAME}-digestify
${LISTNAME}-request:  "|/$HOME/wrapper majordomo -l ${LISTNAME}"
${LISTNAME}-archive: "|/$HOME/wrapper archive2.pl -f
/$DATA/archives/${LISTNAME}.archive -u -m"

###  Digest list       ################################

${LISTNAME}-digestify: "|/$HOME/wrapper digest -r -C -l ${LISTNAME}-digest
${LISTNAME}-digest-outgoing"

${LISTNAME}-digest:       ${LISTNAME}

${LISTNAME}-digest-outgoing:     "|/usr/sbin/bulk_mailer
${LISTNAME}-owner@${HOSTNAME} /$DATA/lists/${LISTNAME}-digest"

${LISTNAME}-digest-request:  "|/$HOME/wrapper majordomo -l
${LISTNAME}-digest"

${LISTNAME}-digest-owner:          ${LISTNAME}-owner
owner-${LISTNAME}-digest:          ${LISTNAME}-owner
${LISTNAME}-digest-approval:       ${LISTNAME}-owner
owner-${LISTNAME}-digest-outgoing: ${LISTNAME}-owner
### end majordomo list ${LISTNAME} ################

EOF
;

if  ( $MAKEDIRECTORYS eq "yes" )
{
open (FILE , ">/$DATA/lists/${LISTNAME}" );
print FILE "${LISTOWNER}\n";
close FILE;
chown (91,91,"/$DATA/lists/${LISTNAME}");
chmod 0660,"/$DATA/lists/${LISTNAME}";

open (FILE , ">/$DATA/lists/${LISTNAME}.info");
print FILE "This is the info for list ${LISTNAME}\n\n";
close FILE;
chown (91,91,"/$DATA/lists/${LISTNAME}.info");
chmod 0660,"/$DATA/lists/${LISTNAME}.info";

open (FILE , ">/$DATA/lists/${LISTNAME}-digest" );
print FILE "${LISTOWNER}\n";
close FILE;
chown (91,91,"/$DATA/lists/${LISTNAME}-digest");
chmod 0660,"/$DATA/lists/${LISTNAME}-digest";

open (FILE , ">/$DATA/lists/${LISTNAME}-digest.info");
print FILE "This is the info for list ${LISTNAME}-digest\n";
print FILE "This list is managed by $LISTOWNER\n\n";
close FILE;
chown (91,91,"/$DATA/lists/${LISTNAME}-digest.info");
chmod 0660,"/$DATA/lists/${LISTNAME}-digest.info";

mkdir ("/$DATA/lists/${LISTNAME}-digest.archive",0750);
chown 91,91,"/$DATA/lists/${LISTNAME}-digest.archive";

mkdir ("/$DATA/digest/${LISTNAME}-digest",0750);
chown 91,91,"/$DATA/digest/${LISTNAME}-digest";

mkdir ("/$DATA/digest/${LISTNAME}",0750);
chown 91,91,"/$DATA/digest/${LISTNAME}";
}; # end if MAKEDIRS


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Indexed By Date Previous: Re: colon in email addresses (fixed)
From: "Greg W" <redhat_list@hotmail.com>
Next: Re: Returned mail: tux-announce-list... aliasing/forwarding loop broken (fwd)
From: Ben Smithurst <ben@scientia.demon.co.uk>
Indexed By Thread Previous: Re: colon in email addresses (fixed)
From: "Greg W" <redhat_list@hotmail.com>
Next: digest problems
From: Ian Douglas <idouglas@woodvale.on.ca>

Google
 
Search Internet Search www.greatcircle.com