/* ** CNet/4 POP3 Daemon Documentation ** by Kelly Cochran ** Last Change: Mon Mar 22 13:03:47 1999 */ Purpose: This utility allows you to offer your users the ability to access their email on your bbs by using a normal POP3 email client (Eudora, YAM and the like). Requirments: A TCP stack (AmiTCP or Miami preferrable) CNet 4.70pre+ (this will not work with earlier versions of CNet!) Features: Simple to install and configure. Handles return receipts on read email. Suppports all the POP3 commands as specified in RFC1939 except for APOP. Installation: Installation of POP3d is simple. Just copy the executable someplace on your hard drive (AmiTCP:serv/ or Miami:serv/ are good spots, as well as possibly either a CNet:INet/ directory, or in the CNet:Doors/Internet_Support/ directory). Then add the following line to AmiTCP:db/inetd.conf, or to Miami's Database/Inetd with set to the path and filename of where you installed POP3d. -- CUT -- pop3 stream tcp nowait root /pop3d pop3d -- CUT -- Next add the following line to AmiTCP:db/services or Miami's Database/Services if it does not already exist. -- CUT -- pop3 110/tcp -- CUT -- Tada! It's installed. Usage: Just use any normal POP3 email client, whether it be YAM, Microdot, Netscape, Eudora, or whatever else you desire. The username the pop3d expects and requires for the authorization checks is the user's UUCP ID. Handles will not work for pop3d! Notes: Users will not be able to read their email online, and via the pop3d at the same time. This is to preserve data integrety on the mailfile. If you're using some utility to manage syslog() calls, pop3d logs at the DAEMON service level. Dis/connections are logged at priority INFO and errors at ERR. Author: POP3d was written and coded by Kelly Cochran (better known as Trolan) in his minimal spare time. He's also the programmer of CINS (an Internet interface for CNet/3 and CNet/4). Contact Info: email: kcochran@best.com IRC: Trolan in #CNetIndependent on BeyondIRC (babylon.beyondirc.net) NIC: KC543 Thanks: Ray Akey for coding ideas, and examples. History: Version 1.20 (Mar 22 1999): * Recompile against the final 4.x headers. Version 1.19 (Jan 12 1999): * Added some additional verbosity on the log entries for owned semaphores. * Couple last tweaks on the header parser. Version 1.18 (Jan 11 1999): * MailSem shifting with CNet revisions problem fixed, once and for all. ('Least it says here in fine print...) * Minor optimizations in the UIDL/EUIDL/XTND XLST commands. * Cleanup of header routines to better handle 'missing' header information. (Ex: Check any saved RFC822 headers from incoming email for the header, and if not found, whip up a reasonable facsimilie of one. * Various commands re-synchronized to follow the behaviour of other POP3 implementations. Version 1.17 (Dec 29 1998): * UIDL funtionality has been merged with the new XTND XLST code. Makes it ever so much tighter, and easier to maintain. * Added EUIDL command (primarily of use for Newton users). * E/UIDL now will pull a pre-existing UIDL from saved headers. * XTND command sets have been added. Will make Eudora a little happier. + XTND XLST is fully supported. + XTND XMIT is not supported at all. Using POP3 for mail sending seems a bit wierd to me. I may add this functionality in the future, but SMTP is really the better way to send email. Version 1.16 (Dec 18 1998): * Added CAPA command as detailed in RFC2449. Version 1.15 (Nov 3 1998): * Finally found the !@#$%^& semaphore locking problem! (And it wasn't my code's fault! Yay!) Version 1.14 (Aug 30 1998): * Fixed header output on files with header files. Version 1.13 (Aug 29 1998): * A few minor optimizations on mail output routines. * Now will print saved headers on imported internet mail in CNet 4.62 and above. One thing to note on this currently: + UIDL information will only be present in the headers of email imported into CNet from remote pop servers. Also UIDL information in those headers will not match up with the POP3 server's UIDL data. I'm trying to think of a nice way to rectify this issue. Version 1.12 (Aug 1 1998): * syslog() now used to log connections, bad passwords, and any internal errors. Maybe this will help nail down the semaphore locking problem which noone can find a problem with on the source level. * Addition of heavier logging required a reorganization of the password command routines. This may also help on the semaphore problem. Couldn't hurt. Version 1.11 (Mar 12 1998): * Possible situation where semaphores could get whacked. Fixed. Version 1.10 (Feb 26 1998): * Minor tweaks to output code to make code maintenance a bit simpler. * Removed some additional redundant code. Version 1.9 (Feb 26 1998): * Recompiled to work with CNet 4.43+ * Removed standard C library startup code. Size decreased about 2k. * Changed output code to a varargs method. * Removed redundant text from executable. * Various optimizations. Version 1.8 (Jan 14 1998): * Recompiled to work with CNet 4.37+ Version 1.7 (Nov 2 1997): * Added Received: header to be a bit more compatible * Minor optimization to header printing function * Recompiled to work with CNet 4.32u2 Version 1.6 (Oct 21 1997): * Return receipts were using the date the receipt was generated in the reply and not the date of the mail it is in reply to. Fixed. * POP3 transaction timeout lowered to 300 seconds (5 minutes). The RFC states 10 minutes should be the minimum timeout, but that seems a bit long to me. Version 1.5 (Oct 4 1997): * Problem in UIDL command. Fixed. Version 1.4 (Sep 25 1997): * Now really updates the mail to #1 counter. * SAM semaphore locking added to avoid potential problems. * Mail is now properly tagged as read after a pop3 session. Version 1.3 (Sep 16 1997): * Minor code rearrangement internally. * Possible situation where pop3d wouldn't free memory fixed. * Now updates the badlogon count on a user when an invalid password is tried. Version 1.2 (Sep 13 1997): * After much hair pulling after 1.1 suddenly stopped working, code converted to pure socket calls. Size went down 4k. Version 1.1 (Aug 20 1997): * First version.