home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
internet
/
mailbot
/
!MailBot
/
Docs
/
BotDocsT
< prev
next >
Wrap
Text File
|
1995-02-26
|
27KB
|
739 lines
MailBot Reference Manual - ASCII Version
Freebieware © Tony Howat 1994, 1995
v1.20 (26th Feb 1995)
---
Mailbot is © Tony Howat 1994, 95 and is freebieware - i.e. distribution is
unlimited, but :
No charge may be made for this software,
The software must be distributed as a complete package,
The software should not be modified and distributed,
Any handling fee charged by PD libraries must be nominal (<£1).
FreebieWare[tm] also requires any commercial organisation using this
program to send the author a freebie. Anything from a biro to a company
car. Not only will you satisfy the conditions of FreebieWare[tm] but you
will also gain some shameless advertising in future releases of MailBot.
The address to send any freebies to is :
Tony Howat
12 Dover Road
Birkdale
Southport
Merseyside
PR8 4SY
Enquiries/suggestions/bug reports relating to MailBot should be e-mailed to
thowat@xargle.demon.co.uk.
To find out about the latest release of MailBot e-mail a blank message to
mbv@xargle.demon.co.uk. Any new releases are announced on comp.sys.acorn
and demon.ip.support.archimedes. The latest official release of
MailBot is always availiable by FTP from ftp.demon.co.uk in
pub/archimedes/developers.
The Incredible Flying Frisbee Company is, of course, a fictional company;
but you knew that, didn't you?
---
CONTENTS
- Introduction
1.0 What MailBot does
1.1 Features
1.2 Possible Applications of MailBot
- Configuration
2.0 Command line parameters
2.1 How MailBot fits in with KA9Q & Debatchers
2.2 The Exclude file
- Writing MailBot Scripts
3.0 Introduction to MailBot Scripts
3.1 Example MailBot script
3.2 Testing MailBot scripts
3.3 MailBot commands
- Error Messages
4.0 General errors
4.1 Script Syntax errors
---
1.0 What MailBot does
~~~~~~~~~~~~~~~~~~~~~
The Incredible Flying Frisbee Company, being the trendy organisation that
they are, have an Internet connection, so all their customers can e-mail
orders and find out about new products.
T.I.F.F.C. use an Acorn machine running KA9Q to access their Demon account.
One of the services tiffc.demon.co.uk offers is an information system,
where customers can mail info@tiffc.demon.co.uk and information concerning
T.I.F.F.C. products will be returned to them. Up until now this was run by
hand, every request had to be replied to manually.
Not any longer, for MailBot is here.
Mailbot searches a mailbox, and sends a reply to every message in that
mailbox containing a specified file. There are hundreds of possible uses
for this simple function, and it acts as an invaluable replacement for
finger on systems which are not on line 24hrs a day.
---
1.1 Features
~~~~~~~~~~~~
Features
Versatile script language
Can send any number of messages in response to each request
Can trigger other programs
Can search any number of mailboxes
Optional logging of requests to a file
Mail loops prevented
Header and footer files
Exclusion facility for troublesome users
Suggestions for new facilities are welcomed by the author, see the front of
this manual for contact addresses.
Details of the latest version of MailBot can be obtained by sending a
message to mbv@xargle.demon.co.uk, and any new releases are announced on
comp.sys.acorn.announce and demon.ip.support.archimedes.
---
1.3 Possible Applications of MailBot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
• Making a document or program availiable on your system but keeping
track of who has a copy.
• Providing information on a company's products or services.
• A fortune cooky server.
• A substitute for finger for info on users (users of mailbot on a single
user system should create an "aboutme" mailbot).
---
2.0 Command Line Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The actual MailBot application is run in the form :
mailbot <scriptfile> [-q(uiet)]
Where <scriptfile> is the MailBot script to interpret. Appending "-q" to the
mailbot command in the !Run file will suppress all non-essential messages.
If no parameters are supplied Mailbot refers to the system variables
MailBot$ScriptFile and MailBot$Options. In normal use these are set in
the !MBotUser.!Options file. So, for silent running you load
!MBotUser.!Options into a text editor, and insert a Q inbetween the quotes
of the line setting MailBot$Options.
---
2.1 How MailBot fits in with KA9Q and debatchers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MailBot reads its input from <Mail$Dir>.spool.mail.text. This means
!MailBot should be run before any debatchers such as !NewsBase or ka9q->rucp
in your dialler script, that is, unless you can modify your debatchers to
take their mail feed from a different directory to prevent them from
debatching mail for !MailBot. Newsbase users can be modified to do this
by loading the file "!NewsBase.transports.ka9q.params" and editing the
line reading "in <Mail$Dir>.spool.mail.text.*" to "in Bot:User.OtherMail.*".
Once this modification has been performed !NewsBase will not find any e-mail
until after MailBot has been run, preventing any problems. The mail files
are moved by a program called "MailCopy" in the !MBotUser directory, this
is called by the Obey file "!Finished". You should edit "!Finished" and
comment out the "<Obey$Dir>.MailCopy" line if you are not using NewsBase.
Mail is sent by inserting directly into the SMTP queue in <Mail$Dir>.spool.
mqueue.work/text.
The relevant sections of my SlipDial script (based on Rob Orwin's) with the
modifications for MailBot follow:
#######################
# Dial Demon and Log on
:dodial
set diff 4
set tmstrt 0
set tmend 0
## kill off newsbase so it won't debatch Mailbot's mail
task /kill=“Newsbase”
[*** Rest of :dodial unmodified ***]
###############################################
# Call has been terminated, so release the port
:terminate
task /kill=“TCP/IP”
message /close
message “Call Terminated” /centre
release
# now pause for 1 second to allow RISC OS to sort out the display.
pause 1
# run MailBot *then* Newsbase.
task “<Internet$Dir>.!MailBot.!Run”
task “<Internet$Dir>.!Newsbase.!Run”
#now trim DemHist File
call trimfile <NNTP$Dir>.DemHist
return 1
The next, and most important stage of configuration is writing the script.
The section three explains how to do this.
---
2.2 The Exclude File
~~~~~~~~~~~~~~~~~~~~
The Bot:User.Exclude file should usually be non existant. It lists any users
or groups of users you wish to prevent from using your mailbots. If a user's
address matches a line in the Exclude file no responses are forwarded,
and a note is made in the Log.
Hopefully you won't have to resort to using the exclude file, but it would
be extremely naive to suppose that everyone will be ultra considerate about
your paying for their requests (assuming you're using a dial up connection
and you're paying 8) ).
Examples:
"@vfuture.demon.co.uk"
-- would ignore requests from john@vfuture.demon.co.uk,
bob@vfuture.demon.co.uk, phantom@vfuture.demon.co.uk etc.
"phantom@vfuture.demon.co.uk"
-- would ignore requests from phantom@vfuture.demon.co.uk.
"aol.com"
-- would ignore all requests from America On Line subscribers.
"x"
-- would ignore all requests from addresses including the letter x.
As you may have guessed if an address contains a string from the exclude
list it is ignored. Both the Reply-to: and From: lines are checked.
The list is dynamically allocated so you can exclude as many addresses
as your wimpslot will allow.
---
3.0 Writing Mailbot Scripts
~~~~~~~~~~~~~~~~~~~~~~~~~~~
MailBot's scripting language is extremely simple, there are no user
variables, comparative instructions or string handling functions etc.
The MailBot Script Language centres around box..endbox structures. Most
instructions work differently depending on whether they are used outside or
inside one of these structures.
Commands which set a value -----------------------------------------------
The commands botbox, replyto, botnic, organisation, header, footer
and title if used outside a box/endbox structure set