POP3D

Synopsis

POP3D [/?] [/ACCESSLEVEL number] socket

Description

POP3D provides POP3 service, accepting POP3 commands on its input and sending POP3 responses and message data on its output. If no socket is specified as an argument, it uses its standard input and standard output for input and output. Otherwise, it uses the named socket, which it closes when it has finished with it. The IP address and TCP port number on which POP3 service is thus provided is determined by its parent process, not POP3D itself. Conventionally, the port number is 110 and the IP address is one that is reachable by Internet at large.

POP3D expects mailboxes to be stored in the standard directory format. POP3D uses the mailbox names that are used by the IMAP dæmon. For a user logging in as <user@domain>, PO3D will use domain/user/INBOX as the name of the mailbox directory.

POP3 uses the same password database as the IMAP dæmon, also. Because it uses the same databases, a POP3 dæ can be upgraded to an IMAP dæmon with no changes other than service configuration changes — in particular, no changes to the mailstore itself.

Because a POP3 dæmon and an IMAP dæmon can potentially share a single mailstore, POP3D varies one aspect of the POP3 protocol: It does not lock inboxes when a POP3 client is accessing them. POP3 clients will not see any messages added by IMAP clients (or, indeed, by SMTP Local Delivery) whilst they have the inbox open, but they will see expunges issued by IMAP clients as if they had issued a "DELE" command themselves. The difference will be that a "RSET" command will not be able to undelete such files.

Note: It is the author's experience that POP3 clients are astonishingly fragile and badly coded, for such a trivial protocol. (During testing, one particular protocol error was found to cause Mozilla Thunderbird to issue an invalid RETR 0 request, and then hang and crash when it received the — not unexpected — error response.) Although he knows of no POP3 client that actually does, it is not inconceivable that a POP3 client could break with the aforementioned variance in locking behaviour. (POP3GET simply continues to the next message when such an error occurs.) In such circumstances it is, quite simply, the author's recommendation to use IMAP in preference to POP3.

POP3D is designed to be spawned on demand by TCPSRUN. It can also be spawned by INETD, although the control of client access levels based upon the client's IP address, which TCPSRUN does, will be unavailable as a consequence.

Where client access is denied, POP3D simply exits immediately, closing the socket. With any other access level, normal POP3 service is provided.

POP3D writes log information to its standard error.

Example RUN file

A "TCPService.RUN" run file, for POP3D to be spawned by TCPSRUN, would typically look similar to:

  chdir %IMAPROOT%\Personal\
  program %APPS%\JdeBP\IU\Bin\POP3D.exe
  argument POP3D
  argument %3

TCPSRUN itself would be invoked under RUNSVC, the Service Manager in the OS/2 Command Line Utilities version 2.2, with a run file similar to:

  chdir %_BOOT%:\Config\Services\%1
  program %APPS%\JdeBP\IU\bin\TCPSRun.exe
  argument TCPSRun
  argument 0.0.0.0
  argument pop3
  argument TCPService.RUN

Command-specific options


The Internet Utilities are © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.