home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 3
/
Meeting_Pearls_III.iso
/
Pearls
/
tcp
/
Networking
/
TCP
/
Mail
/
mail
/
mail.doc
< prev
next >
Wrap
Text File
|
1994-03-06
|
5KB
|
133 lines
INTRODUCTION
This program is © Copyright 1993 Stephen Norris.
It may be freely distributed, but not sold for profit or included
in any product without permission from the author.
If you find it useful, find a bug or want an enhancement, please
let me know at:
srn@cs.su.oz.au
REQUIREMENTS
A network link (obviously).
AmiTCP V2.1 or later.
RATIONAL (Or, What is it for?)
My intention when writing this program, was to produce a piece of
software for sending mail _only_. The program is not for recieving mail,
for that use AmiPOP.
It does, on the other hand, send mail to many addresses, is RFC822
compliant (this is the RFC regarding mail headers) and it is free.
INSTALLATION
You need to set the following variables with setenv:
SMTPHOST - The site that you use to send SMTP mail (is running
an SMTP demon).
This name can be either an IP address or (better) a name.
USERNAME - Your name. Used in the default reply address.
HOSTNAME - from the AmiTCP setup.
The following variables aren't _needed_ but will make things much nicer:
REALNAME - Your real name, as it should appear in your mail.
EDITOR - You should set this to the name of an editor you want
to edit mail with.
SIGFILE - is the name of a file which is always appended to your mail, such
as a signature.
USAGE
By default, when you run mail, it will prompt for a subject, then start
an editor. Once in the editor you can type your mail (be careful not to change
the existing Subject: header - you can change what is after the colon, but not
the actual word). The body of the mail should start at least one blank line down
the page.
Any extra headers you want to include should be added _above_ the Subject:
header.
Template:
RCPT=RECIPIENT/M/A,REPLYTO,SMTPHOST/K,NOSIG/S,VERBOSE/S,NOSUBJ/S,NOHEAD/S,NOED
RECIPIENT is a list of people to send mail to.
REPLYTO is the address which should appear on your from: line (where
replies will be sent). It over-rides that generated as a default (see
above).
SMTPHOST is a host to use to send the mail from (over-rides the SMTPHOST
variable).
VERBOSE turns on (slightly) more verbose debugging output.
The next options are intended to make it easy to use the program as a sendmail
replacement.
NOSUBJ turns off generation of the subject line.
NOHEAD turns off generation of all headers.
NOED turns off the use of an editor, and reverts to line-by-line
entering of mail. The editor used is determined by the EDITOR variable.
NOSIG turns off the inclusion of the signature file.
COMPILING
The program will compile using DICE, after applying the available
patches to the DICE libraries, which integrate the sockets stuff into the
file descriptor code.
EXAMPLE
mail fred@company.com REPLYTO=srn@cs.su.oz.au SMTPHOST=joyce.cs.su.oz.au VERBOSE
Sends mail to fred at company, with the from: line set to srn@cs.su.oz.au,
using the SMTP server running on joyce.cs.su.oz.au and including the file s:.sig.
It will run in verbose mode, printing out longer error messages, and telling you
as it sends each piece of mail.
BUGS
Not a bug, but a potential problem is the way mail handles external editors.
If the editor runs asynchronously (i.e. the shell prompt returns before you quit
from it when you run it) then it _will not_ work with mail. Use an editor
that behaves like MicroEmacs, ed, vi or similar. I'm working on a fix for this.
HISTORY
(B is a bug fix, + is added functionality)
1.8 B Hacked around a problem with extended replies that broke mail
on some hosts.
1.7 B Eliminated all references to SMTPSERVER
+ Removed SIGFILE option, and made it a shell variable to be
consistent with the other options.
+ Added a NOSIG option. (thanks go to Jim Dutton for pointing this
inconsistency out and suggesting these improvements).
+ Added .sig file before editing with an external editor.
+ Added Reply-to: line, and changed From: line to the actual
from address.
+ Added MessageId: line.
1.6 Optimised sending code (this is a bit embarrasing, compare 1.5
with this one if you want more details).
Tidied code up a little.
Added support for editors when sending mail.
Added automatic inclusion of signature files.
1.5 Fixed up SMTP transaction (added HELO and changed order of
MAIL FROM and RCPT TO commands).
1.4 Corrected documentation error.
Added To: lines that list all the destinations of the mail.
1.3 First release of fixed up version.
1.2 Horribly buggy release, made while half asleep.
1.1 First release. Minimally functional.