rev |
line source |
yuuji@0
|
1 /* ========================================================================
|
yuuji@0
|
2 * Copyright 1988-2007 University of Washington
|
yuuji@0
|
3 *
|
yuuji@0
|
4 * Licensed under the Apache License, Version 2.0 (the "License");
|
yuuji@0
|
5 * you may not use this file except in compliance with the License.
|
yuuji@0
|
6 * You may obtain a copy of the License at
|
yuuji@0
|
7 *
|
yuuji@0
|
8 * http://www.apache.org/licenses/LICENSE-2.0
|
yuuji@0
|
9 *
|
yuuji@0
|
10 *
|
yuuji@0
|
11 * ========================================================================
|
yuuji@0
|
12 */
|
yuuji@0
|
13
|
yuuji@0
|
14 BUILD AND INSTALLATION NOTES
|
yuuji@0
|
15 Last Updated: 15 November 2007
|
yuuji@0
|
16
|
yuuji@0
|
17 Table of Contents:
|
yuuji@0
|
18 1. UNIX Build Notes
|
yuuji@0
|
19 2. UNIX Installation Notes
|
yuuji@0
|
20 3. Win32 Build Notes
|
yuuji@0
|
21 4. Win32 Installation Notes
|
yuuji@0
|
22 5. Inactive Ports (TOPS-20, VMS)
|
yuuji@0
|
23 6. Other ports (Macintosh, DOS/Win16, Windows CE, Amiga, OS/2)
|
yuuji@0
|
24
|
yuuji@0
|
25
|
yuuji@0
|
26 UNIX BUILD NOTES
|
yuuji@0
|
27
|
yuuji@0
|
28 The default build on many systems with IPv4 only. To build with IPv6,
|
yuuji@0
|
29 add "IP=6" to the make command line, e.g.
|
yuuji@0
|
30 make lnp IP=6
|
yuuji@0
|
31
|
yuuji@0
|
32 The default build is to build with SSL and disabling plaintext passwords
|
yuuji@0
|
33 unless SSL/TLS encryption is in effect (SSLTYPE=nopwd). This means that
|
yuuji@0
|
34 OpenSSL MUST be installed before building the IMAP toolkit. Please refer to
|
yuuji@0
|
35 the SSLBUILD file for more information.
|
yuuji@0
|
36
|
yuuji@0
|
37 To build without SSL, add "SSLTYPE=none" to the make command line.
|
yuuji@0
|
38 Note that doing so will produce an IMAP server which is NON-COMPLIANT with
|
yuuji@0
|
39 RFC 3501.
|
yuuji@0
|
40
|
yuuji@0
|
41 You must build through the top-level imap-2007/Makefile, which will run
|
yuuji@0
|
42 a "process" step the first time and create the imap-2007/c-client,
|
yuuji@0
|
43 imap-2007/ipopd, and imap-2007/imapd directories in which building actually
|
yuuji@0
|
44 takes place.
|
yuuji@0
|
45
|
yuuji@0
|
46 Before doing a make on UNIX, you should read imap-2007/Makefile and see
|
yuuji@0
|
47 if your system type is known. The various system types are three-letter codes.
|
yuuji@0
|
48 If your system type is known, then use this as the make option. After the
|
yuuji@0
|
49 first time you do a make, this option is remembered in a file called OSTYPE,
|
yuuji@0
|
50 so just typing "make" suffices.
|
yuuji@0
|
51
|
yuuji@0
|
52 For example, if you are using a more or less modern Linux system, your
|
yuuji@0
|
53 system type is probably one of the specific distribution types (such as lrh for
|
yuuji@0
|
54 RedHat). For more generic builds, try slx (shadow passwords only) or lnp (PAM).
|
yuuji@0
|
55 To build for RedHat, do:
|
yuuji@0
|
56 make lrh
|
yuuji@0
|
57
|
yuuji@0
|
58 There are other make options, described in imap-2007/src/osdep/Makefile.
|
yuuji@0
|
59
|
yuuji@0
|
60 It's probably best to see if an existing port will work on your system
|
yuuji@0
|
61 before inventing a new port. Try:
|
yuuji@0
|
62 sv4 generic SVR4, non-ANSI compiler
|
yuuji@0
|
63 a32 modern SVR4
|
yuuji@0
|
64 bsd basic 4.3 BSD, non-ANSI compiler
|
yuuji@0
|
65 bsf modern BSD
|
yuuji@0
|
66
|
yuuji@0
|
67 If you must invent a new port, you need to create an entry in
|
yuuji@0
|
68 imap-2007/Makefile and imap-2007/src/osdep/Makefile for your new port, as
|
yuuji@0
|
69 well as osdep/os_???.h and osdep/os_???.c files with the appropriate
|
yuuji@0
|
70 OS-dependent support for that system. You also need to determine which setup
|
yuuji@0
|
71 process to use. You should use the ua process unless you are sure that your
|
yuuji@0
|
72 compiler supports *ALL* aspects of ANSI C prototyping. Note that some
|
yuuji@0
|
73 compilers, such as Ultrix, support some aspects of ANSI C but not others;
|
yuuji@0
|
74 c-client really beats on the full prototyping capability of ANSI C so you
|
yuuji@0
|
75 have to use the non-ANSI source tree for such systems.
|
yuuji@0
|
76
|
yuuji@0
|
77 If you send a new port back to us, we will make it available for others
|
yuuji@0
|
78 who use your particular system type.
|
yuuji@0
|
79
|
yuuji@0
|
80 The mbox driver is now enabled by default. If the file "mbox" exists on
|
yuuji@0
|
81 the user's home directory and is in UNIX mailbox format, then when INBOX is
|
yuuji@0
|
82 opened this file will be selected as INBOX instead of the mail spool file.
|
yuuji@0
|
83 Messages will be automatically transferred from the mail spool file into the
|
yuuji@0
|
84 mbox file. To disable this behavior, delete "mbox" from the EXTRADRIVERS list
|
yuuji@0
|
85 in the top-level Makefile and rebuild.
|
yuuji@0
|
86
|
yuuji@0
|
87 WARNING: The SVR2 (sv2) port is *incomplete*. SVR2 does not appear to
|
yuuji@0
|
88 have any way to do ftruncate(), which is needed by the mbox, mbx, mmdf, mtx,
|
yuuji@0
|
89 tenex, and unix drivers.
|
yuuji@0
|
90
|
yuuji@0
|
91 UNIX INSTALLATION NOTES
|
yuuji@0
|
92
|
yuuji@0
|
93 Binaries from the build are:
|
yuuji@0
|
94 imap-2007/mtest/mtest c-client testbed program
|
yuuji@0
|
95 imap-2007/ipopd/ipop2d POP2 daemon
|
yuuji@0
|
96 imap-2007/ipopd/ipop3d POP3 daemon
|
yuuji@0
|
97 imap-2007/imapd/imapd IMAP4rev1 daemon
|
yuuji@0
|
98
|
yuuji@0
|
99 mtest is normally not used except by c-client developers.
|
yuuji@0
|
100
|
yuuji@0
|
101 STEP 1: [x]inetd setup
|
yuuji@0
|
102
|
yuuji@0
|
103 The ipop2d, ipop3d, and imapd daemons should be installed in a system
|
yuuji@0
|
104 daemon directory and invoked by a listener such as xinetd or inetd. In the
|
yuuji@0
|
105 following examples, /usr/local/etc is used).
|
yuuji@0
|
106
|
yuuji@0
|
107 STEP 1(A): xinetd-specific setup
|
yuuji@0
|
108
|
yuuji@0
|
109 If your system uses xinetd, the daemons are invoked by files in your
|
yuuji@0
|
110 /etc/xinetd.d directory with names corresponding to the service names (that
|
yuuji@0
|
111 is: imap, pop2, pop3). You will need to consult your local xinetd
|
yuuji@0
|
112 documentation to see what should go into these files. Here is a a sample
|
yuuji@0
|
113 /etc/xinetd.d/imap file:
|
yuuji@0
|
114
|
yuuji@0
|
115 service imap
|
yuuji@0
|
116 {
|
yuuji@0
|
117 disable = no
|
yuuji@0
|
118 socket_type = stream
|
yuuji@0
|
119 wait = no
|
yuuji@0
|
120 user = root
|
yuuji@0
|
121 server = /usr/local/etc/imapd
|
yuuji@0
|
122 groups = yes
|
yuuji@0
|
123 flags = REUSE IPv6
|
yuuji@0
|
124 }
|
yuuji@0
|
125
|
yuuji@0
|
126 STEP 1(B): inetd-specific setup
|
yuuji@0
|
127
|
yuuji@0
|
128 If your system still uses inetd, the daemons are invoked by your
|
yuuji@0
|
129 /etc/inetd.conf file with lines such as:
|
yuuji@0
|
130
|
yuuji@0
|
131 pop stream tcp nowait root /usr/local/etc/ipop2d ipop2d
|
yuuji@0
|
132 pop3 stream tcp nowait root /usr/local/etc/ipop3d ipop3d
|
yuuji@0
|
133 imap stream tcp nowait root /usr/local/etc/imapd imapd
|
yuuji@0
|
134
|
yuuji@0
|
135 Note that different variants of UNIX have different versions of inetd,
|
yuuji@0
|
136 so you should verify the precise form of these commands (for example, some
|
yuuji@0
|
137 versions of inetd do not require the "nowait").
|
yuuji@0
|
138
|
yuuji@0
|
139 IMPORTANT NOTE: inetd has a limit of how many new connections it will
|
yuuji@0
|
140 allow in a certain interval, and when this limit is exceeded, it shuts down
|
yuuji@0
|
141 the server. If you have anything beyond a small-scale server, you are
|
yuuji@0
|
142 probably going to run up against this limit. You'll know when it happens;
|
yuuji@0
|
143 your syslog will give the misleading message "imap/tcp server failing
|
yuuji@0
|
144 (looping), service terminated" and users will complain that IMAP service is
|
yuuji@0
|
145 unavailable for the next 10 minutes. Similarly with "pop3/tcp server
|
yuuji@0
|
146 failing"...
|
yuuji@0
|
147
|
yuuji@0
|
148 It must be emphasized that this is *NOT* a bug in the IMAP or POP
|
yuuji@0
|
149 servers, nor is it anything that I can "fix". It is an inetd problem, and
|
yuuji@0
|
150 the only way to fix it is to change inetd's behavior.
|
yuuji@0
|
151
|
yuuji@0
|
152 By default, the parameters of this limit are (from inetd.c source code):
|
yuuji@0
|
153
|
yuuji@0
|
154 #define TOOMANY 40 /* don't start more than TOOMANY */
|
yuuji@0
|
155 #define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
|
yuuji@0
|
156 #define RETRYTIME (60*10) /* retry after bind or server fail */
|
yuuji@0
|
157
|
yuuji@0
|
158 That is, no more than 40 connections (TOOMANY) in 60 seconds (CNT_INTL), and
|
yuuji@0
|
159 if exceeded, shut down the server for 10 minutes (RETRYTIME). This was a
|
yuuji@0
|
160 good setting in the 1980s ARPAnet, but is much too small today.
|
yuuji@0
|
161
|
yuuji@0
|
162 Some versions of inetd allow you to see a higher maximum in the
|
yuuji@0
|
163 /etc/inetd.conf file. Read "man inetd" and see if you see something like
|
yuuji@0
|
164 this in the text:
|
yuuji@0
|
165
|
yuuji@0
|
166 The wait/nowait entry is applicable to datagram sockets only [...]
|
yuuji@0
|
167 [...] The optional ``max'' suffix (separated from
|
yuuji@0
|
168 ``wait'' or ``nowait'' by a dot) specifies the maximum number of server
|
yuuji@0
|
169 instances that may be spawned from inetd within an interval of 60 sec-
|
yuuji@0
|
170 onds. When omitted, ``max'' defaults to 40.
|
yuuji@0
|
171
|
yuuji@0
|
172 If you see this, then edit the /etc/inetd.conf entry for imapd to be
|
yuuji@0
|
173 something like:
|
yuuji@0
|
174
|
yuuji@0
|
175 imap stream tcp nowait.100 root /usr/local/etc/imapd imapd
|
yuuji@0
|
176 (or, if you use TCP wrappers)
|
yuuji@0
|
177 imap stream tcp nowait.100 root /usr/local/etc/tcpd imapd
|
yuuji@0
|
178
|
yuuji@0
|
179 Otherwise, you'll need to edit the inetd source code to set TOOMANY to a
|
yuuji@0
|
180 higher value, then rebuild inetd.
|
yuuji@0
|
181
|
yuuji@0
|
182
|
yuuji@0
|
183 STEP 2: services setup
|
yuuji@0
|
184
|
yuuji@0
|
185 You may also have to edit your /etc/services (or Yellow Pages,
|
yuuji@0
|
186 NetInfo, etc. equivalent) to register these services, such as:
|
yuuji@0
|
187
|
yuuji@0
|
188 pop 109/tcp
|
yuuji@0
|
189 pop3 110/tcp
|
yuuji@0
|
190 imap 143/tcp
|
yuuji@0
|
191
|
yuuji@0
|
192
|
yuuji@0
|
193 STEP 3: PAM setup
|
yuuji@0
|
194
|
yuuji@0
|
195 If your system has PAM (Pluggable Authentication Modules -- most
|
yuuji@0
|
196 modern systems do) then you need to set up PAM authenticators for imap and
|
yuuji@0
|
197 pop. The correct file names are
|
yuuji@0
|
198 /etc/pam.d/imap
|
yuuji@0
|
199 and
|
yuuji@0
|
200 /etc/pam.d/pop
|
yuuji@0
|
201
|
yuuji@0
|
202 It probably works to copy your /etc/pam.d/ftpd file to the above two
|
yuuji@0
|
203 names.
|
yuuji@0
|
204
|
yuuji@0
|
205 Many people get these file names wrong, and then spend a lot of time
|
yuuji@0
|
206 trying to figure out why it doesn't work. Common mistakes are:
|
yuuji@0
|
207 /etc/pam.d/imapd
|
yuuji@0
|
208 /etc/pam.d/imap4
|
yuuji@0
|
209 /etc/pam.d/imap4rev1
|
yuuji@0
|
210 /etc/pam.d/ipop3d
|
yuuji@0
|
211 /etc/pam.d/pop3d
|
yuuji@0
|
212 /etc/pam.d/popd
|
yuuji@0
|
213 /etc/pam.d/pop3
|
yuuji@0
|
214
|
yuuji@0
|
215
|
yuuji@0
|
216 STEP 4: optional rimap setup
|
yuuji@0
|
217
|
yuuji@0
|
218 If you want to enable the rimap capability, which allows users with a
|
yuuji@0
|
219 suitable client and .rhosts file on the server to access IMAP services
|
yuuji@0
|
220 without transmitting her password in the clear over the network, you need
|
yuuji@0
|
221 to have /etc/rimapd as a link to the real copy of imapd. Assuming you have
|
yuuji@0
|
222 imapd installed on /usr/local/etc as above:
|
yuuji@0
|
223 % ln -s /usr/local/etc/imapd /etc/rimapd
|
yuuji@0
|
224
|
yuuji@0
|
225 Technical note: rimap works by having the client routine tcp_aopen()
|
yuuji@0
|
226 invoke `rsh _host_ exec /etc/rimapd' in an child process, and then returning
|
yuuji@0
|
227 pipes to that process' standard I/O instead of a TCP socket. You can set up
|
yuuji@0
|
228 `e-mail only accounts' by making the shell be something which accepts only
|
yuuji@0
|
229 that string and not ordinary UNIX shell commands.
|
yuuji@0
|
230
|
yuuji@0
|
231
|
yuuji@0
|
232 STEP 4: notes on privileges
|
yuuji@0
|
233
|
yuuji@0
|
234 Neither user "root", not any other UID 0 account, can log in via IMAP or
|
yuuji@0
|
235 POP. "That's not a bug, it's a feature!"
|
yuuji@0
|
236
|
yuuji@0
|
237 This software is designed to run without privileges. The mail spool
|
yuuji@0
|
238 directory must be protected 1777; that is, with world write and the sticky
|
yuuji@0
|
239 bit. Of course, mail *files* should be protected 600!
|
yuuji@0
|
240
|
yuuji@0
|
241 An alternative to having the mail spool directory protected 1777, at the
|
yuuji@0
|
242 cost of some performance, is to use the external "mlock" program, available
|
yuuji@0
|
243 as part of the imap-utils package. With mlock installed as /etc/mlock and
|
yuuji@0
|
244 setgid mail, the spool directory can be protected 775 with group mail.
|
yuuji@0
|
245 Please disregard this paragraph if you don't understand it COMPLETELY, and
|
yuuji@0
|
246 know EXACTLY what to do without question.
|
yuuji@0
|
247
|
yuuji@0
|
248
|
yuuji@0
|
249 STEP 5: SVR4 specific setup
|
yuuji@0
|
250
|
yuuji@0
|
251 There is one "gotcha" on System V Release 4 based systems such as
|
yuuji@0
|
252 Solaris. These systems do not use the standard UNIX mail format, but rather a
|
yuuji@0
|
253 variant of that format that depends upon a bogus "Content-Length:" message
|
yuuji@0
|
254 header. This is widely recognized to have been a terrible mistake. One
|
yuuji@0
|
255 symptom of the problem is that under certain circumstances, a message may get
|
yuuji@0
|
256 broken up into several messages. I'm also aware of security bugs caused by
|
yuuji@0
|
257 programs that foolishly trust "Content-Length:" headers with evil values.
|
yuuji@0
|
258
|
yuuji@0
|
259 To fix your system, edit your sendmail.cf to change the Mlocal line to
|
yuuji@0
|
260 have the -E flag. A typical entry will lool like:
|
yuuji@0
|
261
|
yuuji@0
|
262 Mlocal, P=/usr/lib/mail.local, F=flsSDFMmnPE, S=10, R=20, A=mail.local -d $u
|
yuuji@0
|
263
|
yuuji@0
|
264 WIN32 BUILD NOTES
|
yuuji@0
|
265
|
yuuji@0
|
266 Visual C++ 6.0 along with the current Microsoft Platform SDK
|
yuuji@0
|
267 (specifically the CORE SDK and the Internet Development SDK) is required
|
yuuji@0
|
268 to build on Windows 9x/Me/NT/2K/XP. If you do not have the Platform SDK
|
yuuji@0
|
269 installed or in your path properly, you'll get errors when building os_nt.c,
|
yuuji@0
|
270 typically in env_nt.c, ssl_nt.c, ssl_w2k.c, or gss_shim.c. You can download
|
yuuji@0
|
271 the Microsoft Platform SDK from Microsoft's web site.
|
yuuji@0
|
272
|
yuuji@0
|
273 There is also considerable debate about how new mail is to be snarfed.
|
yuuji@0
|
274 I am currently using something that seems to work with WinSMTP. Look at
|
yuuji@0
|
275 the definition of MAILFILE in imap-2007/src/osdep/nt/mailfile.h and at the
|
yuuji@0
|
276 sysinbox() function in imap-2007/src/osdep/nt/env_nt.c to see what's there
|
yuuji@0
|
277 now, so you have a clue about how to hack it.
|
yuuji@0
|
278
|
yuuji@0
|
279 To build under Windows 95/98/NT, connect to the imap-2007 directory
|
yuuji@0
|
280 and do:
|
yuuji@0
|
281 nmake -f makefile.nt
|
yuuji@0
|
282 The resulting binaries will support SSL if either schannel.dll or
|
yuuji@0
|
283 security.dll is installed in Windows, using the old, undocumented, SSL
|
yuuji@0
|
284 interfaces. You can also use this to build under Me/2000/XP, but it is
|
yuuji@0
|
285 not the preferred build on this platform.
|
yuuji@0
|
286
|
yuuji@0
|
287 To build with MIT Kerberos support, connect to the imap-2007 directory
|
yuuji@0
|
288 and do:
|
yuuji@0
|
289 nmake -f makefile.ntk
|
yuuji@0
|
290 The resulting binaries will support SSL if either schannel.dll or
|
yuuji@0
|
291 security.dll is installed in Windows, using the old, undocumented SSL
|
yuuji@0
|
292 interfaces. They will also support MIT Kerberos. Note, however, that
|
yuuji@0
|
293 these binaries will only run on systems which have the MIT Kerberos DLLs
|
yuuji@0
|
294 installed, and will not run otherwise.
|
yuuji@0
|
295
|
yuuji@0
|
296 To build under Windows Me/2000/XP, connect to the imap-2007 directory
|
yuuji@0
|
297 and do:
|
yuuji@0
|
298 nmake -f makefile.w2k
|
yuuji@0
|
299 The resulting binaries will support SSL and Microsoft Kerberos, using the
|
yuuji@0
|
300 official, documented, Microsoft interfaces. Note, however, that these
|
yuuji@0
|
301 binaries will not run under Windows 95, Windows 98, or Windows NT4.
|
yuuji@0
|
302
|
yuuji@0
|
303 WIN32 INSTALLATION NOTES
|
yuuji@0
|
304
|
yuuji@0
|
305 The resulting binaries will be:
|
yuuji@0
|
306 imap-2007\mtest\mtest.exe (testbed client)
|
yuuji@0
|
307 imap-2007\ipopd\ipop2d.exe POP2 server
|
yuuji@0
|
308 imap-2007\ipopd\ipop3d.exe POP3 server
|
yuuji@0
|
309 imap-2007\imapd\imapd.exe IMAP4rev1 server
|
yuuji@0
|
310
|
yuuji@0
|
311 These servers are stdio servers. I wrote a simple network listener
|
yuuji@0
|
312 for NT called inetlisn; currently it is available as:
|
yuuji@0
|
313 ftp://ftp.cac.washington.edu/mail/nt/inetlisn.tar
|
yuuji@0
|
314 To build this, use "nmake" after connecting to the inetlisn directory.
|
yuuji@0
|
315 inetlisn takes two arguments, the first being the port number and the second
|
yuuji@0
|
316 being the binary to run to serve a connection on that port, e.g.
|
yuuji@0
|
317 c:\bin\inetlisn 143 c:\mail_daemons\imapd
|
yuuji@0
|
318
|
yuuji@0
|
319 Note that NT imapd must be started as SYSTEM in order to be recognized as
|
yuuji@0
|
320 being "not logged in"; otherwise it will preauth as whatever user it is
|
yuuji@0
|
321 running as which is probably not what you want. One way to have it run as
|
yuuji@0
|
322 system is to have inetlisn run by an AT command, e.g. if the time now is
|
yuuji@0
|
323 2:05PM, try something like:
|
yuuji@0
|
324 AT 14:06 "c:\bin\inetlisn 143 c:\mail_daemons\imapd"
|
yuuji@0
|
325
|
yuuji@0
|
326 A more advanced network listener called wsinetd is available on:
|
yuuji@0
|
327 http://wsinetd.sourceforge.net
|
yuuji@0
|
328 It is based on inetlisn, and essentially is a "completed" version of inetlisn.
|
yuuji@0
|
329
|
yuuji@0
|
330 Bottom line: this is not plug-and-play. If you're not a hacker and/or
|
yuuji@0
|
331 are unwilling to invest the time to do some programming, you probably want to
|
yuuji@0
|
332 buy a commercial server product.
|
yuuji@0
|
333
|
yuuji@0
|
334 INACTIVE PORTS
|
yuuji@0
|
335
|
yuuji@0
|
336 The TOPS-20 and VMS ports were developed at one time or another, but are
|
yuuji@0
|
337 no longer actively developed. However, from time to time I test build both
|
yuuji@0
|
338 of these to make sure that they compile without errors and that mtest runs,
|
yuuji@0
|
339 and will continue doing so as long as I have access to systems running these
|
yuuji@0
|
340 operating systems.
|
yuuji@0
|
341
|
yuuji@0
|
342
|
yuuji@0
|
343 TOPS-20 BUILD NOTES
|
yuuji@0
|
344
|
yuuji@0
|
345 I have provided a c-client port for TOPS-20 systems, but you're on your
|
yuuji@0
|
346 own in terms of a nice TOPS-20 like main program. Maybe someday some nice
|
yuuji@0
|
347 person will try porting Pine to TOPS-20. This assumes the use of KCC 6, and
|
yuuji@0
|
348 probably will not build with other compilers or older versions of KCC.
|
yuuji@0
|
349
|
yuuji@0
|
350 You do not use imap-2007/Makefile under TOPS-20, nor do you build any
|
yuuji@0
|
351 components other than c-client and mtest. Merge the contents of
|
yuuji@0
|
352 imap-2007/src/c-client, imap-2007/src/charset, imap-2007/src/mtest, and
|
yuuji@0
|
353 imap-2007/src/osdep/tops-20 onto a single directory on TOPS-20 and build from
|
yuuji@0
|
354 that. The command:
|
yuuji@0
|
355 DO BUILD.CTL
|
yuuji@0
|
356 will build the sources. If you don't have MIC, then SUBMIT BUILD.CTL and let
|
yuuji@0
|
357 BATCON execute it.
|
yuuji@0
|
358
|
yuuji@0
|
359
|
yuuji@0
|
360 VMS BUILD NOTES
|
yuuji@0
|
361
|
yuuji@0
|
362 The VMS port has been tested with imap-2007, but as I am soon going
|
yuuji@0
|
363 to lose access to a VMS system I will no longer be able able to test and
|
yuuji@0
|
364 this port will be moved to the "other ports" category".
|
yuuji@0
|
365
|
yuuji@0
|
366 You do not use imap-2007/Makefile under VMS, nor do you build any
|
yuuji@0
|
367 components other than c-client and mtest. Merge the contents of
|
yuuji@0
|
368 imap-2007/src/c-client, imap-2007/src/charset, imap-2007/src/mtest, and
|
yuuji@0
|
369 imap-2007/src/osdep/vms onto a single directory on VMS and build from that.
|
yuuji@0
|
370 The command to build it is:
|
yuuji@0
|
371 @BUILD MULTINET
|
yuuji@0
|
372 or @BUILD NETLIB
|
yuuji@0
|
373 If you just do @BUILD it will build with dummy TCP code, and since only TCP
|
yuuji@0
|
374 based drivers are provided here this isn't too useful.
|
yuuji@0
|
375
|
yuuji@0
|
376 If you aren't on the Pacific coast of the US or Canada, you probably will
|
yuuji@0
|
377 need to change the wired-in timezone in the BUILD.COM file. Apparently, the
|
yuuji@0
|
378 wonderful VMS system that DEC loves so much doesn't maintain any concept of
|
yuuji@0
|
379 time zone; the VMS C compiler returns a null pointer from gmtime()!
|
yuuji@0
|
380
|
yuuji@0
|
381 Otherwise you're pretty much on your own here.
|
yuuji@0
|
382
|
yuuji@0
|
383 OTHER PORTS
|
yuuji@0
|
384
|
yuuji@0
|
385 The following ports were developed at one time or another, but are no
|
yuuji@0
|
386 longer actively developed or tested. It is not known if they still work or
|
yuuji@0
|
387 not.
|
yuuji@0
|
388
|
yuuji@0
|
389 Port Status
|
yuuji@0
|
390 ---- ------
|
yuuji@0
|
391 Macintosh Obsolete; Mac OS X uses UNIX port
|
yuuji@0
|
392 DOS/Win16 Obsolete; modern PCs use Win32 port
|
yuuji@0
|
393 Windows CE Never completed
|
yuuji@0
|
394 Amiga Unknown
|
yuuji@0
|
395 OS/2 Unknown
|
yuuji@0
|
396
|
yuuji@0
|
397 MACINTOSH BUILD NOTES
|
yuuji@0
|
398
|
yuuji@0
|
399 This port is for the old Mac OS system, not Mac OS X.
|
yuuji@0
|
400
|
yuuji@0
|
401 If you are building a Macintosh client, you will need MacTCP installed on
|
yuuji@0
|
402 your system as well as the MacTCP C includes and libraries.
|
yuuji@0
|
403
|
yuuji@0
|
404 You do not use imap-2007/Makefile on the Mac, nor do you build any
|
yuuji@0
|
405 components other than c-client and mtest. Merge the contents of
|
yuuji@0
|
406 imap-2007/src/c-client, imap-2007/src/charset, imap-2007/src/mtest, and
|
yuuji@0
|
407 imap-2007/src/osdep/mac onto a single directory on the Mac and build from
|
yuuji@0
|
408 that. mtext.sit.hqx is a THINK C project file and cute icon for building
|
yuuji@0
|
409 mtest, encoded with Binhex and StuffIt.
|
yuuji@0
|
410
|
yuuji@0
|
411 THINK C is a truly wretched product which help make me understand why
|
yuuji@0
|
412 Macintosh has lost most of its market share. Not only does it do cretinous
|
yuuji@0
|
413 things such as barf about a cast in front of an lvalue, it also limits the size
|
yuuji@0
|
414 of code *or* data in a single file to 32K! So much for having large character
|
yuuji@0
|
415 set tables. Symantec says that "MacOS requires it, break up your files into
|
yuuji@0
|
416 smaller pieces" yet somehow gcc under MachTen contrives to compile C programs
|
yuuji@0
|
417 without subjecting the programmer to this idiocy.
|
yuuji@0
|
418
|
yuuji@0
|
419 As a result of this, I found myself obliged to comment out the #includes
|
yuuji@0
|
420 of the East Asian character sets in utf8.c in order to get it to build. It's
|
yuuji@0
|
421 also necessary to break up some of the files, at least mail.c and imap4r1.c.
|
yuuji@0
|
422 Maybe you don't have to do this in CodeWarrior or whatever the new compiler is
|
yuuji@0
|
423 called, but I've pretty much given up on Macintosh.
|
yuuji@0
|
424
|
yuuji@0
|
425 If you use precompiled headers, you may get some compilation errors since
|
yuuji@0
|
426 some Apple symbols need to be redefined in order to get it to build under all
|
yuuji@0
|
427 versions of MacOS. Try turning off the precompiled headers (so it will
|
yuuji@0
|
428 re-read the .h files) and see if it builds any better.
|
yuuji@0
|
429
|
yuuji@0
|
430 If you use a Mac C compiler with 2-byte ints (such as THINK C's normal
|
yuuji@0
|
431 mode) you will need to fix some bugs in the MacTCP C includes and libraries to
|
yuuji@0
|
432 prevent it from generating bad code, since those MacTCP files violate Apple's
|
yuuji@0
|
433 standards of always using explicit shorts or longs, never ints. You could
|
yuuji@0
|
434 avoid this if you set 4-byte ints in THINK C; however, the ANSI and UNIX
|
yuuji@0
|
435 libraries in THINK C use 2-byte ints so you will also need to build 4-byte int
|
yuuji@0
|
436 versions of these. c-client itself is 2-byte int or 4-byte int clean; it can
|
yuuji@0
|
437 be used in either mode.
|
yuuji@0
|
438
|
yuuji@0
|
439 The most important bug in the MacTCP files that you need to fix is in the
|
yuuji@0
|
440 file AddressXlation.h, you need to change the definition of the rtnCode member
|
yuuji@0
|
441 of the hostInfo structure to be long instead of int. There are several other
|
yuuji@0
|
442 changes you need to make if you decide to compile dnr.c under THINK C instead
|
yuuji@0
|
443 of using the Apple-supplied object file; see me for details if you decide to
|
yuuji@0
|
444 undertake such an effort. This is fixed in newer versions from Apple.
|
yuuji@0
|
445
|
yuuji@0
|
446
|
yuuji@0
|
447 DOS/WIN16 BUILD NOTES
|
yuuji@0
|
448
|
yuuji@0
|
449 If you are building a DOS client, you will need a TCP/IP stack installed
|
yuuji@0
|
450 on your DOS system along with its development environment. The currently
|
yuuji@0
|
451 supported stacks are Beame & Whiteside, PC-NFS, Novell, PC/IP, Waterloo, and
|
yuuji@0
|
452 Winsock. mtest and a version of Pine called PC Pine run under DOS.
|
yuuji@0
|
453
|
yuuji@0
|
454 You do not use imap-2007/Makefile under DOS, nor do you build any
|
yuuji@0
|
455 components other than c-client and mtest. Merge the contents of
|
yuuji@0
|
456 imap-2007/src/c-client, imap-2007/src/charset, imap-2007/src/mtest, and
|
yuuji@0
|
457 imap-2007/src/osdep/dos onto a single directory on DOS and build from that.
|
yuuji@0
|
458 The MAKE command on DOS takes an argument identifying the TCP/IP stack in use.
|
yuuji@0
|
459 For example, do:
|
yuuji@0
|
460 MAKE MAKEFILE OS=WSK (or MAKE -F MAKEFILE OS=WSK)
|
yuuji@0
|
461 to build for Winsock.
|
yuuji@0
|
462
|
yuuji@0
|
463 If you write a program for DOS/Win16, you will probably have to write a
|
yuuji@0
|
464 replacement cache manager (look at mm_cache()) and otherwise disable most of
|
yuuji@0
|
465 c-client's caching. Even so, memory limitations will be an ongoing problem,
|
yuuji@0
|
466 particularly with DOS, and you will have some severe performance problems.
|
yuuji@0
|
467 It's a bit better on Win16, but in my opinion you are better off writing a
|
yuuji@0
|
468 32-bit program and telling your Win16 customers to upgrade to Windows 95 or at
|
yuuji@0
|
469 least install Win32s.
|
yuuji@0
|
470
|
yuuji@0
|
471
|
yuuji@0
|
472 WINDOWS CE BUILD NOTES
|
yuuji@0
|
473
|
yuuji@0
|
474 I build using Visual C++ 6.0 with the WCE extensions. The current code
|
yuuji@0
|
475 has SH3 wired in for the compiler building.
|
yuuji@0
|
476
|
yuuji@0
|
477 To build under NT, connect to the imap-2007 directory and do:
|
yuuji@0
|
478 nmake -f makefile.wce
|
yuuji@0
|
479
|
yuuji@0
|
480 The only binary produced is a cclient.lib file. I haven't gotten as far
|
yuuji@0
|
481 as building mtest on WCE, mainly because I don't have a stdlib library.
|
yuuji@0
|
482
|
yuuji@0
|
483
|
yuuji@0
|
484 AMIGA BUILD AND INSTALLATION NOTES
|
yuuji@0
|
485
|
yuuji@0
|
486 The Amiga port was contributed. Maybe the UNIX notes will help.
|
yuuji@0
|
487
|
yuuji@0
|
488
|
yuuji@0
|
489 OS2 BUILD NOTES
|
yuuji@0
|
490
|
yuuji@0
|
491 The OS2 port was contributed. Maybe the Win32 Build Notes will help.
|