home *** CD-ROM | disk | FTP | other *** search
- /*
- Program : SayNo.rexx
- Purpose : If you receive spam, send them a message back it got automatically
- deleted and never viewed. Also lets them know any and all further
- spam will receive the same treatment. Hopefully that will cause
- them to remove you from their lists. Should work with most Amiga
- mailers. If the allow you to save a complete mail via Arexx, even
- better. If not, you'll have to save manually and run this script.
- It first inserts a default message (example included), then inserts
- the original spam adding a '> ' quote before all lines in there.
- After which it'll prompt you with a requester to insert an address
- where to sent this reply.
- Author : paul@iaehv.nl
- Version : 1.0 15 November 1997. This program is FreeWare and may be used
- by private persons. It may NOT be bundled with any shareware or
- commercial package without my prior written approval.
- Copyright: 1997 by Paul Kolenbrander.
- Required : An Amiga with AmigaDOS 2.x or higher. AmigaUUCP or AmiTCP/Miami
- and Arexx, my RequestString program. (Included in this archive)
-
- Always check the spam headers for a valid address. Do not accept
- the From or From: line as containing a valid return address. They
- mostly do not. Check the 'Received:' headers. These mostly have a
- link to where it came from...
-
- Script Parameters:
- spam -> Path and filename of the complete spam email. Including
- all the headers. Eg. ram:junkmail.
-
- */
-
- /* VARIABLES - Adapt these to your configuration */
- deftext = 'NoSpam' /* Standard reply text. Add path if needed. */
-
- OPTIONS RESULTS
- PARSE ARG spam .
-
- /* Check if files specified do exist */
- IF ~EXISTS(spam) THEN DO
- SAY 'ERROR: File '||spam||' cannot be found! Check path/filename specified!'
- EXIT
- END
-
- IF ~EXISTS(deftext) THEN DO
- SAY 'ERROR: Default response file '||deftext||' cannot be found! Check path/filename
- specified!'
- EXIT
- END
-
- SAY 'Processing spam message: '||spam
-
- OPEN('defresp', deftext, 'R')
- OPEN('email', spam, 'R')
- OPEN('uitgaand', 'T:junkmail', 'W')
-
- DO WHILE EOF('defresp') ~= 1
- WRITELN('uitgaand', READLN('defresp'))
- END
-
- WRITELN('uitgaand', ' ')
- WRITELN('uitgaand', 'Original Message follows:')
- WRITELN('uitgaand', ' ')
-
- DO WHILE EOF('email') ~= 1
- WRITELN('uitgaand', '> ' ||READLN('email'))
- END
-
- CLOSE('default')
- CLOSE('email')
- CLOSE('uitgaand')
-
- /* request an address from the user. You may want to add a path specification */
- OPTIONS RESULTS
- ADDRESS COMMAND 'RequestString > T:spammer'
- IF EXISTS('T:spammer') THEN DO
- OPEN('adres', 'T:spammer', 'R')
- spammer=READLN('adres')
- CLOSE('adres')
- IF (LENGTH(spammer) > 0) THEN DO
- /* Set up default for AmigaUUCP */
- ADDRESS COMMAND 'UUCP:C/SendMail <T:junkmail -f postmaster -R PostMaster -t '|| spammer ||' -s Notification_Of_Refused_Message'
-
- /* Alternative setup for AmiTCP and PutMail. Do comment out the AmigaUUCP setup if you use this one
- ADDRESS COMMAND 'AmiTCP:bin/PutMail MAIL=T:junkmail TO='||spammer ||' SUB=Notification_Of_Refused_Message'
- */
- SAY 'Response mailed to:'||spammer
- END
- ELSE DO
- SAY 'Not Mailed, Address not entered.'
- END
- END
- ELSE DO
- SAY 'Not Mailed, Address not entered.'
- END
- EXIT
-