[Mailman-Users] two copies of mailman on one machine?

Tomas Fasth tomas at euronetics.se
Tue Sep 14 11:58:58 CEST 1999


Hi Jeff.
I run multiple instances of mailman on the same machine. It works well if
you just let them live in total isolation from each other. A necessary step
is to define (export) the environment variables MAILMAN_UID, MAILMAN_GID,
FQDN, and URL before running the configure script. To give you an idea of
how I do it, I have attached the shell script I use for setting up a new
instance.

Hope it helps. Cheers, Tomas

-------------- next part --------------
#!/usr/bin/env bash

. /etc/virtual.conf

if [ $# -ne 2 ] ; then echo "USAGE: `basename $0` <user> <domain>" ; exit ; fi

export listuser=$1
export listdomain=$2
export vlistbase=${virtualbase}/mail
export logdir=log
export logfile=${logdir}/$listdomain
export gzippedtarball=${vlistbase}/pub/mailman-1.0.tgz

function verbose () {
    echo + $@ >&2
    $@
}

function rotate () {
    local head=$1 tail=$2 version=$3 horizon=$4
    if [ $version -lt $horizon ] ; then
        if [ -e $head.$version ] ; then
            rotate $head .$version `expr $version + 1` $horizon
        fi
        if [ -e $head$tail ] ; then
            verbose mv $head$tail $head.$version
        fi
    fi
}

verbose cd $vlistbase
test -d $logdir || verbose mkdir -p $logdir
rotate $logfile "" 0 10

umask 2
verbose mkdir -m a+rx,ug+w $listdomain
verbose chown $listuser.$listuser $listdomain
verbose chmod g+ws $listdomain
verbose cd $listdomain

su $listuser -- -sx $gzippedtarball > $vlistbase/$logfile <<-\EOF
    mmdir=mailman
    prefix=`pwd`/$mmdir
    mkdir $mmdir
    chmod a+rx,g+ws $mmdir
    tar zxf $1
    cd mailman-1.0
    export MAILMAN_UID=`id -u` MAILMAN_GID=`id -g`
    export FQDN=$listdomain URL=$listdomain
    ./configure --prefix=$prefix 2>&1
    make install 2>&1
EOF


More information about the Mailman-Users mailing list