This file is indexed.

/var/list/.bin/createlist is in smartlist 3.15-22.

This file is owned by list:list, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#! /bin/sh
: &&O='cd .' || exec /bin/sh "$0" $argv:q # we're in a csh, feed myself to sh
$O || exec /bin/sh "$0" "$@"		  # we're in a buggy zsh
#########################################################################
#	createlist	To create mailinglists				#
#									#
#	Created by S.R. van den Berg, The Netherlands			#
#########################################################################
#$Id: createlist,v 1.36 2000/08/22 04:35:59 guenther Exp $

defaults=.etc

test=test		# /bin/test
ln=ln			# /bin/ln
touch=touch		# /bin/touch
mkdir=mkdir		# /bin/mkdir
rmdir=rmdir		# /bin/rmdir
sed=sed			# /bin/sed
pwd=pwd			# /bin/pwd
cat=cat			# /bin/cat
rm=rm			# /bin/rm
cp=cp			# /bin/cp
ls=ls			# /bin/ls
chmod=chmod		# /bin/chmod
echo=echo		# /bin/echo
grep=grep		# /bin/grep
lockfile=lockfile	# /usr/local/bin/lockfile

bin_procmail=.bin/procmail
flist=.bin/flist

DEVNULL=/dev/null
etcpasswd=/etc/passwd
EX_USAGE=64
EX_UNAVAILABLE=69

case "$bin_procmail" in
  SedBinDi[r]*) $echo "Please read the SmartList/INSTALL file first." 1>&2
     $echo "You need to run install.sh to copy things into place." 1>&2
     exit $EX_USAGE
     ;;
esac

( exec 2>$DEVNULL; lockfile )
if $test $? != 64
then
  $echo "Where is \"lockfile\"? It should be installed in your PATH" 1>&2
  exit $EX_UNAVAILABLE
fi

if $test ! -d $defaults
then
  if $test -d list
  then cd ./list
  else cd ..
     $test -d $defaults || cd ..
  fi
fi
if $test ! -d $defaults
then
  $echo "createlist: You should be near the main list directory to do this" \
   1>&2
  exit $EX_USAGE
fi

if $test ! -f $bin_procmail
then
  OIFS="$IFS"
  IFS=:"$IFS"
  procmail=""

  for a in $PATH
  do $test -z "$procmail" -a -f "$a"/procmail && procmail=$a/procmail
  done

  IFS="$OIFS"
  if $test -z "$procmail"
  then
     $echo "Where is \"procmail\"?" 1>&2
     $echo "The symbolic link $bin_procmail must point to it" 1>&2
     exit $EX_UNAVAILABLE
  fi
  $rm -f $bin_procmail
  $ln -s $procmail $bin_procmail 2>$DEVNULL ||
  $ln $procmail $bin_procmail 2>$DEVNULL ||
   ( $cat >$bin_procmail <<HERE
#! /bin/sh
:
exec $procmail "\$@"
HERE
     $chmod 0755 $bin_procmail
   )
fi

domain=`$sed -n -e 's/^[^#]*domain= *\([^	 ]*\).*$/\1/p' \
 $defaults/rc.init`

if $test .$domain = .INSERT.YOUR.MAIL.DOMAIN.HERE
then
  $echo "I refuse to do anything useful until you have edited the" 1>&2
  $echo "rc.init file.	\`domain' must be set to some sane value." 1>&2
  exit $EX_USAGE
fi

archiveserver=no
$test .-a = ".$1" && shift && archiveserver=yes

if $test $# != 1 -a $# != 2 -o ".$1" = .-h
then
  $echo "Usage: createlist [-a] listname [maintainer]" 1>&2
  $echo "	-a	create an archive server instead of a list" 1>&2
  exit $EX_USAGE
fi

list="$1"
maintainer="$2"

