home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
11413
/
adcomplain
Wrap
Text File
|
1994-11-01
|
3KB
|
96 lines
#!/bin/csh
## adcomplain V2.0 13-Oct-94
## Bill McFadden
## Composes and mails a complaint about inappropriate commercial use of
## Usenet.
## This was written in the belief that a single, concise message to the
## offending poster is the most appropriate way to complain. A message to
## his or her postmaster may also be warranted if the originating site
## prohibits such postings. Mail bombing (e-mailing megabytes of useless
## data) and public flaming (replying on Usenet, causing your complaint to be
## duplicated on every machine in the network) are discouraged.
## Arguments:
## $1 subject
## $2 newsgroup
## $3 poster
## For rn, trn, and strn users, the following macros in your .rnmac file will
## run this script when the 'a' (or 'A') key is pressed:
##
## a %(%m=[pa]?|adcomplain '%s ' %C %t\n:a)
## A %(%m=[pa]?|adcomplain "%s " %C %t\n:A)
##
## Note: The first macro breaks if subject line contains the ' character. If
## this occurs, use the second macro.
set dest = /tmp/$user-$$
echo "I object to the posting of commercial advertisements to $2." >$dest
echo "My site must pay to receive, store, and transmit your" >>$dest
echo "message." >>$dest
echo -n "Is $1relevant to $2? [yn] "
set ans = "`head -1 </dev/tty`"
if ($ans == n) echo "In addition, $1has nothing to do with $2." >>$dest
echo "" >>$dest
echo "The biz.* newsgroup hierarchy is the appropriate place for" >>$dest
echo "commercial postings." >>$dest
echo "For more information about Usenet etiquette, see" >>$dest
echo "news.announce.newusers. Thanks." >>$dest
echo "" >>$dest
## reformat message text
fmt -78 $dest >$dest-1
rm $dest
mv $dest-1 $dest
## determine postmaster's email address
cat >$dest-1
set postmaster = `echo $3 | sed 's/.*\(@.*\)/\1/'`
set postmaster = postmaster$postmaster
echo -n "Mail a copy to $postmaster? [ny] "
set ans = "`head -1 </dev/tty`"
if ($ans == y) then
echo "--------forwarded message--------" >>$dest
cat $dest-1 >>$dest
echo "-----end of forwarded message-----" >>$dest
echo "" >>$dest
endif
rm $dest-1
## Remove the following section if your mailer automatically adds your
## signature
if (-e $HOME/.signature) then
echo "--" >>$dest
cat $HOME/.signature >>$dest
endif
## print copy of message on user's terminal
echo "" >>$dest-1
echo "To: $3" >>$dest-1
if ($ans == y) echo "cc: $postmaster" >>$dest-1
echo "Subject: $1" >>$dest-1
echo "" >>$dest-1
cat $dest >>$dest-1
echo "" >>$dest-1
more <$dest-1
rm $dest-1
if ($ans == y) echo "~c $postmaster" >>$dest
echo -n "Send it? [ny] "
set ans = "`head -1 </dev/tty`"
if ($ans == y) then
mail -s "$1" $3 <$dest
echo "done"
else
echo "aborted"
endif
echo ""
rm $dest