Installation Instructions for POP3 server (08-19-91)
=========================================

General:
The POP3 server is a TCP/IP server. It accepts one line commands,
and responds with one or more ASCII text lines. For a complete
description of the POP3 syntax, please refer to RFC 1225.
The POP3 server is similar to the FTP and SMTP servers; it should
be installed like ftpd and smtpd.

UNIX installation:
-----------------

- copy and compile the   pop3d   program
- copy the  pop3d  program to the   /etc   directory; it should
  be owned by   root   and should have permissions   700
  once installed, its directory listing should look something like this:

     -rwx------  1 root        30720 Aug 10  1990 /etc/pop3d


- add an entry for   pop3d   in the file /etc/services
  it should look like this:

     pop3		110/tcp		postoffice


- add an entry for   pop3d   in the file /etc/inetd.conf
  it should look like this:

     pop3	stream	tcp	nowait	root	/etc/pop3d	pop3d


- restart the   inetd   program;  inetd  will connect incoming TCP/IP
  traffic for the POP3 server to the   pop3d   program. Get the PID
  number for   inetd   with the   ps   command; then restart  inetd:

     aggie: 9> ps -fax | grep inetd
        92 ?  I     3:19 /etc/inetd
     14470 p0 S     0:00 grep inetd
     aggie: 10> kill -HUP 92
     aggie: 11> 


- pop3d  is now installed



Sun OS installation:
-------------------

- copy and compile the   pop3d   program

- copy the  pop3d  program to the   /etc   directory (NOTE: network
  files may be stored in a different directory on your system); it should
  be owned by   root   and should have permissions   700
  once installed, its directory listing should look something like this:

     -rwx------  1 root        49152 Feb  8  1990 /etc/in.pop3d

- if you use an /etc/services file,  add an entry for   pop3d   in the
  file /etc/services it should look like this:

     pop3		110/tcp		postoffice

- add an entry for   pop3d   in the file /usr/etc/inetd.conf
  it should look like this:

     pop3	stream	tcp	nowait	root	/etc/in.pop3d    in.pop3d


- if you are running Yellow Pages, remake  yp

- restart the   inetd   program;  inetd  will connect incoming TCP/IP
  traffic for the POP3 server to the   pop3d   program. Get the PID
  number for   inetd   with the   ps   command; then restart  inetd:

     wilma% ps -ax | grep inetd
       114 ?  IW    0:15 inetd
      2082 p1 S     0:00 grep inetd
     wilma% kill -HUP 114
     wilma%


- pop3d  is now installed


Special note for various UNIX-like operating systems
====================================================

When you compile the server, you may get an error involving
the    flock()    function or the    LOCK_EX and LOCK_UN
constants. The purpose of these calls is to create an exclusive
lock on the mailbox file. This prevents other processes from
re-writing the mailbox while the POP server is also writing or
reading from the mailbox.

In general, the flock() function may not be avialable on your system.

The 'brute force' way to get around this problem is to simply
comment out the flock() calls. However, this will leave the mailbox
file unprotected from other processes; if two processes write to the
file at the same time, the results are undefined.

As an alternative, you should check the source code for other
e-mail prcoesses on your system. Presumably, they will have some
kind of file locking mechanism. Modify the POP3 server source
code to use the same file locking mechanism.

-----------------------------------------------------------------------------

--  Katie Stevens
    dkstevens@ucdavis.edu
    Information Technology -- Campus Access Point
    University of California, Davis