case "$list" in
  *[+*?]*) $echo "createlist: This listname contains magic characters" 1>&2
     $echo "createlist: Support for this is planned, ask on the SmartList" 1>&2
     $echo "createlist: mailinglist for more details" 1>&2
     exit $EX_USAGE;;
  "*[/	 ]*") $echo "createlist: Suspicious listname specified" 1>&2
     exit $EX_USAGE;;
  owner-*|*-owner)
     $echo "createlist: Listname does not agree with sendmail" 1>&2
     exit $EX_USAGE;;
  *[@!]*) $echo "createlist: Specify listname without domain name appended" \
     1>&2; exit $EX_USAGE;;
esac

if $grep -i "^$list:" $etcpasswd >$DEVNULL
then
  $echo "createlist: You can't pick a listname equal to an existing username" \
   1>&2; exit $EX_USAGE
fi

umask `$sed -n -e 's/^[^#]*UMASK=[^0-9]*\([0-9]*\).*$/\1/p' $defaults/rc.init`

$chmod go+x . .bin $defaults			# to preserve sanity

if $mkdir "$list" 2>$DEVNULL
then
  $chmod g+s "$list" 2>$DEVNULL		# to ensure the gid is inherited
elif $test -d "$list" 2>$DEVNULL
then
  $echo "createlist: \"$list\" already exists" 1>&2; exit $EX_USAGE
else
  $echo "createlist: \"$list\" cannot be created" 1>&2
  $echo "createlist: (can you write to the list directory?)" 1>&2
  exit $EX_UNAVAILABLE
fi
cd "$list"
for a in rc.submit rc.init rc.request help.txt subscribe.txt unsubscribe.txt \
 archive.txt reject rc.confirm confirm-help.txt confirm.txt confirm-error.txt \
 rc.rfc822
do
  $test -f ../$defaults/$a || $touch ../$defaults/$a	# make sure it exists
  $ln -s ../$defaults/$a $a
done

$mkdir archive
$mkdir archive/latest

$sed -e "/^maintainer/ s/=/=	$maintainer/" <../$defaults/rc.custom \
 >rc.custom
$echo "(Only addresses below this line can be automatically removed)" >>dist

$chmod ugo+x .
$chmod ugo+r dist

if $test $archiveserver = yes
then
  $rmdir archive/latest
  $rm -f dist subscribe.txt unsubscribe.txt help.txt rc.submit rc.request
  $cat >rc.submit <<HERE
HOST=continue_with_rc.request
HERE
  $ln -s ../$defaults/rc.archive rc.request
else
  $ln -s dist accept
fi

cd ..

$echo 1>&2
$echo "Installed the following files (many symlinked):" 1>&2
$echo 1>&2
$ls -ld $list $list/* $list/*/* 1>&2 2>$DEVNULL
$echo 1>&2

set `./$flist -v 2>&1 | $sed -n -e 's/^User: //p' -e 's/^Directory: //p'`

listuser=$1			# The SmartList user
listdir=$2			# The SmartList directory

if $test $# = 1
then
  listdir=`$sed -n \
   -e "s/^$listuser:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/p" <$etcpasswd`
  if test -z "$listdir"
  then
     listdir=$HOME
  fi
fi

$test -d "$listdir/$list" || listdir=`$pwd`

flist=$listdir/$flist

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# WARNING: Do NOT create owner-$list: aliases for SmartList managed lists.
# Doing so will impair the functionality of SmartList.
#
# The $list-dist: alias can be omitted if you are using choplist to distribute
# this list (and have no desire to fall back on regular sendmail :include:
# expansion).
#

$echo "Now make the following entries in your /etc/aliases file:" 1>&2
$echo \########################################################################
$echo "$list: \"|$flist $list\""
$echo "$list-request: \"|$flist $list-request\""
#
#$test $archiveserver = no && $echo "$list-dist: :include:$listdir/$list/dist"
#
$echo \########################################################################
$echo "And make sure to run newaliases afterwards." 1>&2