diff options
Diffstat (limited to 'mail/majordomo/scripts/adaptwrapper')
-rw-r--r-- | mail/majordomo/scripts/adaptwrapper | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/mail/majordomo/scripts/adaptwrapper b/mail/majordomo/scripts/adaptwrapper deleted file mode 100644 index c21ef64c67a4..000000000000 --- a/mail/majordomo/scripts/adaptwrapper +++ /dev/null @@ -1,76 +0,0 @@ -#! /bin/sh -# anders@FreeBSD.org, 2002-02-08 - -if [ -z "$1" ] -then - prefix=/usr/local/majordomo -else - if [ -d "$1/majordomo" ] - then - prefix=$1/majordomo - else - echo "Could not find the majordomo dir." - echo - echo "Usage: $0 <install prefix>" - exit 1 - fi -fi -tempfile=`/usr/bin/mktemp -t radiolist` - -/usr/bin/dialog --title "Making the majordomo wrapper run" --clear --radiolist "We need to make the majordomo wrapper program executable by your Mail\nDelivery Agent, but do not want it executable for all users due\nto security reasons.\n\n(This script can be re-executed from\n/usr/ports/mail/majordomo/scripts/adaptwrapper.)\n\nAdapt to the MDA of:" -1 -1 5 \ -Sendmail "(add users daemon/mailnull to the majordom group)" ON \ -Postfix "(change group ownership of wrapper to nobody)" OFF \ -2>$tempfile - -if [ "$?" = "1" ] -then - echo "Cancel pressed. You will need to make wrapper executable yourself." -fi - -choice=`cat $tempfile` -rm -f $tempfile -if [ -z "$choice" ] -then - echo "Empty selection." - exit 1 -fi - -addmember() { -# $1: group $2: user - if !(pw groupmod $1 -m $2 >/dev/null 2>&1) - then - echo "Error: Could not add user $2 to group $1." - exit 1 - fi -} - -changegroup() { -# $1: group - mywrapper=$prefix/wrapper - if !(chgrp $1 $mywrapper >/dev/null 2>&1) - then - echo "Error: Could not change group ownership of" - echo "$mywrapper" - echo "to group $1." - exit 1 - fi -} - -case $choice in -'Sendmail') - addmember majordom daemon - if (pw usershow mailnull >/dev/null 2>&1) - then - addmember majordom mailnull - fi - ;; -'Postfix') - changegroup nobody - ;; -'None') - echo "Fine. I see you want to make wrapper executable yourself." - ;; -*) - echo "Unknown MTA specified." - ;; -esac |