. PINE AND IMAP FOR VMS		--- Version 3.91 Beta 8 ---------------------   L Yehavi Bourvine ported version 3.91 of the PINE code and the IMAPD server toF VMS. His last release was known as 3.91 Beta 5. However, this port wasN incomplete (Mainly the IMAPD daemon). I have progressed the port to a workableL state and upgraded the code since then; This note summarizes the changes. My version starts at 3.91 Beta 6.  O Note - the changes here have been tested ONLY with NETLIB and MULTINET. Support J is only partial for direct UCX support although NETLIB support provides anN alternative for UCX users. If anyone wishes to contribute the relevant mods toF make direct UCX support work properly, please let me know. I'll try toM integrate them as and when I can. I only update this in my limited spare time ! or as needed for our local users.   K The code will compile with VAX C 3.2 and DECC 5.3 and works on both VAX and  ALPHA with Multinet 3.5B.   O Note: for those who used a previous port (3.89 beta 10 or 3.89 beta 11) which I K released, all the facilities of those versions have been included into this  release.    M -----------------------------------------------------------------------------   * SETTING UP PINE AND THE IMAP DAEMON ON VMS* ==========================================     INTRODUCTION ============  M This kit contains all you need to build a working PINE mailer and IMAP server O for VMS (except for a C compiler). The code has been tested with the following: K     VAX C 3.2 on VAX and OpenVMS 5.5-2, using Netlib 2.0J and Multinet 3.5B I     DEC C 5.3 on VAX and OpenVMS 6.2, using Netlib 2.0J and Multinet 3.5B K     DEC C 5.3 on Alpha and OpenVMS 6.1, using NETLIB 2.0J and Multinet 3.5B   N Other combinations are LIKELY to work. It's just that they've not been tested.  / See below for details of bug fixes and history.     	 BUILDING: 	 =========   K    1.	Create a directory for the code and unpack to create a directory tree - 	into it, preserving the directory structure.   K    2.   From the top level of this tree, execute the VMSBUILD.COM procedure C 	with a single parameter of either NETLIB (recommended) or MULTINET ;         to build the code for your preferred network stack.   B 	NETLIB allows the code to execute on any of the supported VMS TCPD 	stacks, such as UCX, MULTINET, CMU, Pathway etc. It is available asK         freeware from ftp://madgoat.com/madgoat/netlib020.zip and should be  	installed first.   E 	MULTINET support restricts the image to MULTINET stacks only but may 3 	execute slightly faster as there is less overhead.   F 	NOTE: makefiles are included but are untested. They will likely fail.* 	Please use the procedure described above.  F 	NOTE: The PICO and IMAPD parts of the package can be built separatelyE 	if required. Simply make sure that the VMSBUILD.COM procedure exists 3 	in the appropriate subdirectory and execute it as:  	  @VMSBUILD stackname  D         where stackname is either NETLIB or MULTINET as appropriate.  N         NOTE:  If building each item separately, PINE must be built last as it: 	requires the object libraries created for PICO and IMAPD.     INSTALLING:  ===========   D    1.	Create a directory for the production system. You can have oneG 	directory for the PINE stuff and another for the IMAP server stuff, or H 	you can combine them into the same directory. In either case, reference; 	to the various places should be through logical names (see 3 	PINE_SETUP.COM and IMAPD_SETUP.COM for more info).   5    2.	The directory structure that is recommended is:  	 1 	  PINE_ROOT:[000000]	-- Top level for pine stuff . 		[.BIN_VAX]		For VAX architecture executables2 		[.BIN_ALPHA]		For Alpha architecture executables$ 		[.CONFIG]		For configuration files 		[.LOGS]			For log files   <           IMAPD_ROOT:[000000]   -- Top level for IMAPD stuff. 		[.BIN_VAX]		For VAX architecture executables2 		[.BIN_ALPHA]		For Alpha architecture executables$ 		[.CONFIG]		For configuration files 		[.LOGS]			For log files   E 	Note -- IMAPD_ROOT and PINE_ROOT can be defined to the same thing if  	preferred.   B    3.   Define some system level logical names to the directories:  7 		$ define/system/exec pine_dir  pine_root:[bin_'arch'] 8 		$ define/system/exec imapd_dir imapd_root:[bin_'arch']  * 	And some logical names for various files:  1 		$ define/system/exec pine_exe	pine_dir:pine.exe 7 		$ define/system/exec pine_conf_dir	pine_root:[config] 5 		$ define/system/exec imapd_exe	imapd_root:imapd.exe   6 	And various (mainly optional) configuration logicals:  > 		$ define/system/exec pine_mail_protocol mx  [see note below]  3 		$ define/system/exec imapd_log		imapd_root:[logs] 8 		$ define/system/exec imapd_logfile	imapd_dir:imapd.log' 		$ define/system/exec imapd_loglevel	2 % 		$ define/system/exec imapd_logtry	3 D 		$ define/system/exec imapd_alertfile	imapd_root:[config]alerts.txt) 		$ define/system/exec imapd_node_xxx	yyy   E 	See the files PINE_SETUP.COM and IMAPD_SETUP.COM for further details ( 	of the logical names and their function    D   4.	Set up suitable values in the configuration files to suit local= 	requirements. Note that the PINE configuration files MUST be          world-readable. 
 	  For IMAPD: 5 		IMAPD_CONF_DIR:IMAPD.CONF	is the configuration file - 			[ Currently, nothing is required in this ]    	  For PINE:< 		PINE_CONF_DIR:PINE.CONF		is the general configuration fileF 		PINE_CONF_DIR:PINE.CONF-FIXED	is the fixed system configuration file. 			[ See elsewhere for the contents of these ]  < 		The fixed system config file should define system specific< 		things which the user MUST not and CANNOT alter (eg system 		name, smtp server).   9 		The general system config file defines things which are < 		standard defaults but which the user can override in their% 		personal .PINERC configuration file    	 B   5.	Finally, arrange for the users to be given access to the PINE= 	executable by some means, perhaps by defining a symbol thus:    		$ PINE == "$PINE_EXE"      ACTIVATING THE IMAPD SERVER  ===========================   K The IMAPD server provides the user with the ability to access their mailbox F over the network. PINE uses IMAP protocols to access remote mailboxes.  O The IMAPD server is an implementation of IMAP2bis for VMS and will run directly M over MULTINET, or less directly over NETLIB which gives it the ability to run O over any VMS TCP/IP stack. Any mail client (not just PINE) that conforms to the K same standard (see RFC 1176 for the IMAP2 standard and ??? for the IMAP2bis M extended standard) may use the IMAPD server to access a mailbox from a remote  client.   L The IMAPD server is designed to be started by a master server process ratherK than as a permanently running process that 'listens' for connections. Thus, O although it is directly supported to run over any stack, the stack must have an M ability to act as a master server, accept connections, start the IMAP process 4 and then pass the connection on to the IMAP process.  K All master servers should be configured to listen on port 143 (The official < IMAP port) and run the IMAPD_EXE image when a call comes in.   Notes: -----       MULTINET:N       *  You may need to increase the virtual memory allocation of the spawnedK          process if users have particularly large messages or mailboxes, in O          order to prevent malloc calls from failing and causing a server crash. "          You can use the commands:'              $MULTINET CONFIGURE/SERVER                SELECT IMAP %               SET PQL-PGFLQUOTA xxxxx                SAVE               RESTART      L          The exact value will be dependent on the user's and their messages.      UCX: K       *  The UCX mail delivery agent must be configured to place the RFC822 J          mail headers at the top of the message, rather than at the bottomL          of the message. The IMAPD server will not recognize them otherwise.!          You can use the command: 9   	     $ UCX SET CONFIGURATION SMTP /OPTIONS=TOP_HEADERS   &          Then restart the SMTP server.      M -----------------------------------------------------------------------------    Configuration Notes  -------------------   < There may be a few warnings during the link - ignore them...O On VAX we have to link the objects themselves and can't use libraries since the > linker/librarian lose the global variables; on AXP it is ok...  N Due to a readonly definition of _ctype_ in the source files we use an externalM #define to redefine it to something else. Because of this,  CTYPE.H fails, so J we use a private copy of it. This is relevant only to VAX C; DEC C handles things better.     Using  -----   L   The user needs access only to the PINE.EXE image. This reads mail directly7   from the user's mailbox using callable MAIL routines.   -   Mail can be sent out by one of two methods:   M     * If any of the pine configuration files (see below) contain a definition        of the form:         smtp-server=hostname  K       Then all outgoing mail is sent to the named host for onwards routing. K       Note that the named host is contacted directly. No attempt is made to        use MX records.   K       NOTE: You can specify a comma-separated list of smtp-servers and they K       will be tried in the order listed. It is recommended that the current K       system name is listed last, with general mail routing gateways listed        first.  J     * If no such definition appears, then you MUST define the logical nameI       PINE_MAIL_PROTOCOL to specify which shareable mail foreign protocol J       module is to be used. For example, if you normally send network mailI       within VMS MAIL using addresses of the form SMTP%"....", you should J       define the logical name to the string "SMTP". PINE will then use the       callable image.   M       NOTE: With this method, the message that PINE sends out has TWO sets of M       RFC822 mail headers separated by a blank line. One is generated by PINE K       itself; the other by the foreign mail protocol. Currently there is no O       way around this. The only practical effect is to mess up any MIME encoded        attachments.  @     * It is an error if neither of the above methods are set up.     Pine.Conf Restrictions ----------------------  N PINE was originally written for a non-VMS environment and some of its conceptsF are alien to the way in which VMS MAIL works. As such, there are a few? restrictions on what can be done/configured. Principally these:   J 1. In order not to modify the source too much, the handling of the specialL    INBOX folder was not modified. Hence, it always tries to open the (empty)#    INBOX folder instead of NEWMAIL.   B    It is possible to define in the system-wide PINE.CONF file that      inbox-path=NEWMAIL.  N    In this case NEWMAIL will be opened when PINE is started. However, the userG    must not then switch to another folder as long as NEWMAIL has items.   & 2. The WASTEBASKET folder is not used.  N 3. .PINE-DEBUGx, .PINERC and .ADDRBOOK are fixed to the user's login directoryE    and cannot be defined to be elsewhere (the definition is ignored).     4. Messages cannot be postponed.   5. FCC cannot be used.     Example PINE.CONF file.  ----------------------  ? Here is an example PINE.CONF file used at HUJI. Default-FCC and K Folder-collections MUST be defined as is here; if not (or if missing), Pine  won't work correctly.   & # PINE.CONF for the Hebrew University.   # Name of the current system user-domain=vms.huji.ac.il  * # The smtp-server to use for outgoing mail smtp-server=vms.huji.ac.il   image-viewer=xv   ) # Folder to open on initial entry (INBOX)  inbox-path=NEWMAIL   default-fcc=""   folder-collections=SYS/[]   M -----------------------------------------------------------------------------   ' 3.91 Beta 8 - Changes since 3.91 Beta 7 ' ---------------------------------------    C-CLIENT LIBRARY CHANGES:  =========================   O   *  [.IMAP.ANSI.C-CLIENT]VMSIO.C : Added a 'special_puts' routine to intercept D      'puts' calls for the network. Implemented for the IPOP3 server. 								27-SEP-1996     J   *  [.IMAP.ANSI.C-CLIENT]VMSIO.C : added a check on the LOG macro; if notJ      defined, define it to do nothing (in case user program has not set up      logging). 								27-SEP-1996     E   *  [.IMAP.ANSI.C-CLIENT]VMSIO.C : Fixed up a bug in the size of the E      input buffer. It was one too small and didn't leave room for the       terminating null. 								27-SEP-1996     J   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSM.C : Fixed up the get_local_host_name to2      use mylocalhost() and avoid code duplication. 								26-SEP-1996     K   *  [.IMAPD.ANSI.C-CLIENT]TCP_VMSL.C : Added the tcp_clienthost routine to H      get the name of the calling host. This returns returns, in order ofH      precedence, one of:  calling system name, calling system address or      "UNKNOWN".  								26-SEP-1996   M   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSM.C : Various minor problems fixed up in the       MULTINET interface. 								25-SEP-1996     M   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSL.C : Various minor problems fixed up in the       NETLIB interface. 								25-SEP-1996     I   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSN.C : Modified the 'get_local_host_name' <      routine to call mylocalhost and avoid code duplication. 								25-SEP-1996     I   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSL.C : Modified the 'get_local_host_name' <      routine to call mylocalhost and avoid code duplication. 								25-SEP-1996     I   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSM.C : Modified the 'get_local_host_name' <      routine to call mylocalhost and avoid code duplication. 								25-SEP-1996     K   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSL.C : Added a routine (tcp_server_init) to M      the NETLIB interface to set up a TCPSTREAM for the standard I/O channels ;      allocated by netlib when started by the master server.  								24-SEP-1996     K   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSM.C : Added a routine (tcp_server_init) to O      the MULTINET interface to set up a TCPSTREAM for the standard I/O channels ;      allocated by netlib when started by the master server.  								24-SEP-1996     H   *  [.IMAP.ANSI.C-CLIENT]TCP_VMSL.C : Modified NETLIB interface modulesA      to support NETLIB 2.0 (NETLIB 2.0 or above is now required).  								24-SEP-1996        IMAPD CHANGES:
 =============   H   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Replaced the definitions for the SYSLOGG      calls (which don't exist on VMS) to generate no compiler warnings.  								27-SEP-1996     K   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Split out the special vmsio network server M      intercept code into separate modules VMSIO.H and VMSIO.C. This way, they H      can be included into other modules as needed (also makes editing of      new releases much easier).  								27-SEP-1996     H   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Added a call to log the calling host if      logging is on.  								26-SEP-1996     O   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Fixed up the special_printf code to return the M      proper status and, in particular, the error status. Also tidied up a few       odds and ends.  								26-SEP-1996   K   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Fixed up bug whereby vms_mail_open routine O      could not find mailbox. Don't know why this occurs for sure but it's fixed I      by checking for a user specified mailbox directory and adding in the L      default if it's not there. The VMS_MAIL open routine should do this butG      it doesn't seem to work right. The previous fix prevented the user       specifying an alternative.  								25-SEP-1996     A   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Modified the special I/O routine 1      'special_printf' to use var_args constructs.  								25-SEP-1996     G   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Modified network interface code to use J      only calls to the TCP interface modules, rather than ifdefing code toN      support MULTINET/NETLIB. The main IMAPD program should now be independent"      of the particular stack used. 								25-SEP-1996             
 PINE CHANGES: 
 =============   F   *  [.PINE]OS_VMS.C : Fixed a problem with inode comparisons that was(      preventing compilation under VAX C. 								26-SEP-1996     J   *  [.PINE]OS_VMS.C : Modified the network interfaces to use the routinesM      in the tcp interface module rather than using ifdefs to select differentrJ      code for different network interfaces. PINE itself should now be freeJ      of stack dependencies (all hidden in the tcp_vmsx.c modules from the       c-client library).e 								24-SEP-1996b  L   *  [.PICO]COMPOSER.C : function packheader did not allow for a null lengthM      string when checking for a terminating comma. This could cause an accessLN      violation. I've patched the code to check for a null string and ignore it      if it's there.p 								13-SEP-1996v  ?   *  [.PINE]PINE.H : Updated version string to indicate beta 8.o 								13-SEP-1996p     POP3 SERVER CHANGES: ====================  H   *  [.IMAP.ANSI.IPOPD]IPOP3D.C : First stab at building the POP3 serverI      for VMS. Included the VMSIO code, some changes to mailbox naming andX<      sorted out the SYSLOG calls (which don't exist on VMS).H      It works! Must be started by a master server on port 110. It is NOT:      usable as a detached process listening out for calls. 								27-SEP-1996i     GENERAL CHANGES: ================    J   *  VMSBUILD.COM : Modified each one to accept a VAXC option to allow theL      use of the VAXC compiler instead of the default DEC C compiler. This isL      most useful for testing that the whole thing compiles under the variousM      compilers. The default is to select whichever compiler exists with DEC Ce      being preferred.i 								27-SEP-1996   I   *  AAAREADME.TXT : Added information about special setups that might be 6      necessary for specific stacks (MULTINET and UCX). 								27-SEP-1996     O   *  VMSBUILD.COM : Tidied these up to add /NOLOG to delete and purge commands,bH      turn off redundant verification and add progress messages, document&      parameters, add LINK-ONLY option. 								27-SEP-1996     H   *  [.PINE]VMSBUILD.COM : removed all references to stack type from the8      /DEFINE list as it's no longer referenced anywhere. 								26-SEP-1996t    M   *  [.IMAP.ANSI.C-CLIENT]VMSBUILD.COM : removed all references to stack typemA      from the /DEFINE list as it's no longer references anywhere.t 								26-SEP-1996e  B   *  Updated details of multiple smtp-servers in the configuration      instructions. 								13-SEP-1996X  N   *  Added a MAKECLEAN.COM procedure to delete the various .EXE, .OBJ and .OLB!      files created after a build.h 								12-SEP-1996f  M -----------------------------------------------------------------------------   ' 3.91 Beta 7 - Changes since 3.91 Beta 6v' ---------------------------------------   
 PINE CHANGES: 
 =============y  I   *  [.IMAP.ANSI.C-CLIENT]VMS_MAIL.C  Fixed a bug in the use of a foreignPL      protocol mail interface (used only if the smtp-server is not defined inI      the pine configuration interface, and selected with the logical nameaM      PINE_MAIL_PROTOCOL).  There were several problems found and fixed in the       vms_mail_send routine:i  O        - No distinction was made between addresses in the TO: field and the CC:           field.   P        - Each line of pine's mail file was copied separately to the message bodyL          (This seemed to have a bug causing an access violation) rather than<          using the special filename option in callable mail.  J        - The calls to the callable mail interface specified that a routineK          should be called for each successful delivery but this routine was M          defined with the wrong number of parameters (zero instead of three).m 								12-SEP-1996N    J   *  Fixed a very strange timing bug in the purge_status_message() routineM      which supplied sleep with a zero value and somehow locked up when tryingFJ      to send a message.  I've inserted a check to always supply a positive      value to sleep. 								11-SEP-1996.  G   *  With debugging (-d switch) active, the .PINE-DEBUGx file was beingtI      created correctly but the code to rename the highest version did notoO      delete any previous version. Of course, it was originally written for unix O      where renaming into an existing file destroys the existing copy. On VMS iteF      doesn't, but preserves the older version. As this is not requiredK      behaviour, the code has been modified to explicitly delete the highesto      version if it exists. 								11-SEP-1996x  J   *  PINE was attempting to read the default system configuration from theH      SYS$MANAGER directory rather than from the directory defined by the       logical name PINE_CONF_DIR.      This has now been fixed.c 								11-SEP-1996x  H   *  PINE was attempting to read the fixed system configuration from theK      directory defined by the logical name UTIL$ rather than PINE_CONF_DIR.x      This has now been fixed.e 								11-SEP-1996g       GENERAL CHANGES: ================  F   *  Merged changes and installation/configuration files into a single      aaareadme.txt file. 								11-SEP-1996_    K   *  Added some info to the aaareadme.txt file about the configuration file.      usage and contents. 								11-SEP-1996l    K   *  [.PINE]PINE.H : The version ID was still at 3.91-vms-b4; changed it to C      3.91-vms-beta7 to properly reflect the current version number.	 								11-SEP-1996f    L   *  The DEBUG code is now compiled in to the PINE utility by default. It isK      controlled by the '-d' switch on the PINE command line. The default isI:      level 2. Switch off completely using the  -d 0  flag. 								11-SEP-1996f    O   *  [.PINE]VMSBUILD.COM : The wrong build procedure for PINE was inadvertentlyiD      supplied. It did not have appropriate changes added to properlyJ      distinguish VAX C and DEC C and could confuse compilations under bothM      compilers.  This has now been corrected and the right build procedure isaI      now supplied. This did not prevent the building of PICO or the IMAPD       daemon. 								11-SEP-1996,  M -----------------------------------------------------------------------------T  ' 3.91 Beta 6 - Changes since 3.91 Beta 5=' ---------------------------------------w     IMAPD CHANGES: ==============  L   *  [.IMAP.ANSI.C-CLIENT]VMS_MAIL.C : In the VMS header parsing, also treat%      "Via:" as a valid RFC822 header.f 								Sept 4, 1996  G   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Bug fixes to the code which parses the L      messages to sort out the headers from the text and return the length ofO      each. This was not being done under all circumstances and resulted in somed9      short string counts which could confuse the clients.D 								Sept 3, 1996      I   *  [.IMAP.ANSI.IMAPD]IMAPD.C : Added fuller checks on I/O status checks K      to/from the network. Should prevent the code hanging or looping if thet      network connection dies.l 								Sept 3, 1996    L   *  [.IMAP.ANSI.IMAPD]IMAPD.C and [.IMAP.ANSI.C-CLIENT]VMSBUILD.COM : FixedO      the NETLIB support code. This let me find some interesting DEC C and VAX CiN      header conflict bugs. If compiling with DEC C, it is probably inadvisableO      to point logicals like SYS, ARPA etc. to the SYS$LIBRARY If you also have,mK      or previously had, VAXC installed. The logicals cause DEC C to pick uphI      certain header files from there, rather than from the standard DEC CpN      library. Unfortunately, they conflict in their contents and cause variousO      facilities to become unavailable (Someone really should shoot the inventor:O      of C header files - they are a facility that is grossly misused and abused L      even by professional programmers! DEC C writers have not helped mattersA      with their proliferation of ifdefs and modes of compilation)r  G      Also had to slightly edit the code to call the right TCP interfaceu#      routine to get the local name.i 								Sept 2, 1996    N   *  [.ANSI.IMAP.C-CLIENT]VMS_MAIL.C : Found a more effective/efficient way ofM      dealing with VMS/RFC822 header selection. Basically, start by extracting L      the VMS MAIL headers into a buffer. If the first line after this set ofO      headers looks like it's an RFC822 style header, copy those over the top of-O      the VMS MAIL headers rather than reading them into a separate buffer. It'sa"      cleaner and uses less memory. 								Sept 2, 1996    H  *  [.IMAP.ANSI.C-LIENT]IMAPD.C : Added logging to the IMAPD code.  EachO     activation of IMAPD will create a logfile if the logical name IMAPD_LOGFILEiK     is defined with a valid file name. The logical is checked each time the I     IMAPD program starts so it can be dynamically assigned/deassigned foreI     selective logging only when there's a problem to solve.  The level of O     logging sent to this file is controlled by the logical name IMAPD_LOGLEVEL.aL     If defined with a numeric value greater than zero, then logging messages%     are written to the IMAPD_LOGFILE.t  2     The level of logging currently recognized are:$       0 or non-numeric: (No logging)  	0 - nothing written to log file  8       1-10: progressively higher levels of IMAP tracing 6         1 - Basic trace of IMAP commands and responses6         9 - Show mailbox directory/folder name in full  O       11-20: internal trace of I/O routines and other technical debugging stuffp8 	10: Trace of each read/write of an I/O buffer to stdout- 	11: Trace of every character read from stdiny  O     IMAPD Logging consists (currently) of all commands read by the IMAPD daemon N     and their parameters. NOTE that this includes login passwords at present!!J     Command responses are logged too, though not the data generated by the     command.  M  *  [.IMAP.ANSI.C-CLIENT]IMAPD.C : The alert facility has been implemented. A N     logical name of the form IMAPD_ALERTFILE can be defined to point to a textO     file. If this text file can be opened, it is copied to the IMAP user at the D     start of each IMAP session. Each line in the file is printed as:         * OK [ALERT]  text  K     Whether or not the IMAP client can detect and print them is, of course,      client dependent.t 								August 30, 1996n    L *   [.IMAP.ANSI.IMAPD]IMAPD.C : The idle timeout code was originally writtenM     using the ANSI function setitimer. As this is not available with VAX C oraO     with DEC C until VMS 7, the code was originally commented out for VMS. It'sa'     been put back and uses alarm() now.   J     Previously the idle timeout was fixed via a define in the source. I'veM     changed this so that the value can be specified via a system wide logical      name IMAPD_TIMEOUT.d       For example:0        $ define /system /exec imapd_timeout 1800  I     Sets an idle timeout of 1800 seconds (30 minutes).  A value of 0 (the "     default) sets no idle timeout. 								August 30, 1996s    L *   [.IMAP.ANSI.C-CLIENT]VMS_MAIL.C : Added the ability to remap DECNET nodeI     names into replyable internet address format, via logicals. With thisi!     facility, a name of the form:W@ 	node::username		(or Namespace:.node::username under DECnet/OSI)  +     attempts to translate the logical name:          IMAPD_NODE_nodey  2     And the translation is used to replace 'node'.       For example:  K       Suppose the logical name  IMAPD_NODE_BLACK is defined to "campus.edu"C       then the address:-         BLACK::JOHNn         is mapped into:s         JOHN@campus.edun  4       With no logical name, the translation will be:         JOHN@BLACK 								August 30, 1996y    L *   [.IMAP.ANSI.IMAPD]IMAPD.C : The program was originally written for unix,J     where INETD can fork off a process with stdin and stdout automaticallyO     connected to the client channels. This has the advantage of allowing thingsBK     like printf to work directly to the sockets. With VMS, we can't do this-G     (easily) so I've resorted to a rather nasty trick of redefining the-O     standard i/o calls with macros to our own special routines which attempt to-M     detect how to properly handle the I/O. Not a pretty sight but it seems to.K     work! Handling of network read/write error returns is still a bit flakyuO     though. More work needed. It does now work with MULTINET and (shortly) with      NETLIB.I  N     I can't claim credit for the idea of intercepting the I/O code - that goesO     to Yehavi Bourvine who added something similar to the 3.89 port. I've taken	N     the idea and refined it to make it cleaner and QIO free. The original codeH     had no concept of restrictions on I/O buffer length so would merrilyL     overwrite code and data structures. My rewrite is careful not to do this,     and splits reads/writes where necessary. 								August 30, 1996l    N   *  [.IMAP.ANSI.C-CLIENT]VMS_MAIL.C : When a local or DECnet message is foundO      (IE one sent through normal VMS mechanisms rather than via SMTP software),tL      the IMAPD daemon returns the usual VMS mail header lines. These are, ofN      course, not in rfc822 format and confuse various mail header parsers. TheL      code now modifies these headers (the FROM:, TO: and CC: fields) into an      RFC822-like syntax.  (      The following forms are recognized:2          username		   maps to	username	(No DECnet)=          node::username		   maps to	username@node	(DECnet IV)9C          namespace:.node::username maps to	username@node	(DECnet V)l  K      Additionally, a comma separated list of names in each field is allowed	K      and each is converted as above. I don't support space separated names!t 								August 15, 1996r    L   *  [.IMAP.ANSI.C-CLIENT]VMS_MAIL.C : I've further tidied up all the memoryK      allocation bugs I can find in IMAPD and it appears to be fairly stable 3      now. Big messages may still confuse it though.t 								August 14, 1996     N   *  [.IMAP.ANSI.C-CLIENT]VMS_MAIL.C : The IMAP daemon reads each message intoE      memory. It allocates space for the message using a primitive andaO      inefficient technique and does not check whether the allocation succeeded.SJ      This leads to random crashes later when the invalid pointers are usedJ      (well, it was written originally for unix where error checking is not      necessary ..   :-) )a  N      The algorithm has been modified to greatly reduce the memory requirementsN      for each message. This won't stop the crashes but should make them happenG      less often. I could not find a way to die gracefully if the memorySO      allocation failed. At the moment, the check simply prints an error message:J      and dies rather than crashing; whether the mail client can print this!      message is client dependent.s  K      One way to circumvent the problem is to increase the amount of virtualeD      memory allocated to the imapd process. This is stack dependent.J      Really though, the code needs to be heavily modified to not read each      message into memory first.f 								August 12 1996     GENERAL CHANGES: ================  & *   I've added two startup procedures:L       IMAPD_STARTUP.COM can  be called from system startup to initialize theK       logical names IMAPD uses. Note that this should be tailored for localh       use first!  J       PINE_STARTUP.COM can be called from system startup to initialize theJ       logical names PINE uses. Note that this should be tailored for local       use first!  N       Both files contain examples of the optional logicals. Tailor and comment       to personal taste. 								August 16, 1996f     Andy Harpert+ Kings College London,					September 26 1996n