File 'net/pop3/server.cls' (part of 'Pool_Net')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
Core of a POP3 server (Popsy). All general operation is handled by the code in the baseclass server.
See also
general POP3 background information, or POP3 server core for more specific info
Depends on
Trf
Keywords
POP3, mail server core, Popsy

Class 'pop3Server'

Description
A full fledged pop3 server, based upon the server framework. The only missing parts are a storage system handling mailboxes and mails and a database of user accounts. These are delegated to external objects, see option userdb and storage. See POP3 server core for more. &p The UIDL command is not supported.
Superclasses
server
Options
storage, userdb
Membervariables
connInfo
Methods
CheckLogin, CloseConnection, GreetPeer, H_apop, H_dele, H_list, H_noop, H_pass, H_quit, H_reset, H_retr, H_stat, H_top, H_user, HandleUnknownCmd, InitializeNewConnection, TransferDone, pop3Server

-storage
Handle of the object giving us access to the facility storing the mails known to the whole system. Must be derived from class popServerStorageBase.
-userdb
Handle of the object giving us access to the database of users and their associated passwords. Must be derived from class userdbBase.

connInfo
Maps connection handles to the state information required by the server. The data is stored in 'array set' format, for easy retrieval and update. Any method requiring access to the data of a specific connection will read and store 'connInfo(<conn>)' from/into the local array 'state'.

CheckLogin (conn clientid serverid storage)

Internal procedure. General code used by USER/PASS and APOP login mechanisms to verify the given user-id. Locks the mailbox in case of a match.
Argument: connDescriptor of connection to write to.
Argument: clientidAuthentication code transmitted by client
Argument: serveridAuthentication code calculated here.
Argument: storageHandle of mailbox requested by client.

CloseConnection (conn)

Called by the general server to cleanup the pop3 specific part of a new connection. Overides the baseclass definition (server:CloseConnection).
Argument: connDescriptor of connection to write to.

GreetPeer (conn)

Called after the initialization of a new connection. Writes the greeting to the new client. Overides the baseclass definition (server:GreetPeer).
Argument: connDescriptor of connection to write to.

H_apop (conn cmd line)

Handle APOP command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_dele (conn cmd line)

Handle DELE command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_list (conn cmd line)

Handle LIST command. Generates scan listing
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_noop (conn cmd line)

Handle NOOP command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_pass (conn cmd line)

Handle PASS command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_quit (conn cmd line)

Handle QUIT command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_reset (conn cmd line)

Handle RSET command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_retr (conn cmd line)

Handle RETR command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_stat (conn cmd line)

Handle STAT command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_top (conn cmd line)

Handle RETR command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

H_user (conn cmd line)

Handle USER command.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe sent line, with cmd as first word.

HandleUnknownCmd (conn cmd line)

Handler for commands not known to the server. Overides the baseclass definition (server:HandleUnknownCmd). Simply writes an error response to the client.
Argument: connDescriptor of connection to write to.
Argument: cmdThe sent command
Argument: lineThe complete line sent by the client behind conn.

InitializeNewConnection (conn)

Called by the base class to initialize the pop3 specific part of a new connection. Overides the baseclass definition (server:InitializeNewConnection).
Argument: connDescriptor of connection to write to.

TransferDone (conn)

Internal procedure. Called by the storage system after completion of the transfer requested by the server. Reenables listening for commands.
Argument: connDescriptor of connection to write to.

pop3Server ()

Constructor. Creates the core of a pop3 server. It handles all interactions with a client, but relies on external code for authentication and mail storage. Built on top of server.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries