#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  acs/.forward acs/Intro acs/Intro-short acs/PING acs/POST
#   acs/REPLY acs/acs-vars acs/address acs/anon-ping acs/anon-post
#   acs/anon-reply acs/anonsig acs/check-alias acs/do-ping acs/do-post
#   acs/do-reply acs/doc acs/get-address acs/get-subject
#   acs/give-alias acs/index acs/junk acs/reject acs/signature
#   acs/stats acs/unspool acs/doc/Install acs/doc/README acs/junk/PING
#   acs/junk/POST acs/junk/REPLY
# Wrapped by root@wizvax on Tue May  7 06:49:12 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'acs/.forward' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/.forward'\"
else
echo shar: Extracting \"'acs/.forward'\" \(9 characters\)
sed "s/^X//" >'acs/.forward' <<'END_OF_FILE'
wi-admin
END_OF_FILE
if test 9 -ne `wc -c <'acs/.forward'`; then
    echo shar: \"'acs/.forward'\" unpacked with wrong size!
fi
# end of 'acs/.forward'
fi
if test -f 'acs/Intro' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/Intro'\"
else
echo shar: Extracting \"'acs/Intro'\" \(8157 characters\)
sed "s/^X//" >'acs/Intro' <<'END_OF_FILE'
Subject: Using the alt.sex.bondage Anonymous Contact Service 
Newsgroups: alt.sex.bondage
XFrom: wi-admin@wizvax.methuen.ma.us
Distribution: world
XFollowup-To: alt.sex.bondage
Organization: Anonymous Contact Service @ wizvax
Reply-To: wi-admin@wizvax.methuen.ma.us
X
INTRODUCTION TO THE ALT.SEX.BONDAGE ANONYMOUS POSTING AND CONTACT SERVICE
X
Last update: Apr. 19, 1991
X
Alt.sex.bondage is a newsgroup for posting sexually explicit messages. 
It is not moderated. In order to provide anonymity for those who wish it, an
automated anonymous contact service has been provided to allow
anonymous posting to alt.sex.bondage. This system consists of an
anonymous posting service and a double-blind e-mail forwarding service,
so that replies to anonymous posts will also be anonymous.
X
This is not another alt.personals! This is simply a method for those
wishing to post to ASB anonymously. This also provides a method
for people to communicate with each other anonymously, preferably
regarding ASB type subjects. Keep the personals in alt.personals.
X
There are essentially no restrictions on what can be posted via the
anonymous posting service, except that I'll cancel any articles that
are criminal in nature (offers to sell or buy drugs or sexual services,
soliciting sex with minors, stolen credit card numbers, etc.) I just
don't feel like getting busted for aiding and abetting this week.
X
NOTE: Throughout this article, I provide e-mail addresses in Internet
form - someone@wizvax.methuen.ma.us. If your mailer can't handle this type
of address, you can use uucp "bang-path" addresses:
X...!uunet!samsung!wizvax!someone. You'll have to figure out how to get
e-mail to uunet on your own, but it's reachable from most places in the
Solar System. Ask your local e-mail guru.
X
HOW TO POST AN ARTICLE ANONYMOUSLY
X
X** Send e-mail message to			To post to:
X** ----------------------------------------------------------
X** wi-post@wizvax.methuen.ma.us			        All the World
X
The Subject: line of this message will become the Subject: line of the
article. A new header will be created for the article, with From: and
Reply-To: lines of the form "wi-123@wizvax.methuen.ma.us". Nothing in the header
of the article will tell anything about who or where you are. If your
message has a signature in the standard form (beginning with a line
containing "--"), it will be deleted. There is no enforced limit to the
length of a message, however, abuse of this will be dealt with severely.
Please keep your message reasonable.
X
NOTE: The first time you send something to the ACS, be it a posting
or a reply to a posting, you are assigned an alias of the form
wi-[1-9999]@wizvax.methuen.ma.us. As long as your From: line contains the same
information when it gets here, anything you post or e-mail will appear
to come from this alias. If you send something that has a different line
in From:, you will be assigned a new alias. This includes mail sent from
the same person but happened to go through a different path to get to
wizvax.methuen.ma.us. Both aliases will work. This may be a bug or a feature,
depending on your point of view.
X
Suggestions For Anonymous Posting
X
X1) The Subject: line of your article, in addition to giving
some hint about why you posted it, should give information about the
geographic area you're in, or interested in hearing from people from.
X(Interesting syntax, there.) This allows people who aren't in that
area to bypass the article without wasting a lot of time. 
X
X2) Don't include phone numbers, street addresses, or e-mail addresses
in the body of the article. It sort of defeats the point of anonymous
posting, doesn't it? If your mailer automatically inserts such
information about you anywhere but in a properly formatted signature,
get it fixed.
X
X3) PLEASE don't post anonymous test messages to alt.sex.bondage just
to find out what your alias would be if you posted a "real" post.
Send a message to wi-ping (see below) instead.
X
These are suggestions. Not guidelines, not rules, not laws. You
can put anything you want in an article. It's your life.
X
REPLYING TO ANONYMOUS ARTICLES
X
Just reply to an anonymous article as you would to any other posting
or send e-mail to the alias listed in the From: line of the article.
The message will be e-mailed to the poster's alias at wizvax.methuen.ma.us.
When it gets here, the software will intercept the message, substitute
your e-mail address with an alias, replace the poster's alias with
their real e-mail address, and send it on with a completely rebuilt
header, no signature. There is no enforced limit to the length of
replies either, but abuses will be dealt with severely.  Please keep your
message reasonable
X
At this point, it's possible for any two people whose aliases are
registered in the database here to carry on an e-mail conversation
without ever knowing each other's e-mail address. Just send your
message to the alias at wizvax.methuen.ma.us, and the system will do the rest.
X
X
WHAT IF MY SITE DOESN'T CARRY ALT.SEX.BONDAGE
X
You can still post your article as outlined above and receive
anonymous replies, but you can't read anyone else's postings. I have
no intention of creating a mailing list or a server to provide the
articles to those who don't get alt.sex.bondage. If someone else wants
to set up such a system, they're welcome to.
X
PRIVACY AND SECURITY
X
I've done what I can to ensure that the identities of the users of
the Anonymous Contact Service will be kept private, but I can't make
any guarantees. I will not divulge the name of anyone using the service
without a court order, but there is always the possibility that someone
will successfully crack my system, or that someone will examine your
article before it gets here. Usenet is not totally private, and you
use this service at your own risk. 
X
One of the things that happens fairly frequently on the net is 
bounced e-mail. It could be unpleasant if this happened to a message
destined for the ACS. To make sure that you have a clean mail path,
you can send e-mail to "wi-ping@wizvax.methuen.ma.us". This is a mail echo
system. When your message gets here (if it gets here), the system
will grab your return address and send you an e-mail message containing
your alias in the ACS system and the header of your message as it
arrived here. If you don't get a reply with a Subject: line of
X"ACS ping reply", assume that either your message never got here,
or the reply went astray. In either case, you shouldn't try to use
the anonymous posting service. Try to find another e-mail path that
works first.
X
ADMINISTRIVIA
This is the same software running for alt.personals.
I have merely copied (with permission from Andy) and installed it
here. I make no claims to the integrity of same. He an I know there
are some small bugs and someday they might get fixed.
X
If you need to get in touch with a human being about problems with
the ACS system, send e-mail to "wi-admin@wizvax.methuen.ma.us". In particular,
if you need to have your alias removed from the database or your
e-mail address has changed, you need to send e-mail to wi-admin.
XEventually, these capabilities will be automated, once I figure out
to do it securely.
X
If, for some reason, you want to cancel an article you've posted,
the only way to do it (unless you're a superuser) is to send e-mail
to wi-admin@wizvax.methuen.ma.us and ask for it to be cancelled. This is
another item that may be automated someday.  In almost all cases
however, cancel requests cannot be honored.  Your article will probably
have gotten to hundreds of sites before I ever see your e-mail request.
X
There is no way for me to cancel e-mail you've sent to an alias, so
don't even bother asking.
X
X-- 
To correspond with the ACS administrator, send EMAIL to:
wi-admin@wizvax.methuen.ma.us            (non anonymous mail)
wi-0@wizvax.methuen.ma.us                (anonymous mail with no replies)
uunet!samsung!{wi-admin,wi-0}
X--
To use this service, send EMAIL to:
Anonymous posting:	wi-post@wizvax.methuen.ma.us
Anonymous reply:	<user's alias>@wizvax.methuen.ma.us
Test path/get alias:	wi-ping@wizvax.methuen.ma.us
ACS administrator:	wi-admin@wizvax.methuen.ma.us
END_OF_FILE
if test 8157 -ne `wc -c <'acs/Intro'`; then
    echo shar: \"'acs/Intro'\" unpacked with wrong size!
fi
# end of 'acs/Intro'
fi
if test -f 'acs/Intro-short' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/Intro-short'\"
else
echo shar: Extracting \"'acs/Intro-short'\" \(2513 characters\)
sed "s/^X//" >'acs/Intro-short' <<'END_OF_FILE'
Subject: Using the alt.sex.bondage Anonymous Contact Service - The short form
Newsgroups: alt.sex.bondage
XFrom: wi-admin@wizvax.methuen.ma.us
Distribution: world
XFollowup-To: alt.sex.bondage
Organization: Anonymous Contact Service @ wizvax
Reply-To: wi-admin@wizvax.methuen.ma.us
X
Last update: Apr. 19, 1991
X
This is not another alt.personals! This is simply a method for those
wishing to post to ASB anonymously. This also provides a method
for people to communicate with each other anonymously, preferably
regarding ASB type subjects. Keep the personals in alt.personals.
X
To post a NON-anonymous article to alt.sex.bondage:
X
X	Just post like you would to any other group.
X	alt.sex.bondage is not moderated.
X
To post an anonymous article to alt.sex.bondage:
X
X	E-MAIL your article to wi-post@wizvax.methuen.ma.us (World).
X
X	Article should be 30 lines or less (not counting the header).
X	Anything after a line beginning with  "--" is considered
X	signature and is removed.
X
To send e-mail to an anonymous poster or to anyone with an alias:
X
X	Just send e-mail to the alias as you would normally send e-mail.
X	The message should be 30 lines or less (not counting the header).
X	Anything after a line beginning with "--" is considered 
X	signature and removed.
X
To find out if you can get mail to and from wizvax.methuen.ma.us, or to find out
what your alias would be if you did post a message:
X
X	Send e-mail to "wi-ping@wizvax.methuen.ma.us".
X	Doesn't matter what's in the body of the message, no one
X	ever sees it.
X
To get help, make suggestions, complain, etc.:
X
X	Send e-mail to "wi-admin@wizvax.methuen.ma.us".
X
If your e-mail path contains any of the strings "MAILER", "mailer",
X"DAEMON", "daemon", "uucp", "POSTMASTER", "postmaster", "DELIVER",
X"news" or "root", anything you send to wi-post, wi-ping, or an alias
will be shoved in the bitbucket for recycling.  Send from an account
with some other username.
X
I would strongly suggest reading the "Long Form" version of the
Intro to the ACS before you try posting anonymously.
X
X-- 
To correspond with the ACS administrator, send EMAIL to:
wi-admin@wizvax.methuen.ma.us            (non anonymous mail)
wi-0@wizvax.methuen.ma.us                (anonymous mail with no replies)
uunet!samsung!{wi-admin,ap-0}
X--
To use this service, send EMAIL to:
Anonymous posting:      wi-post@wizvax.methuen.ma.us
Anonymous reply:        <user's alias>@wizvax.methuen.ma.us
Test path/get alias:    wi-ping@wizvax.methuen.ma.us
ACS administrator:      wi-admin@wizvax.methuen.ma.us
END_OF_FILE
if test 2513 -ne `wc -c <'acs/Intro-short'`; then
    echo shar: \"'acs/Intro-short'\" unpacked with wrong size!
fi
# end of 'acs/Intro-short'
fi
if test ! -d 'acs/PING' ; then
    echo shar: Creating directory \"'acs/PING'\"
    mkdir 'acs/PING'
fi
if test ! -d 'acs/POST' ; then
    echo shar: Creating directory \"'acs/POST'\"
    mkdir 'acs/POST'
fi
if test ! -d 'acs/REPLY' ; then
    echo shar: Creating directory \"'acs/REPLY'\"
    mkdir 'acs/REPLY'
fi
if test -f 'acs/acs-vars' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/acs-vars'\"
else
echo shar: Extracting \"'acs/acs-vars'\" \(1916 characters\)
sed "s/^X//" >'acs/acs-vars' <<'END_OF_FILE'
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
X## ACS variables
X
X# Version of the software
set version = "2.0"
X
X# Directory where all the programs, libraries and databases are
set acsdir = ~acs
X
X# Where all the spool directories are
set pingdir = ${acsdir}/PING
set postdir = ${acsdir}/POST
set replydir = ${acsdir}/REPLY
X
X# Where the databases and files are
set aliasdb = ${acsdir}/aliases
set indexfile = ${acsdir}/index
set signature = ${acsdir}/signature
X
X# List of usernames to reject
set reject = ${acsdir}/reject
X
X# List of administrative users
set adminuser = wi-admin
set pinguser = wi-ping
X
X# Where your sendmail alias file is
set mail_aliases = /usr/lib/aliases
X
X# The name of the machine the ACS software will run on
set server = wizvax.methuen.ma.us
X
X# Distribution of anonymous posts
set distribution = world
X
X# Newsgroup(s) to post to
set newsgroups = alt.sex.bondage
X
X# What the Organization: field should have
set organization = "Anonymous Contact Service @ wizvax"
X
X# Prefix to assign all aliases
set prefix = wi
X
X
X## Shell and environment variables
setenv NAME "Anonymous Contact Service"
set path = ( /{bin,etc} /usr/{bin,etc,ucb} /usr/local/{bin,etc} ${acsdir} )
umask 077
X
set quit = no
X
X# Grr..
set quote = "'"
set dquote = '"'
set bquote = '`'
set bang = '\!'
set dollar = '$'
X
X# Aliases
alias sendmail /usr/lib/sendmail -odq -oem
END_OF_FILE
if test 1916 -ne `wc -c <'acs/acs-vars'`; then
    echo shar: \"'acs/acs-vars'\" unpacked with wrong size!
fi
# end of 'acs/acs-vars'
fi
if test -f 'acs/address' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/address'\"
else
echo shar: Extracting \"'acs/address'\" \(36 characters\)
sed "s/^X//" >'acs/address' <<'END_OF_FILE'
samsung!eniac.seas.upenn.edu!awhite
END_OF_FILE
if test 36 -ne `wc -c <'acs/address'`; then
    echo shar: \"'acs/address'\" unpacked with wrong size!
fi
# end of 'acs/address'
fi
if test -f 'acs/anon-ping' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/anon-ping'\"
else
echo shar: Extracting \"'acs/anon-ping'\" \(775 characters\)
sed "s/^X//" >'acs/anon-ping' <<'END_OF_FILE'
X#!/bin/csh -f
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
umask 077
X
set pingdir = ~acs/PING
set file = $$
X
again:
if ( -f ${pingdir}/${file} ) then
X  @ file++
X  goto again
endif
X
X/bin/cat > ${pingdir}/${file}
END_OF_FILE
if test 775 -ne `wc -c <'acs/anon-ping'`; then
    echo shar: \"'acs/anon-ping'\" unpacked with wrong size!
fi
chmod +x 'acs/anon-ping'
# end of 'acs/anon-ping'
fi
if test -f 'acs/anon-post' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/anon-post'\"
else
echo shar: Extracting \"'acs/anon-post'\" \(775 characters\)
sed "s/^X//" >'acs/anon-post' <<'END_OF_FILE'
X#!/bin/csh -f
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
umask 077
X
set postdir = ~acs/POST
set file = $$
X
again:
if ( -f ${postdir}/${file} ) then
X  @ file++
X  goto again
endif
X
X/bin/cat > ${postdir}/${file}
END_OF_FILE
if test 775 -ne `wc -c <'acs/anon-post'`; then
    echo shar: \"'acs/anon-post'\" unpacked with wrong size!
fi
chmod +x 'acs/anon-post'
# end of 'acs/anon-post'
fi
if test -f 'acs/anon-reply' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/anon-reply'\"
else
echo shar: Extracting \"'acs/anon-reply'\" \(788 characters\)
sed "s/^X//" >'acs/anon-reply' <<'END_OF_FILE'
X#!/bin/csh -f
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
umask 077
X
set replydir = ~acs/REPLY
set file = $argv[1].$$
X
again:
if ( -f ${replydir}/${file} ) then
X  @ file++
X  goto again
endif
X
X/bin/cat > ${replydir}/${file}
END_OF_FILE
if test 788 -ne `wc -c <'acs/anon-reply'`; then
    echo shar: \"'acs/anon-reply'\" unpacked with wrong size!
fi
chmod +x 'acs/anon-reply'
# end of 'acs/anon-reply'
fi
if test -f 'acs/anonsig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/anonsig'\"
else
echo shar: Extracting \"'acs/anonsig'\" \(305 characters\)
sed "s/^X//" >'acs/anonsig' <<'END_OF_FILE'
X
X-- 
To use this service, send EMAIL to:
Anonymous posting:	wi-post@wizvax.methuen.ma.us        (yes, a dash)
Anonymous reply:	<user's alias>@wizvax.methuen.ma.us
Test path/get alias:	wi-ping@wizvax.methuen.ma.us         (yes, a dash)
ACS administrator:	wi-admin@wizvax.methuen.ma.us        (yes, a dash)
END_OF_FILE
if test 305 -ne `wc -c <'acs/anonsig'`; then
    echo shar: \"'acs/anonsig'\" unpacked with wrong size!
fi
# end of 'acs/anonsig'
fi
if test -f 'acs/check-alias' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/check-alias'\"
else
echo shar: Extracting \"'acs/check-alias'\" \(1142 characters\)
sed "s/^X//" >'acs/check-alias' <<'END_OF_FILE'
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
X## Create database if necessary
if ! ( -f ${aliasdb} ) then
X  cp /dev/null ${aliasdb}
X  echo "Created empty database ${aliasdb}"
endif
X
X
X## Search for users alias in database
set tuple = `grep ":${address}${dollar}" ${aliasdb}`
if ( ${#tuple} != 0 ) then
X  echo "User at ${address} has an alias"
X
X  set alias = `echo "${tuple}" | cut -d':' -f1`
X  set reply = `echo "${tuple}" | cut -d':' -f2-`
X
X  echo "  alias is ${alias}"
X  echo "  reply address is ${reply}"
X
X  exit 1
endif
X
echo "User at ${address} does not have an alias"
exit 0
END_OF_FILE
if test 1142 -ne `wc -c <'acs/check-alias'`; then
    echo shar: \"'acs/check-alias'\" unpacked with wrong size!
fi
chmod +x 'acs/check-alias'
# end of 'acs/check-alias'
fi
if test -f 'acs/do-ping' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/do-ping'\"
else
echo shar: Extracting \"'acs/do-ping'\" \(1513 characters\)
sed "s/^X//" >'acs/do-ping' <<'END_OF_FILE'
X#!/bin/csh -f
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
source ~acs/acs-vars
cd ${acsdir}
X
set file = $argv[1]
X
source get-address
if ( ${quit} == "yes" ) then
X  goto done
endif
X
X# Check if user has an alias
source check-alias
X
if ( ${status} == 0 ) then
X  # User does not have an alias
X  source give-alias
X
X  # Clean up
X  rm -f ${file}
X  exit 0
endif
X
X# Use already has an alias, prepare message
cat >! /tmp/ping-mess.$$ << EOF
XFrom: ${pinguser}@${server}
Subject: ACS ping reply
To: ${address}
Reply-To: ${adminuser}@${server}
XX-ACS2-Version: ${version}
X
Your ping request has been received by ${pinguser}@${server}
X
You already have an alias.
X
Your alias is ${alias}@${server}
Your reply address is ${reply}
XEOF
X
X# Append signature and mail file
cat ${signature} >> /tmp/ping-mess.$$
cat /tmp/ping-mess.$$ | sendmail -f ${adminuser}@${server} ${address}
X
echo "Mail sent to ${address}"
X
X# Clean up
done:
rm -f /tmp/ping-mess.$$ ${file}
exit 1
END_OF_FILE
if test 1513 -ne `wc -c <'acs/do-ping'`; then
    echo shar: \"'acs/do-ping'\" unpacked with wrong size!
fi
chmod +x 'acs/do-ping'
# end of 'acs/do-ping'
fi
if test -f 'acs/do-post' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/do-post'\"
else
echo shar: Extracting \"'acs/do-post'\" \(1659 characters\)
sed "s/^X//" >'acs/do-post' <<'END_OF_FILE'
X#!/bin/csh -f
X
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
source ~acs/acs-vars
cd ${acsdir}
X
set file = $argv[1]
X
source get-address
if ( ${quit} == "yes" ) then
X  goto done
endif
X
X# Check if user has an alias
source check-alias
X
if ( ${status} == 0 ) then
X  # User does not have an alias
X  source give-alias
endif
X
X
X## Save subject of message
source get-subject
X
X
X## Extract body of message, excluding any signature
X# First see if there's a signature
X# We probably shouldn't edit the file in place..
grep -s '^--' ${file}
if ( ${status} == 0 ) then
X  # There is, strip it
X  ed ${file} << EOF
X/^\-\-/
X.,\$d
w
q
XEOF
endif
X
X# Now strip original header and add one for inews
X# Also add anonymous signature
ed ${file} << EOF
X1,/^\$/d
i
Path: ${alias}
XFrom: ${alias}@${server}
Newsgroups: ${newsgroups}
Subject: ${subject}
Distribution: ${distribution}
Reply-To: ${alias}@${server}
XFollowup-To: alt.sex.bondage
Organization: ${organization}
XX-ACS2-Version: ${version}
X
X.
X\$
r anonsig
w
q
XEOF
X
X
X## Feed message to /usr/lib/news/inews
cat ${file} | /usr/lib/news/inews -h
X
done:
rm -f ${file}
exit 0
END_OF_FILE
if test 1659 -ne `wc -c <'acs/do-post'`; then
    echo shar: \"'acs/do-post'\" unpacked with wrong size!
fi
chmod +x 'acs/do-post'
# end of 'acs/do-post'
fi
if test -f 'acs/do-reply' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/do-reply'\"
else
echo shar: Extracting \"'acs/do-reply'\" \(2458 characters\)
sed "s/^X//" >'acs/do-reply' <<'END_OF_FILE'
X#!/bin/csh -f
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
source ~acs/acs-vars
cd ${acsdir}
X
set file = $argv[1]
X
source get-address
if ( ${quit} == "yes" ) then
X  goto done
endif
X
X# Check if user has an alias
source check-alias
X
if ( ${status} == 0 ) then
X  # User does not have an alias
X  source give-alias
endif
X
X
X## Save subject of message
source get-subject
X
X
X## Save alias mail is being sent to
set to = "`echo ${file:t} | cut -d'.' -f1-2`"
echo "Message is being sent to alias ${to}"
X
X# See if recipient alias really exists
grep -s "^${to}:" ${aliasdb}
if ( ${status} != 0 ) then
X  # No alias exists, bounce to sender
X  cat >! /tmp/anon-mess.$$ << EOF
Subject: ACS reply (Re: ${subject})
To: ${address}
Reply-To: ${adminuser}@${server}
XX-ACS2-Version: ${version}
X
Your mail has been receieved by ${to}@${server}
X
There is no such alias as ${to}.
X
Your message could not be fowarded and
has been removed from the ACS system.
XEOF
X  cat ${signature} >> /tmp/anon-mess.$$
X  cat /tmp/anon-mess.$$ | sendmail ${address}
X
X  echo "Bounced mail to ${address}, no alias ${to}"
X
X  rm -f /tmp/anon-mess.$$ ${file}
X
X  exit 1
endif
X
X## Alias exists, get real address
set real = `grep "^${to}:" ${aliasdb} | cut -d':' -f2-`
X
X
X## Extract body of message, excluding any signature
X# First see if there's a signature
X# We probably shouldn't edit the file in place..
cp ${file} /tmp/wi.reply
grep -s '^--' /tmp/wi.reply
if ( ${status} == 0 ) then
X  # There is, strip it
X  ed /tmp/wi.reply << EOF
X/^\-\-/
X.,\$d
w
q
XEOF
endif
X
X# Now fix header, leaving old Subject: line
ed /tmp/wi.reply << EOF
X1,/^\$/d
i
XFrom: ${alias}@${server}
Subject: ${subject}
Reply-To: ${alias}@${server}
XX-To-ACS-Alias: ${to}
X
X
X.
w
q
XEOF
X
X
X## Mail stripped message to recipient
cat /tmp/wi.reply | sendmail -f ${alias}@${server} ${real}
echo "Sent reply mail to ${to} (${real})"
X
X# Clean up
done:
rm -f ${file} /tmp/wi.reply
exit 0
END_OF_FILE
if test 2458 -ne `wc -c <'acs/do-reply'`; then
    echo shar: \"'acs/do-reply'\" unpacked with wrong size!
fi
chmod +x 'acs/do-reply'
# end of 'acs/do-reply'
fi
if test ! -d 'acs/doc' ; then
    echo shar: Creating directory \"'acs/doc'\"
    mkdir 'acs/doc'
fi
if test -f 'acs/get-address' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/get-address'\"
else
echo shar: Extracting \"'acs/get-address'\" \(1216 characters\)
sed "s/^X//" >'acs/get-address' <<'END_OF_FILE'
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
X## Get real address message was sent from
grep '^From: ' ${file} | grep -s '<'
if ( ${status} == 0 ) then
X  # From: has angle brackets, real address is in there
X  grep '^From: ' ${file} | cut -d'<' -f2 | cut -d'>' -f1 >! address
else
X  # No angle brackets, should be "address (Real Name)" or just "address"
X  # Either case we just keep what's before the first space
X  grep '^From: ' ${file} | sed 's/From: //g' | cut -d' ' -f1 >! address
endif
X
fgrep -s -f ${reject} address
if ( ${status} == 0 ) then
X  set quit = yes
X  exit 0
endif
X
echo "Message is from `head -1 address`"
set address = `head -1 address`
END_OF_FILE
if test 1216 -ne `wc -c <'acs/get-address'`; then
    echo shar: \"'acs/get-address'\" unpacked with wrong size!
fi
chmod +x 'acs/get-address'
# end of 'acs/get-address'
fi
if test -f 'acs/get-subject' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/get-subject'\"
else
echo shar: Extracting \"'acs/get-subject'\" \(832 characters\)
sed "s/^X//" >'acs/get-subject' <<'END_OF_FILE'
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
X## Save subject of message
grep '^Subject: ' ${file} | head -1 | sed 's/`//g' | cut -d':' -f2- >! /tmp/subject.$$
X
echo "Subject is `head -1 /tmp/subject.$$`"
set subject = "`head -1 /tmp/subject.$$`"
X
rm -f /tmp/subject.$$
END_OF_FILE
if test 832 -ne `wc -c <'acs/get-subject'`; then
    echo shar: \"'acs/get-subject'\" unpacked with wrong size!
fi
chmod +x 'acs/get-subject'
# end of 'acs/get-subject'
fi
if test -f 'acs/give-alias' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/give-alias'\"
else
echo shar: Extracting \"'acs/give-alias'\" \(1786 characters\)
sed "s/^X//" >'acs/give-alias' <<'END_OF_FILE'
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
X## Get current index
if ! ( -f ${indexfile} ) then
X  echo 0 >! ${indexfile}
X  echo "Index file ${indexfile} created with index 0"
endif
X
set index = "`cat ${indexfile}`"
X@ index++
X
X# Set new alias
set alias = ${prefix}.${index}
X
X# Add line to ACS alias file
echo "${alias}:${address}" >> ${aliasdb}
X
echo "New alias is ${alias}"
echo "Reply address is ${address}"
X
X# Add line to sendmail aliases file
X#echo "${alias}: ${dquote}|${acsdir}/anon-reply ${prefix}.${index}${dquote}" >> ${mail_aliases}
X
X# Sendmail is configured to rebuild aliases automagically,
X# so don't bother rebuilding
X#newaliases
X
X# Update index file
echo ${index} >! ${indexfile}
X
X
X## Tell user hir new alias
cat >! /tmp/ping-mess.$$ << EOF
XFrom: ${adminuser}@${server}
Subject: New ACS alias
To: ${address}
Reply-To: ${adminuser}@${server}
XX-ACS2-Version: ${version}
X
Your message request has been received by the 
Anonymous Contact Service @ wizvax.
You have been given an alias.
X
Your alias will be ${alias}@${server}
Your reply address will be ${address}
XEOF
cat ${signature} >> /tmp/ping-mess.$$
cat /tmp/ping-mess.$$ | sendmail ${address}
X
echo "Mail sent to ${address}"
X
rm -f /tmp/ping-mess.$$
exit 0
END_OF_FILE
if test 1786 -ne `wc -c <'acs/give-alias'`; then
    echo shar: \"'acs/give-alias'\" unpacked with wrong size!
fi
chmod +x 'acs/give-alias'
# end of 'acs/give-alias'
fi
if test -f 'acs/index' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/index'\"
else
echo shar: Extracting \"'acs/index'\" \(4 characters\)
sed "s/^X//" >'acs/index' <<'END_OF_FILE'
X234
END_OF_FILE
if test 4 -ne `wc -c <'acs/index'`; then
    echo shar: \"'acs/index'\" unpacked with wrong size!
fi
# end of 'acs/index'
fi
if test ! -d 'acs/junk' ; then
    echo shar: Creating directory \"'acs/junk'\"
    mkdir 'acs/junk'
fi
if test -f 'acs/reject' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/reject'\"
else
echo shar: Extracting \"'acs/reject'\" \(170 characters\)
sed "s/^X//" >'acs/reject' <<'END_OF_FILE'
MAILER
Mailer
mailer
DAEMON
Daemon
daemon
uucp
POSTMASTER
postmaster
DELIVER
news
root
wi-admin
wi.admin
wi-post
wi.post
XFrom
X.wi-[0-9]
X.wi\.[0-9]
nash@ug.cs.dal.ca
X"The
END_OF_FILE
if test 170 -ne `wc -c <'acs/reject'`; then
    echo shar: \"'acs/reject'\" unpacked with wrong size!
fi
chmod +x 'acs/reject'
# end of 'acs/reject'
fi
if test -f 'acs/signature' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/signature'\"
else
echo shar: Extracting \"'acs/signature'\" \(162 characters\)
sed "s/^X//" >'acs/signature' <<'END_OF_FILE'
X
X-- 
wi-admin@wizvax.methuen.ma.us     (non anonymous mail)
wi-0@wizvax.methuen.ma.us         (anonymous mail, no replies)
uunet!samsung!wizvax!{wi-admin,wi-0}
X.
END_OF_FILE
if test 162 -ne `wc -c <'acs/signature'`; then
    echo shar: \"'acs/signature'\" unpacked with wrong size!
fi
# end of 'acs/signature'
fi
if test ! -d 'acs/stats' ; then
    echo shar: Creating directory \"'acs/stats'\"
    mkdir 'acs/stats'
fi
if test -f 'acs/unspool' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/unspool'\"
else
echo shar: Extracting \"'acs/unspool'\" \(2937 characters\)
sed "s/^X//" >'acs/unspool' <<'END_OF_FILE'
X#!/bin/csh -f
X
X# Copyright (c) 1991, Andrew Rosen.
X# All rights reserved.
X#
X# This  software is supplied free of charge.  This software, or any part
X# of it,  may  not  be  redistributed or otherwise made available to, or
X# used  by,  any  other  person  without the inclusion of this copyright
X# notice.  This software may not be used to make a profit in any way.
X#
X# This  software  is provided with absolutely no warranty, to the extent
X# permitted  by  applicable  state law.  In no event, unless required by
X# applicable law,  will the author(s) of this software be liable for any
X# damages caused by this software.
X
X
source ~acs/acs-vars
X
set noclobber
X
X
X## Do pings first
X(glob ${pingdir}/*) >& /dev/null
if ( ${status} == 0 ) then
X  # Check lock file
X  (echo "$$" > ${acsdir}/LCK..ping) >& /dev/null
X
X  if ( ${status} != 1 ) then
X    # Process each ping message
X    foreach ping ( ${pingdir}/* )
X      echo "Doing ${ping}"
X      echo -n "Processing ${ping} " >> ${acsdir}/stats/ping
X      do-ping ${ping}
X
X      # If file is still there, do-ping crashed
X      if ( -f ${ping} ) then
X        echo "Problem with ${ping}" | Mail -s "ACS ping problem" acs
X        mv ${ping} ${acsdir}/junk/PING
X      endif
X
X      echo ""
X      echo "done" >> ${acsdir}/stats/ping
X    end
X
X    # Remove lock file
X    rm -f ${acsdir}/LCK..ping address
X  else
X    echo -n "Pings are locked by process "
X    cat ${acsdir}/LCK..ping
X  endif
endif
X
X
X## Do replies next
X(glob ${replydir}/*) >& /dev/null
if ( ${status} == 0 ) then
X  # Check lock file
X  (echo "$$" > ${acsdir}/LCK..reply) >& /dev/null
X
X  if ( ${status} != 1 ) then
X    # Process each reply message
X    foreach reply ( ${replydir}/* )
X      echo "Doing ${reply}"
X      echo -n "Processing ${reply} " >> ${acsdir}/stats/reply
X      do-reply ${reply}
X
X      # If file is still there, do-reply crashed
X      if ( -f ${reply} ) then
X        echo "Problem with ${reply}" | Mail -s "ACS reply problem" acs
X        mv ${reply} ${acsdir}/junk/REPLY
X      endif
X
X      echo ""
X      echo "done" >> ${acsdir}/stats/reply
X    end
X
X    # Remove lock file
X    rm -f ${acsdir}/LCK..reply address
X  else
X    echo -n "Replies locked by process "
X    cat ${acsdir}/LCK..reply
X  endif
endif
X
X
X## Do posts last
X(glob ${postdir}/*) >& /dev/null
if ( ${status} == 0 ) then
X  # Check lock file
X  (echo "$$" > ${acsdir}/LCK..post) >& /dev/null
X
X  if ( ${status} != 1 ) then
X    # Process each post message
X    foreach post ( ${postdir}/* )
X      echo "Doing ${post}"
X      echo -n "Processing ${post} " >> ${acsdir}/stats/post
X      do-post ${post}
X
X      if ( -f ${post} ) then
X        echo "Problem with ${post}" | Mail -s "ACS post problem" acs
X        mv ${post} ${acsdir}/junk/POST
X      endif
X
X      echo ""
X      echo "done" >> ${acsdir}/stats/post
X    end
X
X    # Remove lock file
X    rm -f ${acsdir}/LCK..post address
X  else
X    echo -n "Posts locked by process "
X    cat ${acsdir}/LCK..post
X  endif
endif
END_OF_FILE
if test 2937 -ne `wc -c <'acs/unspool'`; then
    echo shar: \"'acs/unspool'\" unpacked with wrong size!
fi
chmod +x 'acs/unspool'
# end of 'acs/unspool'
fi
if test -f 'acs/doc/Install' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/doc/Install'\"
else
echo shar: Extracting \"'acs/doc/Install'\" \(2838 characters\)
sed "s/^X//" >'acs/doc/Install' <<'END_OF_FILE'
Installation steps:
X
X
X1  - Install ggrep (GNU e?grep)
X
X
X2  - Create a new user 'acs', with a unique uid, group id of mail and a home
directory of where you installed the software:
X
acs:*:71:6:Anonymous Contact Service:/usr/local/lib/acs:/bin/tcsh
X
X
X3  - Edit the following files to reflect your site:
X
X	Intro
X	Intro.short
X	acs-vars
X	reject
X	signature
X
X
X4  - Create the following directories in ~acs and make them owned by acs,
group owned by mail and mode 750:
X
X	PING
X	POST
X	REPLY
X
X4  - If you DON'T want the ACS software to use sendmail aliases, add the
following lines to your sendmail configuration file and skip to item 6:
X
X# hack for ACS mail
Rap.$-                  $#acs$:ap.$1
Macs,   P=/usr/local/lib/acs/anon-reply, F=nlF, S=11, R=12, A=anon-reply $u
X
X
X5a - If you DO want the ACS software to use sendmail aliases, edit give-alias
and uncomment line 34.
X
X
X5b - If you completed item 5b, and you want the ACS software to rebuild the
DBM version of the sendmail alias database every time it creates a new ACS
alias, also uncomment line 38 in give-alias.  Note:  if your sendmail does
not have option D defined (rebuild aliases automatically if changed), you
must uncomment this line.
X
X
X6  - Add the following lines to your sendmail aliases file:
X
X## Aliases for the ACS software
ap-admin:       rosen
ap-ping:        "|/usr/local/lib/acs/anon-ping"
ap-post:        "|/usr/local/lib/acs/anon-post"
X
X
X7  - Add the appropriate lines to your crontab file:
X
X20 20 15 *  *   /usr/lib/news/inews -h < /usr/local/lib/acs/Intro
X40 20  * *  6   /usr/lib/news/inews -h < /usr/local/lib/acs/Intro-short
X0,15,30,45  *  *  *  *  /usr/local/lib/acs/unspool
X
The first line posts the long form of the introduction to alt.personals
once a month.  The second line posts the short form to alt.personals once
a week.  The last line processes the spool directories every 15 minutes.
X
X
X8a - If you want the software to count how many pings, posts and replies
it processes, add lines to crontab to rotate the files in ~acs/stats.
X
X
X8b - If you DON'T want the software to count how many pings, posts and
replies it processes, edit unspool and remove or comment the lines that
do 'echo something >> stats/file'.
X
X
X9  - If your cron mails you all stdout and stderr from commands run
by cron, change crontab to run 'unspoool >& /dev/null'.  There's too
many echo commands to get rid of them.  This also allows you to run
unspool by hand and see what it's doing.
X
X
X10 - Advertise your service by posting the long form of the intro.
X
X
X11 - Say goodbye to your CPU.
X
X
X--
Andy Rosen                | rosen@samsung.com       | "I got this guitar
Samsung Software America  | ...!uunet!samsung!rosen |  and I learned how
One Corporate Drive       | (508) 685-7200          |  to make it talk"
Andover, MA 01810         |                         |    -Thunder Road
END_OF_FILE
if test 2838 -ne `wc -c <'acs/doc/Install'`; then
    echo shar: \"'acs/doc/Install'\" unpacked with wrong size!
fi
# end of 'acs/doc/Install'
fi
if test -f 'acs/doc/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'acs/doc/README'\"
else
echo shar: Extracting \"'acs/doc/README'\" \(339 characters\)
sed "s/^X//" >'acs/doc/README' <<'END_OF_FILE'
X10 REM Read the Install file first
X20 GOSUB Install
X
It's a good idea to keep an eye on the ACS alias file (~acs/aliases).  I still
occasionally get bad aliases in there.
X
If you're going to be supplying the service via Usenet, change the prefix in
acs-vars.  There was a lot of confusion when alembic and slug were using the
same prefix.
END_OF_FILE
if test 339 -ne `wc -c <'acs/doc/README'`; then
    echo shar: \"'acs/doc/README'\" unpacked with wrong size!
fi
# end of 'acs/doc/README'
fi
if test ! -d 'acs/junk/PING' ; then
    echo shar: Creating directory \"'acs/junk/PING'\"
    mkdir 'acs/junk/PING'
fi
if test ! -d 'acs/junk/POST' ; then
    echo shar: Creating directory \"'acs/junk/POST'\"
    mkdir 'acs/junk/POST'
fi
if test ! -d 'acs/junk/REPLY' ; then
    echo shar: Creating directory \"'acs/junk/REPLY'\"
    mkdir 'acs/junk/REPLY'
fi
echo shar: End of shell archive.
exit 0
