home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / pine4.10.tar.gz / pine4.10.tar / pine4.10 / imap / docs / BUILD < prev    next >
Text File  |  1998-12-17  |  14KB  |  287 lines

  1.                    UNIX BUILD NOTES
  2.  
  3.      A change has been made from previous versions of the IMAP toolkit.
  4. There are no longer separate ANSI and non-ANSI source trees.  Nor is it
  5. possible to build directly on the source tree.  Instead, you *must* build
  6. through the top-level imap-4.5/Makefile, which will run a "process" step the
  7. first time and create the imap-4.5/c-client, imap-4.5/ipopd, and
  8. imap-4.5/imapd directories in which building actually takes place.
  9.  
  10.      Before doing a make on UNIX, you should read imap-4.5/Makefile and see if
  11. your system type is known.  The various system types are three-letter codes.
  12. If your system type is known, then use this as the make option.  After the
  13. first time you do a make, this option is remembered in a file called OSTYPE,
  14. so just typing "make" suffices.
  15.  
  16.      For example, if you are using a more or less modern Linux system, your
  17. system type is either slx (shadow passwords only) or lnp (PAM), and the
  18. appropriate command is:
  19.     make slx    (or make lnp)
  20.  
  21.      There are other make options, described in imap-4.5/src/osdep/Makefile.
  22.  
  23.      It's probably best to see if an existing port will work on your system
  24. before inventing a new port.  Try:
  25.     sv4        generic SVR4
  26.     a32        modern SVR4, SVR4 with gcc
  27.     bsd        basic 4.3 BSD
  28.     nxt, mct, gul    modern BSD, BSD with gcc
  29.  
  30.      If you must invent a new port, you need to create an entry in
  31. imap-4.5/Makefile and imap-4.5/src/osdep/Makefile for your new port, as well as
  32. osdep/os_???.h and osdep/os_???.c files with the appropriate OS-dependent
  33. support for that system.  You also need to determine which setup process to
  34. use.  You should use the ua process unless you are sure that your compiler
  35. supports *ALL* aspects of ANSI C prototyping.  Note that some compilers, such
  36. as Ultrix, support some aspects of ANSI C but not others; c-client really
  37. beats on the full prototyping capability of ANSI C so you have to use the
  38. non-ANSI source tree for such systems.
  39.  
  40.      If you send a new port back to us, we will make it available for others
  41. who use your particular system type.
  42.  
  43.      The mbox driver is now enabled by default.  If the file "mbox" exists on
  44. the user's home directory and is in UNIX mailbox format, then when INBOX is
  45. opened this file will be selected as INBOX instead of the mail spool file.
  46. Messages will be automatically transferred from the mail spool file into the
  47. mbox file.  To disable this behavior, delete "mbox" from the EXTRADRIVERS list
  48. in the top-level Makefile and rebuild.
  49.  
  50.      WARNING: The SVR2 (sv2) port is *incomplete*.  SVR2 does not appear to
  51. have any way to do ftruncate(), which is needed by the mbox, mbx, mmdf, mtx,
  52. tenex, and unix drivers.
  53.  
  54.                UNIX INSTALLATION NOTES
  55.  
  56.      Binaries from the build are:
  57.     imap-4.5/mtest/mtest        c-client testbed program
  58.     imap-4.5/ipopd/ipop2d        POP2 daemon
  59.     imap-4.5/ipopd/ipop3d        POP3 daemon
  60.     imap-4.5/imapd/imapd        IMAP4rev1 daemon
  61.  
  62.      mtest is normally not used except by c-client developers.  The ipop2d,
  63. ipop3d, and imapd daemons should be installed in a system daemon directory,
  64. and invoked by your /etc/inetd.conf file with lines such as:
  65.  
  66. pop    stream    tcp    nowait    root    /usr/local/etc/ipop2d    ipop2d
  67. pop3    stream    tcp    nowait    root    /usr/local/etc/ipop3d    ipop3d
  68. imap    stream    tcp    nowait    root    /usr/local/etc/imapd    imapd
  69.  
  70.      Note that different variants of UNIX have different versions of inetd,
  71. so you should verify the precise form of these commands (for example, some
  72. versions of inetd do not require the "nowait").
  73.  
  74.      You may also have to edit your /etc/services (or Yellow Pages,
  75. NetInfo, etc. equivalent) to register these services, such as:
  76.  
  77. pop        109/tcp
  78. pop3        110/tcp
  79. imap        143/tcp
  80.  
  81.      If you want to enable the rimap capability, which allows users with a
  82. suitable client and .rhosts file on the server to access IMAP services
  83. without transmitting her password in the clear over the network, you need
  84. to have /etc/rimapd as a link to the real copy of imapd.  Assuming you have
  85. imapd installed on /usr/local/etc as above:
  86.     % ln -s /usr/local/etc/imapd /etc/rimapd
  87.  
  88.      Technical note: rimap works by having the client routine tcp_aopen()
  89. invoke `rsh _host_ exec /etc/rimapd' in an child process, and then returning
  90. pipes to that process' standard I/O instead of a TCP socket.  You can set up
  91. `e-mail only accounts' by making the shell be something which accepts only
  92. that string and not ordinary UNIX shell commands.
  93.  
  94.      User "root" and any other UID 0 account can lot log in via IMAP
  95. or POP.  "That's not a bug, it's a feature!"
  96.  
  97.      This software is designed to run without privileges.  The mail spool
  98. directory should be protected 1777; that is, with world write and the sticky
  99. bit.  Of course, mail *files* should be protected 600!
  100.  
  101.  
  102.      There is one "gotcha" on System V Release 4 based systems such as
  103. Solaris.  These systems do not use the standard UNIX mail format, but rather a
  104. variant of that format that depends upon a bogus "Content-Length:" message
  105. header.  This is widely recognized to have been a terrible mistake.  One
  106. symptom of the problem is that under certain circumstances, a message may get
  107. broken up into several messages.  I'm also aware of security bugs caused by
  108. programs that foolishly trust "Content-Length:" headers with evil values.
  109.  
  110.     To fix your system, edit your sendmail.cf to change the Mlocal line to
  111. have the -E flag.  A typical entry will lool like:
  112.  
  113. Mlocal, P=/usr/lib/mail.local, F=flsSDFMmnPE, S=10, R=20, A=mail.local -d $u
  114.  
  115.              NT/WIN32 BUILD AND INSTALLATION NOTES
  116.  
  117.      I build using Visual C++ 5.0.  If you build with an earlier version of
  118. Visual C, you may need to install the Platform SDK (formerly called the Win32
  119. SDK) separately.  If you get errors while building os_nt.c that LogonUser() is
  120. undefined, it's a good bet that you don't have the Platform SDK installed
  121. and/or in your path properly.
  122.  
  123.      There is also considerable debate about how new mail is to be snarfed.
  124. I am currently using something that seems to work with WinSMTP.  Look at
  125. the definition of MAILFILE in imap-4.5/src/osdep/nt/mailfile.h and at the
  126. sysinbox() function in imap-4.5/src/osdep/nt/env_nt.c to see what's there
  127. now, so you have a clue about how to hack it.
  128.  
  129.      To build under NT, connect to the imap-4.5 directory and do:
  130.     nmake -f makefile.nt
  131. The resulting binaries will be:
  132.     imap-4.5\mtest\mtest.exe    (testbed client)
  133.     imap-4.5\ipopd\ipop2d.exe    POP2 server
  134.     imap-4.5\ipopd\ipop3d.exe    POP3 server
  135.     imap-4.5\imapd\imapd.exe    IMAP4rev1 server
  136.  
  137.      These servers are stdio servers.  I wrote a simple network listener
  138. for NT called inetlisn; currently it is available as:
  139.     ftp://ftp.cac.washington.edu/mail/nt/inetlisn.tar
  140. To build this, use "nmake" after connecting to the inetlisn directory.
  141. inetlisn takes two arguments, the first being the port number and the second
  142. being the binary to run to serve a connection on that port, e.g.
  143.     c:\bin\inetlisn 143 c:\mail_daemons\imapd
  144.  
  145.      Note that NT imapd must be started as SYSTEM in order to be recognized as
  146. being "not logged in"; otherwise it will preauth as whatever user it is
  147. running as which is probably not what you want.  One way to have it run as
  148. system is to have inetlisn run by an AT command, e.g. if the time now is
  149. 2:05PM, try something like:
  150.     AT 14:06 "c:\bin\inetlisn 143 c:\mail_daemons\imapd"
  151.  
  152.      Bottom line: this is not plug-and-play on NT.  If you're not a hacker
  153. and/or are unwilling to invest the time to do some programming, you probably
  154. want to buy a commercial server for NT.
  155.  
  156.                  DOS/WIN16 BUILD NOTES
  157.  
  158.      If you are building a DOS client, you will need a TCP/IP stack installed
  159. on your DOS system along with its development environment.  The currently
  160. supported stacks are Beame & Whiteside, PC-NFS, Novell, PC/IP, Waterloo, and
  161. Winsock.  mtest and a version of Pine called PC Pine run under DOS.
  162.  
  163.       You do not use imap-4.5/Makefile under DOS, nor do you build any
  164. components other than c-client and mtest.  Merge the contents of
  165. imap-4.5/src/c-client, imap-4.5/src/charset, imap-4.5/src/mtest, and
  166. imap-4.5/src/osdep/dos onto a single directory on DOS and build from that.  The
  167. MAKE command on DOS takes an argument identifying the TCP/IP stack in use.  For
  168. example, do:
  169.     MAKE MAKEFILE OS=WSK   (or MAKE -F MAKEFILE OS=WSK)
  170. to build for Winsock.  
  171.  
  172.      If you write a program for DOS/Win16, you will probably have to write a
  173. replacement cache manager (look at mm_cache()) and otherwise disable most of
  174. c-client's caching.  Even so, memory limitations will be an ongoing problem,
  175. particularly with DOS, and you will have some severe performance problems.
  176. It's a bit better on Win16, but in my opinion you are better off writing a
  177. 32-bit program and telling your Win16 customers to upgrade to Windows 95 or at
  178. least install Win32s.
  179.  
  180.                  MACINTOSH BUILD NOTES
  181.  
  182.      If you are building a Macintosh client, you will need MacTCP installed on
  183. your system as well as the MacTCP C includes and libraries.
  184.  
  185.      You do not use imap-4.5/Makefile on the Mac, nor do you build any
  186. components other than c-client and mtest.  Merge the contents of
  187. imap-4.5/src/c-client, imap-4.5/src/charset, imap-4.5/src/mtest, and
  188. imap-4.5/src/osdep/mac onto a single directory on the Mac and build from that.
  189. mtext.sit.hqx is a THINK C project file and cute icon for building mtest,
  190. encoded with Binhex and StuffIt.
  191.  
  192.      THINK C is a truly wretched product which help make me understand why
  193. Macintosh has lost most of its market share.  Not only does it do cretinous
  194. things such as barf about a cast in front of an lvalue, it also limits the size
  195. of code *or* data in a single file to 32K!  So much for having large character
  196. set tables.  Symantec says that "MacOS requires it, break up your files into
  197. smaller pieces" yet somehow gcc under MachTen contrives to compile C programs
  198. without subjecting the programmer to this idiocy.
  199.  
  200.      As a result of this, I found myself obliged to comment out the #includes
  201. of the East Asian character sets in utf8.c in order to get it to build.  It's
  202. also necessary to break up some of the files, at least mail.c and imap4r1.c.
  203. Maybe you don't have to do this in CodeWarrior or whatever the new compiler is
  204. called, but I've pretty much given up on Macintosh.
  205.  
  206.      If you use precompiled headers, you may get some compilation errors since
  207. some Apple symbols need to be redefined in order to get it to build under all
  208. versions of MacOS.  Try turning off the precompiled headers (so it will
  209. re-read the .h files) and see if it builds any better.
  210.  
  211.      If you use a Mac C compiler with 2-byte ints (such as THINK C's normal
  212. mode) you will need to fix some bugs in the MacTCP C includes and libraries to
  213. prevent it from generating bad code, since those MacTCP files violate Apple's
  214. standards of always using explicit shorts or longs, never ints.  You could
  215. avoid this if you set 4-byte ints in THINK C; however, the ANSI and UNIX
  216. libraries in THINK C use 2-byte ints so you will also need to build 4-byte int
  217. versions of these.  c-client itself is 2-byte int or 4-byte int clean; it can
  218. be used in either mode.
  219.  
  220.      The most important bug in the MacTCP files that you need to fix is in the
  221. file AddressXlation.h, you need to change the definition of the rtnCode member
  222. of the hostInfo structure to be long instead of int.  There are several other
  223. changes you need to make if you decide to compile dnr.c under THINK C instead
  224. of using the Apple-supplied object file; see me for details if you decide to
  225. undertake such an effort.  This is fixed in newer versions from Apple.
  226.  
  227.                  TOPS-20 BUILD NOTES
  228.  
  229.      I have provided a c-client port for TOPS-20 systems, but you're on your
  230. own in terms of a nice TOPS-20 like main program.  Maybe someday some nice
  231. person will try porting Pine to TOPS-20.  I recently built mtest on TOPS-20
  232. (thank you, XKL!!), so the sources are known to compile with the ANSI C
  233. version of KCC.
  234.  
  235.      You do not use imap-4.5/Makefile under TOPS-20, nor do you build any
  236. components other than c-client and mtest.  Merge the contents of
  237. imap-4.5/src/c-client, imap-4.5/src/charset, imap-4.5/src/mtest, and
  238. imap-4.5/src/osdep/tops-20 onto a single directory on TOPS-20 and build from
  239. that.  The command:
  240.     DO BUILD.CTL
  241. will build the sources.  If you don't have MIC, then SUBMIT BUILD.CTL and let
  242. BATCON execute it.
  243.  
  244.      KCC loves to give lots of diagnostics about unused parameters.  That's
  245. perfectly alright; just ignore them.
  246.  
  247.                    VMS BUILD NOTES
  248.  
  249.       You do not use imap-4.5/Makefile under VMS, nor do you build any
  250. components other than c-client and mtest.  Merge the contents of
  251. imap-4.5/src/c-client, imap-4.5/src/charset, imap-4.5/src/mtest, and
  252. imap-4.5/src/osdep/vms onto a single directory on VMS and build from that.  The
  253. command to build it is:
  254.     @BUILD MULTINET
  255. or    @BUILD NETLIB
  256. If you just do @BUILD it will build with dummy TCP code, and since only TCP
  257. based drivers are provided here this isn't too useful.
  258.  
  259.      If you aren't on the Pacific coast of the US or Canada, you probably will
  260. need to change the wired-in timezone in the BUILD.COM file.  Apparently, the
  261. wonderful VMS system that DEC loves so much doesn't maintain any concept of
  262. time zone; the VMS C compiler returns a null pointer from gmtime()!
  263.  
  264.      Otherwise you're pretty much on your own here.
  265.  
  266.               AMIGA BUILD AND INSTALLATION NOTES
  267.  
  268.      See the UNIX build notes.  I can't tell you much more than that, since
  269. the Amiga code was contributed.
  270.  
  271.  
  272.                    WCE BUILD NOTES
  273.  
  274.      I build using Visual C++ 5.0 with the WCE extensions.  The current code
  275. has SH3 wired in for the compiler building.
  276.  
  277.      To build under NT, connect to the imap-4.5 directory and do:
  278.     nmake -f makefile.wce
  279.  
  280.      The only binary produced is a cclient.lib file.  I haven't gotten as far
  281. as building mtest on WCE, mainly because I don't have a stdlib library.
  282.  
  283.  
  284.                    OS2 BUILD NOTES
  285.  
  286.      The OS2 port is incomplete.  There are no plans to continue work on it.
  287.