/var/list/.bin/mindlist 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 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | #! /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
#########################################################################
# mindlists To send notices or reminders to list owners #
# and members #
# #
# Created by Alan K. Stebbens <aks@hub.ucsb.edu> #
#########################################################################
# $Id: mindlist,v 1.2 1999/03/30 18:17:37 guenther Exp $
echo mindlist: Customise first
exit 64
# Site configuration (should be externalized)
#
domain=hub.ucsb.edu
listmaster=lists@$domain
admin="\"Mailing List Mailer-Daemon\" <$listmaster>"
#
cd $HOME
# Syntax: reminder [-d] [-n] [-u] [-o] list ...
test=test # /bin/test
ln=ln # /bin/ln
rm=rm # /bin/rm
cp=cp # /bin/cp
echo=echo # /bin/echo
cat=cat # /bin/cat
awk=awk # /bin/awk
SENDMAIL=/usr/lib/sendmail
usage="usage: mindlists [-d] [-n] [-u] [-o] list ..."
lists=
while $test $# -gt 0
do
case "$1" in
-d|-debug) debug=1 ;;
-o|-owners) owners=1 ;;
-u|-users) users=1;;
-m|-moderators) moders=1 ;;
-n|-new) new=1 ;;
-*) $echo $usage 1>&2 && exit 64 ;;
*) lists="$lists $1" ;;
esac
shift
done
if $test -z "$lists" ; then
lists="`ls | tr '\012' ' '`"
fi
ifdebug () {
if $test -n "$debug" ; then
"$@"
fi
}
ifndebug () {
if $test -z "$debug" ; then
"$@"
fi
}
decho () {
ifdebug echo "$@"
}
necho () {
ifndebug echo "$@"
}
sendmail () {
if $test -n "$debug" ; then
echo $SENDMAIL $*
cat
else
$SENDMAIL $*
fi
}
#######################
# welcome the owner to his/her new list
welcome_owner () {
if $test -z "${owner}" ; then
echo List ${list} has no owner.
return
fi
necho "Sending welcoming mail to $owner.."
$cat <<EOF | sendmail -f $listmaster -oi -t $owner
From: $admin
To: $owner
X-Loop: $listaddr
Subject: Welcome to your new list: $listaddr
Welcome to your new list, $listaddr, of which you are the owner.
As the owner, you are responsible for its maintenance, which is
a fairly simple process given that it is being managed by SmartList.
The procedure for remote list management is:
a. send an e-mail to the address: $list-request@$domain
b. place administrative commands on the header: "X-Command:",
using the syntax:
X-Command: $owner PASSWORD COMMAND
where for your list, $list, the password is: "$passwd".
Command is one of:
subscribe MAILADDRESS - add MAILADDRESS to the dist list
unsubscribe MAILADDRESS - remove MAILADDRESS from the dist list
checkdist MAILADDRESS - see if MAILADDRESS is on the dist list
showdist - show the current dist list
showlist - show details of the list configuration
showlog - show the log of subs, unsubs, and archive requests
wipelog - clear the log
help - send help
info - same as help
If you ever need further assistance in managing your list, you can
contact the list master at $listmaster.
EOF
}
###############
# remind the owner of his list
remind_owner () {
if $test -z "${owner}" ; then
echo List ${list} has no owner.
return
fi
necho "Sending reminder to list \"$list\" owner \"$owner\".."
$cat <<EOF | sendmail -f $listmaster -oi -t $owner
From: $admin
To: $owner
X-Loop: $listaddr
Subject: Reminder: You are the owner of list $listaddr
This is a reminder that you are registered as the owner of the
list "$listaddr".
If this is still true, then do nothing -- you do not need to
reply to this mail. Just the process of successfully sending
this mail to you automatically renews your ownership.
If you are not the owner of this list, please respond to this mail
with an explanation, provide the new owner address, or ask to
have the list removed.
If you ever need further assistance in managing your list, you can
contact the list master at $listmaster.
EOF
}
####################
# Welcome the users to their new list
welcome_users () {
necho "Sending welcome mail to users of list \"$list\"..."
( $cat <<EOF
Sender: $listreq
From: $admin
To: $listaddr
Subject: Welcome to the mailing list "$listaddr"
X-Loop: $listaddr
Precedence: bulk
X-Mailing-List: <$listaddr>
Welcome to the mailing list "$listaddr".
EOF
if $test -f $list/info.txt ; then
echo "The purpose of this list is:"
echo ""
$cat $list/info.txt
echo ""
fi
$cat <<EOF
All administrative correspondance should be directed to
"$listreq".
You need do nothing to remain subscribed -- just the process of
successfully sending this mail to you automatically verifies your
subscription.
If you wish to be removed from this list, please send an e-mail with the
subject of "unsubscribe" to "$listreq".
If you have any difficulties with this list, please contact the list owner
at "$owner".
EOF
) | sendmail -oi -t
}
####################
# Remind users about their list
#
# variables:
# $list, $listreq, $admin, $listaddr, $owner
remind_users () {
necho "Sending reminder to users of list \"$list\"..."
$cat <<EOF | sendmail -oi -t
Sender: $listreq
From: $admin
To: $listaddr
Subject: Reminder: You are on the mailing list "$listaddr"
X-Loop: $listaddr
Precedence: bulk
X-Mailing-List: <$listaddr>
This is a reminder that you are a member of the list "$listaddr",
and a verification of your address. You need do nothing to remain
subscribed -- just the process of successfully sending this mail
to you automatically renews your membership.
If you wish to be removed from this list, please send an e-mail with the
subject of "unsubscribe" to "$listreq".
If you have any difficulties with this list, please contact the list owner
at $owner.
EOF
}
# Send welcome/reminder to moderators
welcome_moderators () {
flag=`$awk '/^moderated_flag/{print $3}' $list/rc.custom 2>/dev/null`
if $test "${flag}" != yes ; then
echo List $list is not moderated
return
fi
necho -n "Sending welcome mail to moderators of list \"$list\".."
for moderator in $moderators
do
necho -n " $moderator"
( $cat <<EOF
Sender: $listreq
From: $admin
To: $moderator
Subject: Welcome as a moderator of the mailing list "$listaddr"
X-Loop: $listaddr
X-Mailing-List: <$listaddr>
Welcome as a moderator of the list "$listaddr".
You have been selected as a moderator of the list "$listaddr".
This means that you, along with any other moderators, will receive
unmoderated submissions to "$list".
If you choose to authorize the submission, you must resend the mail
with the following header added:
Approved: $moderator
If you choose to not authorize a particular submission, simply ignore
it.
Any moderator may choose to authorize a submission, but only the first
approved submission will actually be forwarded to the list; succeeding
authorizations of the same submission will be filtered automatically.
The current list of moderators for list "$list" is:
EOF
echo "$moderators" | tr ' ' '\012'
$cat <<EOF
If you wish to be removed as a moderator from this list, or have
other questions about this list, please contact the list owner at
$owner.
EOF
) | sendmail -oi -t
done
necho ""
}
remind_moderators () {
flag=`$awk '/^moderated_flag/{print $3}' $list/rc.custom 2>/dev/null`
if $test "${flag}" != yes ; then
echo List $list is not moderated
return
fi
necho -n "Sending reminder to moderators of list \"$list\".."
for moderator in $moderators
do
necho " $moderator"
( $cat <<EOF
Sender: $listreq
From: $admin
To: $moderator
Subject: Reminder: you are a moderator of the mailing list "$listaddr"
X-Loop: $listaddr
X-Mailing-List: <$listaddr>
This is a reminder of your status as a moderator of the list
"$listaddr".
You do not need to reply to this message, unless you have
questions or concerns regarding, or no longer wish to act as
a moderator for the list "$listaddr".
A reminder of your duties as moderator:
You will receive unmoderated submissions to the list "$list".
If you choose to authorize a particular submission, you must
resend the mail with the following header added:
Approved: $moderator
If you choose to not authorize a particular submission, simply ignore
it.
Any moderator may choose to authorize a submission, but only the first
approved submission will actually be forwarded to the list; succeeding
authorizations of the same submission will be filtered automatically.
The current list of moderators for list "$list" is:
EOF
echo "$moderators" | tr ' ' '\012'
) | sendmail -oi -t
done
necho ""
}
# Collect all owners, users, and moderators
for list in $lists
do
$test -d $list || continue
listaddr=${list}@${domain}
listreq=${list}-request@${domain}
owner=`$awk '/^maintainer/{print $3;exit}' $list/rc.custom $list/rc.init 2>/dev/null`
passwd=`$awk '/^X_COMMAND_PASSWORD/{print $3}' $list/rc.custom 2>/dev/null`
moderators=
if $test -f $list/moderators; then
moderators="`(cat $list/moderators 2>/dev/null) | tr '\012' ' '`"
fi
# Invoke either "welcome_" or "remind_"
what='remind'
if $test -n "$new"; then
what='welcome'
fi
if $test -n "$owners" ; then
eval "$what\_owner"
fi
if $test -n "$moders"; then
eval "$what\_moderators"
fi
if $test -n "$users"; then
eval "$what\_users"
fi
done
|