POP3/SMTP Server (c)1998 Gary A. Priest
---------------------------------------

This is a brief document intendend for beta testers. It is not a full 
manual, but is simply intended to outline the setup required to run 
the program.

This program is a POP3 and SMTP server for the Atari range of 
computers running the STinG TCP/IP stack. I have not tested it with 
STiK and TBH am not that interested in STiK compatability!

The program can handle upto 99 concurrent logged on users.


SMTP LIMITATIONS
----------------
The SMTP support is still young. At present it is not possible to 
relay emails onto an outside source such as an ISP's SMTP server.
Thus only local posts are allowed. eg. assuming you had user GARY 
defined in the USERS file, it is possible to send emails to the 
following addresses; gary or gary@hostname of computer running the 
server. gary or gary@the-gap.demon.co.uk in my case.
Emails to hosts other than the one running the server will be 
rejected.


SET UP
------

POP3SERV.INF
------------
This file should point to the main directory of POP3 Server. ie where 
it's RSC files etc are stored.

USERS
-----
This file must exist in the same directory as POP3SERV.PRG, and it
contains the list of users who have maildrops on the system, their 
passwords, and a folder that their mail will exist in.
See the example for an idea.

User's are not case sensitive, but passwords are case sensitive.

OKHOSTS
-------
SMTP connections to this server will only be allowed to hosts that
are defined in OKHOSTS. Validation occurs when a SMTP client sends the 
HELLO command to initialise the connection. The host name that it 
specifies as part of the HELLO command is compared to the OKHOSTS 
file, and if it is not recognised then the server rejects the 
connection attempt.
This was put in mainly for my benefit, to prevent Demon Internet's 
SMTP server sending my precious email to my beta server, and it 
getting lost.

N.B. Infitra on my machine sends the command HELLO [127.0.0.1] which 
means that you will have to add [127.0.0.1] including the brackets to 
OKHOSTS. POPwatch sends the actual HOSTNAME string from DEFAULT.CFG.
in my case 'the-gap.demon.co.uk'.


Folders & Mail Format
---------------------
The program currently requires the following subdirectories to exist in 
it's own directory.

MAIL
----
This subdirectory must exist. It is within this directory that the
directories specified in USERS must exist.

Within each user directory, the email must reside. Each email is 
stored in individual files of the format M???????.TXT (where ??????? 
is a number from 0 - 9999999).

The server will create an associate .STS when an email is read via 
POP3. This file contains a read flag, date/time received (not used),
date/time read.

INQUEUE
-------
This subdirectory must exist. It is where the server will queue 
incoming email via SMTP. 
Whenever an SMTP connection is closed, or the program is quit, this 
queue will be processed and all mail filed in the appropriate mailbox 
in the MAIL directory. Once processed it is removed from the queue.


PREFERENCES
-----------
Global Timer
------------
This is the number used in the evnt_multi. The lower the number, the 
more processor time the POP3 server gets. Thus it responds quicker, 
but at the expense of other applications. Trial and error should be 
used to find the correct setting. Changing this has an immediate 
effect.

Maximum Users
-------------
The maximum number of concurrent logged on users. Default is 5. 

LOGOUT USERS
------------
This currently has no effect.


USING THE SERVER WITH EXISTING CLIENTS
--------------------------------------
I have tested both the POP3 and SMTP functions of this program with
POPwatch, NEWSie, and INFITRA, and it appears to be completely compatible.

If testing on a single machine then simply use the POP3 address of 
127.0.0.1 where the POP3 address should be entered. 
If testing on a network then simply enter the IP address of the 
machine running POP3 Server.


CURRENTLY IMPLEMENTED POP3 COMMANDS
-----------------------------------
USER, PASS, QUIT, STAT, LIST, RETR, DELE, NOOP, RSET, TOP


CURRENTLY IMPLEMENTED SMTP COMMANDS
-----------------------------------
HELO, MAIL, RCPT, DATA, HELP, QUIT, NOOP, RSET


KNOWN LIMITATIONS/BUGS
----------------------
See TO DO list.


STILL TO DO
-----------
Forwarding of non-local email to an outside source.
Retrieval of email from an outside source via SMTP or POP3.

Automatic deletion of read emails older than X days.

Automatic logoff of users after a certain time of inactivity.
