1) create group listar

# groupadd listar

2) create user listar

# useradd -g listar listar

3) login as listar

# su listar

4) untar the tarbal and rename the directory to listar

$ tar xvzf listarXXXX.tar/gz
$ mv listarXXXX listar
$ cd listar
$ pwd
/home/listar/listar

5) follow the listar instruction for setup. the source, as is, does not
        build on linux and a couple of easy fixes ( include files ) are needed.

6) get econv.c from the XMail home page, copy it to ~/listar/listar and build it

$ gcc -o econv econv.c

7) get the script listar.sh that is attached to this message, copy it
        to ~/listar/listar and chmod it

$ chmod 755 listar.sh

8) get the perl script lisset.pl that is attached to this message, copy it
        to ~/listar/listar and chmod it

$ chmod 755 lisset.pl

9) READ the listar documentation and edit the config file

10) lisset.pl can be used to create XMail cmd aliases for listar hooks


--mail-root     = XMail mail root w/out final slash
--listar        = FULL path to listar.sh
--list-name     = name of the list to create ( ex: xmail )
--domain        = domain ( ex: xmailserver.org )
--admin         = admin email address ( must be a real account )

--purge         = remove cmdaliases files for the specified list

11) for each mailing list created you probably need to edit the config
        file to customize it ( READ the documentation )






- Davide



-- Binary/unsupported file stripped by Listar --
-- Type: APPLICATION/x-sh
-- File: listar.sh


-- Attached file included as plaintext by Listar --
-- File: lisset.pl

#!/usr/bin/perl

$slash = "/";
$mailroot = $ENV{"MAIL_ROOT"};


foreach $ii (0 .. $#ARGV) {
        if ($ARGV[$ii] eq "--mail-root") {
                ++$ii;
                if ($ii <= $#ARGV) {
                        $mailroot = $ARGV[$ii];
                }
        } elsif ($ARGV[$ii] eq "--listar") {
                ++$ii;
                if ($ii <= $#ARGV) {
                        $listar = $ARGV[$ii];
                }
        } elsif ($ARGV[$ii] eq "--list-name") {
                ++$ii;
                if ($ii <= $#ARGV) {
                        $listname = $ARGV[$ii];
                }
        } elsif ($ARGV[$ii] eq "--domain") {
                ++$ii;
                if ($ii <= $#ARGV) {
                        $domain = $ARGV[$ii];
                }
        } elsif ($ARGV[$ii] eq "--admin") {
                ++$ii;
                if ($ii <= $#ARGV) {
                        $admin = $ARGV[$ii];
                }
        } elsif ($ARGV[$ii] eq "--purge") {
                $purge = 1;
        }
}

if (!defined($mailroot) || $mailroot eq "") {
        print STDERR "MAIL_ROOT not defined: use --mail-root MAILROOT\n";
        exit 1;
}

if (!defined($listname)) {
        print STDERR "listname not defined: use --list-name LISTNAME\n";
        exit 2;
}

if (!defined($domain)) {
        print STDERR "domain not defined: use --domain DOMAIN\n";
        exit 3;
}

$cmdalias = $mailroot . $slash . "cmdaliases" . $slash . $domain . $slash;


if (defined($purge)) {
        $fname = $cmdalias . $listname . "-owner.tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 4;
        }

        $fname = $cmdalias . $listname . ".tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 5;
        }

        $fname = $cmdalias . $listname . "-request.tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 6;
        }

        $fname = $cmdalias . $listname . "-repost.tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 7;
        }

        $fname = $cmdalias . $listname . "-admins.tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 8;
        }

        $fname = $cmdalias . $listname . "-moderators.tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 9;
        }

        $fname = $cmdalias . $listname . "-bounce.tab";
        if (!unlink($fname)) {
                print STDERR "unable to unlink file: $fname\n";
                exit 10;
        }

        exit 0;
}


if (!defined($admin)) {
        print STDERR "admin not defined: use --admin ADMIN-EMAIL\n";
        exit 11;
}

if (!defined($listar)) {
        print STDERR "lt-run pathname not defined: use --listar PATHNAME\n";
        exit 12;
}

if (! -d $cmdalias && !mkdir($cmdalias, 0700)) {
        print STDERR "unable to create directory: $cmdalias\n";
        exit 14;
}


$fname = $cmdalias . $listname . "-owner.tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 15;
}

print OFIL "\"redirect\"\t\"$admin\"\n";

close(OFIL);


$fname = $cmdalias . $listname . ".tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 16;
}

print OFIL 
"\"external\"\t\"0\"\t\"0\"\t\"$listar\"\t\"\@\@TMPFILE\"\t\"-s\"\t\"$listname\"\n";

close(OFIL);



$fname = $cmdalias . $listname . "-request.tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 17;
}

print OFIL 
"\"external\"\t\"0\"\t\"0\"\t\"$listar\"\t\"\@\@TMPFILE\"\t\"-r\"\t\"$listname\"\n";

close(OFIL);



$fname = $cmdalias . $listname . "-repost.tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 18;
}

print OFIL 
"\"external\"\t\"0\"\t\"0\"\t\"$listar\"\t\"\@\@TMPFILE\"\t\"-a\"\t\"$listname\"\n";

close(OFIL);



$fname = $cmdalias . $listname . "-admins.tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 19;
}

print OFIL 
"\"external\"\t\"0\"\t\"0\"\t\"$listar\"\t\"\@\@TMPFILE\"\t\"-admins\"\t\"$listname\"\n";

close(OFIL);



$fname = $cmdalias . $listname . "-moderators.tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 20;
}

print OFIL 
"\"external\"\t\"0\"\t\"0\"\t\"$listar\"\t\"\@\@TMPFILE\"\t\"-moderators\"\t\"$listname\"\n";

close(OFIL);



$fname = $cmdalias . $listname . "-bounce.tab";

if (!open(OFIL, ">$fname")) {
        print STDERR "unable to create file: $fname\n";
        exit 21;
}

print OFIL 
"\"external\"\t\"0\"\t\"0\"\t\"$listar\"\t\"\@\@TMPFILE\"\t\"-bounce\"\t\"$listname\"\n";

close(OFIL);


-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to