/var/list/.etc/rc.request is in smartlist 3.15-22.
This file is owned by list:list, with mode 0o644.
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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | # BEFORE editing this file, you should make sure that it is not linked to
# the master version (../.etc/rc.request) anymore (i.e. "delink rc.request"
# if you do not want your changes to affect all lists).
#
# New mails can be temporarily stalled by creating the file rc.lock (either in
# ../.etc for all lists or in the current directory for this list only).
# modified for security reasons and better handling for email addresse
# with non alphanumeric chars at the beginning off local part
# 11 Feb. 2005, Werner Reisberger, werner at pure dot ch
# modified for confirmation messages and multiple maintainers
# 11 Dec. 1998, Werner Reisberger, werner at pure dot ch
#$Id: rc.request,v 1.2.1.2 1999/03/12 14:41:20 szhrew Exp szhrew $
# $Log: rc.request,v $
# Revision 1.2.1.2 1999/03/12 14:41:20 szhrew
# merged two recipes
INCLUDERC=$RC_INIT
INCLUDERC=$RC_CUSTOM
INCLUDERC=$RC_LOCAL_REQUEST_00
LOCKFILE=tmp.lock # for reusing tmp.(request|from)
# also makes sure that the load doesn't go sky-high
# when a lot of mail arrives concurrently
:0 Bhfw # concatenate header and body
* $^^$X_COMMAND:
| formail -X ""
#
# We now check:
# If the length is roughly within bounds.
# That it is not a reply or something.
# That we didn't send it ourselves.
# That it wasn't sent by a daemon of some kind.
#
# If everything matches, we extract the sender address into tmp.from
#
# is there more than one maintainer?
maintainer_re="$maintainer"
maintainers="$maintainer"
Maintainer=Maintainer
:0
* maintainer ?? ,
{ maintainer_re="`echo $maintainer | sed -e 's/,/|/g' -e 's/\./\\\./g'`"
maintainers="`echo $maintainer | sed -e 's/,/ /g'`"
Maintainer=Maintainers
}
:0
* B ?? < 4096
* $$daemon_bias
* $!^(X-(Loop: $\listaddr|Diagnostic:)|$X_COMMAND:)
* -100^0 ^FROM_DAEMON
* 1^0
{
INCLUDERC=${require_confirm:+rc.confirm}
:0
* -100^0 ^Subject:[^a-z]*(Re:|erro|change|problem|((can)?not|.*n't)\>)
* 100^0 B ?? ^^([ ]|$)*\
((archives?:?($|[ ]+)|\
((un)subscribe|(send|get)(me)?|gimme|retrieve|mail|ls|dir(ectory)?|\
list|show|search|[fe]?grep|find|maxfiles|version|help|info)\
([ ].*)?$)([ ]|$)*)+\
([^ a-z].*$(.*$(.*$(.*$(.*$)?)?)?)?)?^^
* 100^0 ^Subject:[ ]*(archive|(un)?subscribe)
* 1^0
{
:0 whc
| formail -rtzc -xTo: >tmp.from
#
# Store the whole mail in tmp.request, for later reference.
#
:0 wc
| formail -IIn-Reply-To: -ICc: >tmp.request
#
# Check for a missing Subject: line.
#
:0 wfh
* !^Subject:
| formail -a "Subject: "
INCLUDERC=$RC_LOCAL_REQUEST_10
###############################################################################
# Reader beware, the following four regular expressions are not for the faint #
# of heart. It'll suffice to say that they accomplish their intended job 98% #
# of the time. #
###############################################################################
#
# Is it an archive retrieval command?
#
:0 HB w
* 9876543210^0 ^^(.+$)*Subject:[ ]*(([(<]no(ne| subject\
( (\(file transmission|given))?)[>)])?\
$(.+$)*(^[ ]*)+)?(archives?:?([ ]|$)|\
((send|get)(me)?|gimme|retrieve|mail|ls|dir(ectory)?|list|show|\
search|[fe]?grep|find|maxfiles|version)([ ]+[^ ]*)?$)
* 1^0 B ?? ^^([ ]|$)*\
((archives?:?($|[ ]+)|\
((send|get)(me)?|gimme|retrieve|mail|ls|dir(ectory)?|\
list|show|search|[fe]?grep|find|maxfiles|version|help|info)\
([ ].*)?$)([ ]|$)*)+\
([^ a-z].*$(.*$(.*$(.*$(.*$)?)?)?)?)?^^
{
:0 W
* 9876543210^0 !restrict_archive ?? y
* 2^0 ? formail -rt -R To: "From " -X "From " | \
multigram -b1 -m -l$submit_threshold -L$domain \
-x$listaddr -x$listreq accept accept2
| arch_retrieve
:0 E fhw
| formail -A "X-Diagnostic: Not on the accept list"
}
#
# Is it an unsubscription request?
#
:0 EHB
* 9876543210^0 ^^(.+$)*Subject:[ ]*([(<]no(ne| subject\
( (\(file transmission|given))?)[>)])?(\
($(.+$)*(^[ ]*)+((.+|$)+[,.:;]([ ]+|$)+)?)?\
(Could you )?(please )?\
(sign( [^ ]+ |-)?off|cancel|leave|delete|remove|(un|de)-?sub)\>|\
($(.+$)*$(.*$)*)?(.*[^a-z])?\
((un-?|(un|de)-?sub?)s(cr|c|r)i|\
(leave|(delete|remove) .* from|(sign|take|get) .* off) .* [a-z-]*list\>))
* 1^0 B ?? ^^([ ]|$)*unsub(scribe)?([ ].*)?([ ]|$)*\
[^ a-z]?^^
{
#
# If confirmation required send a cookie
#
:0
* ! ^X-Diagnostic: Tried to confirm unsubscription
* confirm_unsubscribe ?? y
{
:0 W ${cc_requests:+c}:dist.lock
| confirm_del
:0 awfh
| formail -A "X-Diagnostic: Sent confirmation instructions"
}
:0 E fw:dist.lock
* ! confirm_unsubscribe ?? y
* auto_unsubscribe ?? y
| unsubscribe
:0 Aw ${cc_unsubrequests:+c}
| $SENDMAIL $sendmailOPT `cat tmp.from` ;
:0 Afhw
| formail -A "X-Diagnostic: Processed"
}
#
# Is it a subscription request?
#
:0 EHB
* 9876543210^0 ^^(.+$)*Subject:[ ]*([(<]no(ne| subject\
( (\(file transmission|given))?)[>)])?(\
($(.+$)*(^[ ]*)+((.+|$)+[,.:;]([ ]+|$)+)?)?\
(Could you )?(please )?\
(sign( [^ ]+ |-)?on|add|join|sub)\>|\
($(.+$)*$(.*$)*)?(.*[^a-z])?\
(sub?s(cr|c|r)i.*|(join|add .* to|(sign|put) .* on) .* [a-z-]*list\>))
* 1^0 B ?? ^^([ ]|$)*sub(scribe)?([ ].*)?([ ]|$)*\
[^ a-z]?^^
{
#
# Yes, well, then check if the person subscribing isn't on the reject
# list.
#
:0 HB wfh
* ? multigram -b1 -l$reject_threshold reject
| formail -A "X-Diagnostic: Found on the reject list" \
-A "X-Diagnostic: `multigram -b1 -l$reject_threshold reject`"
#
# If not, then let's see if he might already be on the
# mailinglist.
#
# We only check these if the message isn't a subscription confirmation.
# In this case the check have been made before.
#
:0 E
* ! subscraddr ?? @
{
:0 HB wfh
* ! require_confirm ?? y
* ! confirm_subscribe ?? y
* ? formail -IReceived: -IX-Envelope-To: -IIn-Reply-To: -ICc: | \
multigram -b1 -x$listreq -x$listaddr -l$reject_threshold dist
| formail -A "X-Diagnostic: Already on the subscriber list" \
-A "X-Diagnostic: `multigram -b1 -x$listreq -x$listaddr \
-l$reject_threshold dist`"
:0 A
{ dublette = yes }
:0 EHB wfh
* require_confirm ?? y
* confirm_subscribe ?? y
* ? formail -IReceived: -IX-Envelope-To: -IIn-Reply-To: -ICc: | \
extraddr check
| formail -A "X-Diagnostic: Already on the subscriber list" \
-A "X-Diagnostic: `extraddr check`"
:0 A
{ dublette = yes }
#
# If confirmation required send a cookie
#
:0 E
* require_confirm ?? y
* confirm_subscribe ?? y
{
# extract subscribe address
:0 wfh
| extraddr
:0 aH
* ^X-RFC822Conform: \/.+
{
# include regexp to check if email address conforms to rfc822
INCLUDERC=rc.rfc822
# check address format
:0
* $ MATCH ?? ^$addrspec__
{
:0
* confirm_maintainer ?? y
{
:0 W ${cc_requests:+c}:dist.lock
| confirm_add $MATCH sv
:0 awfh
| formail -A "X-Diagnostic: Sent maintainer instructions"
:0 Ewfh
| formail -A "X-Diagnostic: Tried to subscribe"
}
:0 E
{
:0 W ${cc_requests:+c}:dist.lock
| confirm_add $MATCH
:0 awfh
| formail -A "X-Diagnostic: Sent confirmation instructions"
:0 Ewfh
| formail -A "X-Diagnostic: Tried to subscribe"
}
}
:0 E
{
:0 hw ${cc_requests:+c}
|(formail -i"From: SmartList <$listreq>" -rtA"X-Loop: $listaddr" \
-i "Subject: Invalid address ($MATCH)"; \
cat confirm-error.txt 2>/dev/null ) | $SENDMAIL $sendmailOPT -t
:0
| formail -A "X-Diagnostic: Invalid subscribe address ($MATCH)" \
| $SENDMAIL $sendmailOPT $sendmailOPTp $maintainers
}
}
:0 Ewfh
| formail -A "X-Diagnostic: Extract script failed"
}
}
#
# If no confirmation required or already confirmed call
# the subscribe script
#
:0
* require_confirm ?? y
* ! dublette ?? y
* auto_subscribe ?? y
* $^X-Diagnostic: $\subscraddr tried to confirm subscription
{
:0 W ${cc_requests:+c}:dist.lock
| confirm_sub $subscraddr
:0 awfh
| formail -A "X-Diagnostic: Added to the subscriber list"
:0 Ewfh
| formail -A "X-Diagnostic: Tried to subscribe"
}
:0 E
* ! require_confirm ?? y
* ! dublette ?? y
* auto_subscribe ?? y
{
:0 W ${cc_requests:+c}:dist.lock
| subscribe
:0 awfh
| formail -A "X-Diagnostic: Added to the subscriber list"
:0 Ewfh
| formail -A "X-Diagnostic: Tried to subscribe"
}
}
#
# Is it an info or help request? Send back the help.txt and the
# optional info.txt file.
# We do the same on a complete empty mail (except for perhaps a signature).
#
:0 EHB
* 3^0 ^^(.+$)*Subject:[ ]*\
(([(<]no(ne| subject( (\(file transmission|given))?)[>)])?$\
(.+$)*(^[ ]*)+)?[a-z,. ]*(help|info(rmation)?)\>
* 1^0 ^^(.+$)*Subject:[ ]*\
([(<]no(ne| subject( (\(file transmission|given))?)[>)])?$
* -2^0 ^^(.+$)*(^[ ]*)+[a-z]
* 3^0 ^^(.+$)*^([ ]*$)*--
{
:0 hw ${cc_requests:+c}
| (formail -i"From: SmartList <$listreq>" -rtA"X-Loop: $listaddr"; \
cat help.txt info.txt 2>/dev/null ) | $SENDMAIL $sendmailOPT -t
:0 wfh
| formail -A "X-Diagnostic: help sent"
}
INCLUDERC=$RC_LOCAL_REQUEST_20
LOGABSTRACT=yes
#
# If auto_help is set, anything undecipherable gets back the help.txt and the
# optional info.txt file.
#
:0 EB
* auto_help ?? y
* $!X-Loop: $\listaddr
{
:0 hw ${cc_requests:+c}
| (formail -i"From: SmartList <$listreq>" -rtA"X-Loop: $listaddr"; \
cat help.txt info.txt 2>/dev/null ) | $SENDMAIL $sendmailOPT -t
:0 wfh
| formail -A "X-Diagnostic: undecipherable, help sent"
}
}
}
LOGABSTRACT=yes
#
# Could it be a bounce message from a daemon? Hand it down to procbounce
# which will evaluate it.
#
:0 wic
* $!^(Subject:(.*[^a-z])?Re:|\
X-(Loop: $\listaddr|Diagnostic:)|$X_COMMAND:)
* ^FROM_DAEMON
| sed -e $cutoff_bounce' q' >tmp.request
#
# Sink all messages we can recognise to be queue warnings or
# message-content specific errors
#
:0 Ah
* ^Subject: \
(Warning - delayed mail|\
(WARNING: message ([^ ]+ )?|Mail )delayed|\
Message status - opened|\
Delivery Notification: Delivery has been delayed|\
(Returned mail: )?\
(warning: c(an|ould )not send m(essage fo|ail afte)r|Unbalanced '"'|\
Cannot send (within [0-9]|8-bit data to 7-bit)|\
Data format error|Headers too large|Eight bit data not allowed|\
Message (size )?exceeds (fixed )?maximum (fixed|message) size)|\
Undeliverable (RFC822 )?mail: temporarily unable to deliver|\
\*\*\* WARNING - Undelivered mail in mailqueue|Execution succee?ded)
/dev/null
:0 Ah
* ^Subject: (Warning from|mail warning| ?Waiting mail)
* ^(From|Sender):.*(uucp|mmdf)
/dev/null
:0 AhBD
* $^(..?)?X-Loop: $\listaddr \(bounce\)
* ^(..?)?Subject: You have been removed from
/dev/null
#
# Enable special handling for DSNs
#
:0 A
* ^Content-Type:[ ]*multipart/report;[ ]*\/[^ ].*
* ^Mime-Version:.*1.*\..*0
* MATCH ?? report-type="?delivery-status"?
* B ?? ^Content-Type:.*message.*delivery-status
{
# If there were no fatal errors, drop it
:0 B
* ! ^Status:[ ]*5[ ]*\.
/dev/null
isadsn=yes
}
#
# Anything that still survived is most likely to be a bounce message.
#
:0 Ahfw
* ! ^X-Diagnostic:
| procbounce
#
# Or is it a remote X-Command from our maintainer?
#
:0 wf:dist.lock
* $^$X_COMMAND:.*($maintainer_re)[ ]*$X_COMMAND_PASSWORD
* $!^X-Loop: $\listaddr
| x_command
LOCKFILE # we don't need the lockfile anymore
#
# Anything not taken care of yet will be served to the maintainer of the list.
#
# To make it easier on him, we include a small hint about what might be the
# problem (by adding X-Diagnostic: fields to the header).
#
:0 wfh
* !< $size_limit
| formail -A "X-Diagnostic: Submission size exceeds $size_limit bytes"
:0 wfh
* ^FROM_DAEMON
| formail -A "X-Diagnostic: Mail coming from a daemon, ignored"
:0 HB wfh
* $^X-Loop: $\listaddr
| formail -A "X-Diagnostic: Possible loopback problem"
:0
* !^X-(Diagnostic|Processed):
{
:0 wfh
* $^$X_COMMAND:
| formail -A "X-Diagnostic: Suspicious $X_COMMAND format"
:0 HB wfh
* ? formail -IReceived: -IX-Envelope-To: -IIn-Reply-To: -ICc: | \
multigram -b1 -x$listreq -x$listaddr -l$reject_threshold dist
| formail -A "X-Diagnostic: Already on the subscriber list" \
-A "X-Diagnostic: `multigram -b1 -x$listreq -x$listaddr \
-l$reject_threshold dist`"
}
INCLUDERC=$RC_LOCAL_REQUEST_30
:0 wfh
* !^X-(Diagnostic|Processed):
| formail -A"X-Diagnostic: Unprocessed"
:0 wfh
| formail -A"X-Envelope-To: $X_ENVELOPE_TO"
#
# If this list does not have a maintainer e-mail address, drop things in
# the file request.
#
:0:
* !maintainer ?? .
request
fOPT = ${listmaster:+-f$listmaster}
:0 w
| formail -R"From X-From_:" -iDate: -iReturn-Receipt-To: -iRead-Receipt-To: \
-iAcknowledge-To: | \
$SENDMAIL $fOPT $sendmailOPTnorm $sendmailOPTp $maintainer
:0 wfh
| formail -A"X-Diagnostic: Maintainer $maintainer could not be reached"
HOST=continue_with_../.etc/rc.post
|