File: subscreen

package info (click to toggle)
smartlist 3.15-28
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,308 kB
  • sloc: ansic: 9,238; sh: 4,901; makefile: 118
file content (21 lines) | stat: -rwxr-xr-x 625 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#$Id: subscreen,v 1.2 1994/08/18 13:44:37 berg Exp $

# $1 contains the mail address of the prospective subscriber
# We return zero if subscription is allowed, and one if not.

case "$1" in
  *@hostile.our.local.domain)	exit 1 ;;	# Not this one
  *@*our.local.domain)		exit 0 ;;	# This one is ok
  *@some.other.domain)		exit 0 ;;	# Ditto
esac

exit 1		# reject everything else

# Instead of ending with 'exit 1', you could also use something
# like:

echo "From $1" | multigram -l24576 -b1 allowsub >/dev/null

# This will reject any mail address is not remotely like any of the
# addresses mentioned in 'allowsub'