home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf43_docs / administrators / building next >
Encoding:
Text File  |  1990-02-28  |  52.9 KB  |  1,351 lines

  1. .\".AU
  2. .\"Douglas P. Kingston III
  3. .\".AI
  4. .\"Ballistic Research Laboratory
  5. .\"USA AMCCOM
  6. .\"Aberdeen Proving Ground, Maryland.  21005
  7. .\"(301) 278-6651
  8. .NH 1
  9. Building the \*M System
  10. .NH 2
  11. Organization of Source
  12. .PP
  13. The \*M sources are arranged in a hierarchical directory
  14. structure under a directory such as /usr/src/local/mmdf.
  15. The major directories at the top level are:
  16. .IP \fBconf\fR 10
  17. The \fBconf\fR directory contains subdirectories for each of several sample
  18. sites, for example, csnet-relay or okstate.  Each of these subdirectories
  19. contains most of the files necessary for compile-time
  20. configuration of the \*M system.
  21. .IP \fBdoc\fR 10
  22. The \fBdoc\fR directory contains the NROFF/TROFF source for all \*M documents
  23. except manual pages.
  24. .IP \fBh\fR 10
  25. Include files used by MMDFII.
  26. .IP \fBlib\fR 10
  27. The \fBlib\fR directory contains the source to the \*M library
  28. (libmmdf.a) which is used in compiling all the other \*M programs.
  29. There are five subdirectories in the \fBlib\fR directory: \fBaddr\fR,
  30. \fBdial\fR, \fBmmdf\fR, \fBtable\fR, and \fButil\fR.
  31. .IP \fBlib/addr\fR 15
  32. contains the address parser.
  33. .IP \fBlib/dial\fR 15
  34. contains the PhoneNet dial in/out package.
  35. .IP \fBlib/mmdf\fR 15
  36. contains \*M specific shared routines.
  37. .IP \fBlib/table\fR 15
  38. contains the table lookup functions.
  39. .IP \fBlib/util\fR 15
  40. contains a variety of utility and system interface routines.
  41. .IP \fBlibndir\fR 10
  42. The ``new'' directory access routines for non-Berkeley Unix systems.
  43. This directory may not be included on some distributions (e.g. 4.3BSD
  44. where it is standard).
  45. .IP \fBlibz\fP 10
  46. The ``new'' timezone routines from 4.3BSD-tahoe.
  47. This gives a more rational way of describing strange timezones
  48. and also gives a ``better'' programmer interface.
  49. .IP \fBman\fR 10
  50. The \fBman\fR directory contains the source for all the \*M manual pages.
  51. .IP \fBmh\fR 10
  52. The sources for the MH system. (Not discussed here; see the online
  53. documentation.  May not be included in all distributions.)
  54. .IP \fBsamples\fR 10
  55. The \fRsamples\fR directory contains subdirectories for each of several 
  56. sample sites.  Each site typically contains the runtime-tailoring file
  57. (mmdftailor) and other files such as tables, dialling scripts and 
  58. helpful shell scripts.  Large tables will have been truncated
  59. to a representative set of entries.
  60. .IP \fBsrc\fR 10
  61. The \fBsrc\fR directory contains the source to all \*M programs
  62. except for the mail posting and mail reading user agent programs
  63. (e.g. \fImsg\fR, \fIsend\fR, and \fIv6mail\fR).  Within this directory is 
  64. a subdirectory
  65. for each major program or program set, and one directory called
  66. \fBtools\fR for
  67. miscellaneous programs.
  68. .IP \fBtestmmdf\fR 10
  69. The \fBtestmmdf\fR directory is a complete \*M operational subtree that
  70. can be used to install a test version of \*M in parallel with
  71. another mail system (even another \*M) on the same system.
  72. It also serves as a model of what
  73. the \*M subtree should look like.
  74. .IP \fBuip\fR 10
  75. The \fBuip\fR directory contains user interface routines, primarily \fImsg\fR
  76. and \fIsend\fR.  The subdirectory \fBother\fR contains a number of other user
  77. programs for dealing with mail.
  78. The subdirectory \fBucbmail\fR contains a recent version of Berkeley's
  79. Mail program.  It has been modified to interface well to \*M.
  80. .PP
  81. The source directories are set up to use a hierarchical set of Makefiles.
  82. The directories \fBlib, src\fR, and \fBuip\fR contain master Makefiles.
  83. In each subdirectory is a file called Makefile.real and a program
  84. (shellfile) called
  85. .I gen.
  86. The                                            
  87. .I gen
  88. program calls
  89. .I make
  90. with two parts, Makefile.real and a ``common makefile'' called
  91. Makefile.com that is contained in a parent directory.
  92. Makefile.com contains configuration specific information such
  93. as compiler flags, installation directory names, #ifdef flags,
  94. and the dependency generation code (for ``make depend'').
  95. .PP
  96. There is a strict convention for the format of #include lines
  97. in \*M source files.  If you fail to follow the convention,
  98. you will break ``make depend'' and thereby your makefile
  99. dependencies.
  100. The format is as follows:
  101. .sp
  102. .ne 10
  103. #include <file.h>
  104. .br
  105. .ti 10
  106. For standard include files in /usr/include
  107. .br
  108. #include <subdir/file.h>
  109. .br
  110. .ti 10
  111. For files in subdirectories of /usr/include.
  112. .br
  113. #include ``file.h''
  114. .br
  115. .ti 10
  116. For files in the \*M header file directory (typically ../../h).
  117. .br
  118. #include ``/fullpath/file.h''
  119. .br
  120. .ti 10
  121. For specifying a particular header file by full path name.
  122. .br
  123. #include ``./file.h''
  124. .br
  125. .ti 10
  126. For a file in the current directory.
  127. .PP
  128. There is a problem with the current ``make depend'' methodology
  129. on systems that do not have compiler support for it.
  130. Currently at least 4.3BSD, Ultrix v3, and System V r3.2 have this support. 
  131. As a result, there are two version of the ``depend'' actions
  132. in Makefile.com.
  133. On systems that do not have compiler support,
  134. due to the way the dependencies are generated, there is no
  135. preliminary processing of the conditional compile lines.  Files
  136. that conditionally include either one or another file appear
  137. to the ``make depend'' code as though they included both files.
  138. This problem does not show up until you are running the
  139. .I make 
  140. program for the first time.
  141. .I Make
  142. will complain about not being able to make
  143. some header file that does not exist on your system.
  144. The remedy is simply to edit the makefile that broke and 
  145. delete the reference to the file that doesn't exist.
  146. You can then run 
  147. .I make
  148. again.  
  149. .PP
  150. We regret that this process is necessary, but at least
  151. it only has to be done once per site.
  152. Luckily there are only a few files (maybe 5) that are affected.
  153. Look out for the following problem files:  termio.h, ioctl.h,
  154. and fcntl.h.
  155. .NH 2
  156. Getting Ready
  157. .PP
  158. \*M requires a significant amount of space for the
  159. sources, documentation, and binaries
  160. (about 8 to 10 megabytes for a full distribution).
  161. The 4.3BSD distribution will take about 3 megabytes for the basic
  162. sources, and documentation.
  163. The running system will consume much less, about 2 megabytes of
  164. installed binaries and tables, and you can remove your old mail programs.
  165. You will need superuser privileges.
  166. The distribution you receive may inadvertently contain old binaries
  167. or libraries despite the best efforts of those preparing the distribution.
  168. It is recommended that you do a ``make clean'' in the
  169. directories
  170. .B lib,
  171. .B src,
  172. and
  173. .B uip
  174. before starting.
  175. You can accomplish this by running ``make clean'' from the top directory of
  176. the MMDF source tree (the parent of \fBlib\fR, \fBsrc\fR, and \fBuip\fR).
  177. This will give
  178. you a clean slate upon which to base your compile.
  179. .XX
  180. Do a ``make clean'' in the MMDF root directory.
  181. .NH 2
  182. System Compile-Time Configuration and Generation
  183. .PP
  184. The configuration directory, 
  185. .B conf,
  186. contains one directory for
  187. each site being supported that has compiled-in differences.
  188. Many sites may share one compile-time configuration by using
  189. the run-time tailoring facility to specify site-specific information.
  190. There is also a shell program called
  191. .I sitesetup
  192. that is used to install a specified configuration.
  193. The test configuration is set up to run out of the \fBtestmmdf\fR
  194. subdirectory and should only be used for testing.
  195. You will base your running configuration 
  196. on an existing
  197. system with possibly extensive changes.
  198. The following site configurations are available for copying:
  199. .sp
  200. .IP bbn 12
  201. A 4.3BSD Vax Internet host using domain servers for table lookup.
  202. .IP 4.3vax 12
  203. A 4.3BSD Vax running a minimal set of tables and using the
  204. badusers and badhosts channels to pass off unknown addresses
  205. to MCVAX.UUCP (haring.uucp).
  206. .IP csnet-relay 12
  207. A very large PhoneNet relay host with Internet access.
  208. .IP okstate 12
  209. A V7 Perkin-Elmer host on CSNET PhoneNet, UUCP and a local network.
  210. .IP uclvax2 12
  211. An Internet host with links to various UK networks; illustrates
  212. authorization on a per-user basis.
  213. .IP vgr 12
  214. A 4.2BSD Internet host.
  215. .IP vu44 12
  216. A System V Release 0 based 68000 workstation connected by UUCP to a smart
  217. mail gateway.
  218. .PP
  219. These configurations are supplied as examples and templates for building
  220. your own configuration.
  221. Do not modify the contents of any of these configurations.
  222. You will make your own site's directory in the \fBconf\fR directory.
  223. .XX
  224. Make a directory named after your site in the \fBconf\fR directory.
  225. .XX
  226. Copy the contents of some other system's directory into your directory.
  227. .NH 2
  228. Compile-Time Tailoring conf/\fIsite\fB/conf.h
  229. .XX
  230. Edit the file conf.h
  231. .PP
  232. The constants at the top of this file should not need tailoring.
  233. Possible exceptions might be NUMCHANS, NUMTABLES, and NUMDOMAINS.
  234. These limit the number of domains, channels, and
  235. tables (channel, domain, alias, and others),
  236. The numbers supplied should only
  237. need to be increased on a site acting as a major relay site
  238. with a large number of channels.
  239. The system will complain in the logfiles if the limits are reached.
  240. The ``DL_'' definitions control certain basic
  241. properties of the dial package used by phone and slave programs
  242. for PhoneNet.
  243. They should probably not be modified.
  244. If the dial package is not used, they are ignored.
  245. .PP
  246. The section in conf.h entitled ``JNTMAIL Tailoring'' contains #defines
  247. that are useful
  248. primarily in the United Kingdom and gateways to it, like UCL-CS.
  249. The JNTMAIL definition is used to enable code that is used on the JNT
  250. mail channel.  The BOTHEND definition enables \*M to parse domain
  251. names in either ``little-endian'' or ``big-endian''
  252. format.  ``Little-endian'' is the
  253. standard format in the DARPA Internet and is the format defined in
  254. RFC-822.  ``Big-endian'' is used in the UK community, and perhaps elsewhere.
  255. VIATRACE causes the relaying timestamp to conform to
  256. UK standards by starting with ``Via:'' instead
  257. of the Internet standard ``Received:''.
  258. Despite the best efforts of some British, this remnant remains
  259. from the days of RFC733.
  260. Non-JNT systems will leave JNTMAIL, BOTHEND
  261. and VIATRACE undefined.
  262. .PP
  263. The next section of conf.h contains the #include lines necessary to include
  264. the file time.h and dir.h (as is used with the libndir package).
  265. The former is typically /usr/include/time.h or /usr/include/sys/time.h
  266. (a.k.a. <time.h> or <sys/time.h>).
  267. The latter
  268. may be called ndir.h on some systems.  This is typically
  269. /usr/include/dir.h, /usr/include/dirent.h or /usr/include/ndir.h
  270. (a.k.a. <dir.h>, <dirent.h> or <ndir.h>).
  271. There are two #define lines here, define one.
  272. One is for systems which use the ``struct dirent'' style espoused by the
  273. standards organizations and currently in use in SysVr3,
  274. this is S5DIRENT.
  275. The other is for systems using the ``struct direct'' style espoused
  276. by the BSD distribution,
  277. this is BSDDIRECT.
  278. These #defines select for differences in both name and meaning
  279. of the two styles.
  280. To tell the difference, 
  281. S5DIRECT uses ``(struct dirent *)->d_reclen''
  282. as the length of the directory entry,
  283. and BSDDIRECT uses ``(struct direct *)->d_namlen''
  284. as the length of the name-string.
  285. .XX
  286. Check where your time.h and dir.h are and fix the #includes, if necessary.
  287. .PP
  288. The final section of conf.h is used to define a macro that will identify
  289. privileged UIDs that are likely to be submitting mail on behalf of other.
  290. We have defined it as a parameterized
  291. macro in the distribution, but you could undefine the macro
  292. and write a real function called PRIV_USER() if necessary.
  293. When used as a macro, it is assumed that the global variable
  294. .I effecid
  295. will contain the UID of submit.  Currently only submit uses
  296. this macro/function.
  297. The uid for \*M (effecid) is determined at runtime.
  298. .XX
  299. Check that the #define has reasonable UID values (root, daemon?, and effecid).
  300. .NH 2
  301. Compile-Time Tailoring conf/\fIsite\fB/conf.c
  302. .XX
  303. Edit the file conf.c
  304. .NH 3
  305. Public Names
  306. .PP
  307. The first section is PUBLIC NAMES.  The string
  308. .I mmtailor
  309. is the location of your runtime tailoring file.  This is typically
  310. .I /usr/mmdf/mmdftailor.
  311. .PP
  312. The
  313. .I locname
  314. string should be set to your host name without the domain portion.
  315. For example if your host is SPOOK.BRL.MIL, then your locname
  316. should be ``SPOOK'', and your
  317. .I locdomain
  318. should be ``BRL.MIL''.
  319. Case is not important, but it will be preserved in some cases, so
  320. enter case as you would like to see it.  We prefer to use all caps.
  321. Also note there are two external variables,
  322. locfullname and locfullmachine,
  323. which are the concatenations of
  324. \fIlocname.locdomain\fP and \fIlocmachine.locname.locdomain\fP
  325. respectively (\fIlocmachine\fP is documented below).
  326. Neither of these variables are configurable.
  327. .I Sitesignature
  328. should not be altered as it is an indication of which mail system you
  329. are running.
  330. .I Mmdflogin
  331. is the login id that you have chosen to give to the \*M mail system.
  332. This is usually ``mmdf''.
  333. The
  334. .I supportaddr
  335. string gives the address that the mailsystem will send problem
  336. notifications to, and this is also the address that will be placed in
  337. the from field of messages generated by the mail system.  This address
  338. should reach the person or persons maintaining the mail system.
  339. Normally, it is defined as ``Postmaster@\fIlocname.locdomain\fR'', which is, in 
  340. turn, an alias for the appropriate systems people.
  341. .XX
  342. Configure \fIlocname, locdomain, mmdflogin\fR, and \fIsupportaddr\fR.
  343. .NH 3
  344. \*M Directories Locations
  345. .PP
  346. The next section, DEFAULT BASE DIRECTORIES, defines the location of 
  347. certain \*M directories.
  348. The comments are fairly clear about the use of most of them.
  349. The locking directory will only be used if the link based locking
  350. mechanism is used.  If it is, you should make sure this directory
  351. is cleared at each reboot.  If you use MH, be sure to set "lockstyle: 2" and
  352. set "lockldir: LOCKDIR" in MH's mtstailor file where LOCKDIR is the same
  353. directory you choose for the MMDF locking directory (below).
  354. .I Tbldbm
  355. is not actually a directory but is instead the basename of the
  356. DBM style database used by \*M to store tables for fast lookup.
  357. See the manual section \fIdbm(3)\fR for more information.  Systems using
  358. System III or System V will have to obtain this code from another
  359. Unix site, preferably a 4.2BSD site.
  360. The original V7 version of the DBM library only provides
  361. for the files to be opened read/write.
  362. If you have this version you will need
  363. to modify it to try opening the files readonly if read/write
  364. access fails.
  365. The typical values are as follows:
  366. .sp
  367. .in +1i
  368. .KS
  369. .TS
  370. l l .
  371. \fIcmddfldir\fR    /usr/mmdf
  372. \fIlogdfldir\fR    /usr/mmdf/log
  373. \fIphsdfldir\fR    /usr/mmdf/log/phase
  374. \fItbldfldir\fR    /usr/mmdf/table
  375. \fItbldbm\fR    /usr/mmdf/table/mmdfdbm
  376. \fIquedfldir\fR    /usr/mmdf/lock/home
  377. \fIchndfldir\fR    /usr/mmdf/chans
  378. \fIlckdfldir\fR    /tmp/mmdf
  379. .TE
  380. .KE
  381. .sp
  382. .in -1i
  383. .XX
  384. Configure directories, if necessary (unlikely).
  385. .NH 3
  386. Default Logging Parameters
  387. .PP
  388. The next section, DEFAULT LOG LOCATIONS & SETTINGS, controls the main
  389. logging facilities of the \*M system.
  390. There should not be any tailoring necessary here.
  391. The
  392. .I mlogloc
  393. and
  394. .I chlogloc
  395. variables are somewhat magic, in that if they are simple file names,
  396. then they are opened in the default logging directory (\fBlogdfldir\fR
  397. above).  If they are full pathnames, then they will be opened as
  398. specified.
  399. They must exist for any logging to take place.  If they do not exist,
  400. then no logging will take place.
  401. Another possible tailorable item is the default logging level, which
  402. is the third element of the ll_struct structure.  See the explanation
  403. of the ll_struct structure in llog(3)
  404. before altering.  This is normally tailored from
  405. the runtime configuration file.
  406. .XX
  407. Adjust \fImlogloc\fR and \fIchlogloc\fR, if necessary.
  408. .NH 3
  409. Message Queue Parameters
  410. .PP
  411. The section MESSAGE QUEUE SUBSTRUCTURE
  412. has only two tailorable entries,
  413. .I warntime
  414. and
  415. .I failtime.
  416. .I Warntime
  417. is the minimum number of hours before \*M will send a
  418. warning letter indicating that a message has not yet been delivered.
  419. After
  420. .I failtime
  421. hours since submission, a message is eligible to be
  422. returned as undeliverable.  Actual timing of warnings and returns will 
  423. depend on how frequently the 
  424. .I cleanque
  425. program is run.
  426. Neither of these actions will occur unless the program is run.
  427. It is suggested that
  428. .I warntime
  429. be at least 1/2 day and more like 2 or
  430. 3 if you are connected to a large network (e.g. the Internet) where
  431. there is a significant chance that a host will be down for a couple
  432. of days on occasion.
  433. .I Failtime
  434. should be at least 3 days, especially on
  435. large networks.  You should be able to take a machine being down over
  436. a long weekend without returning mail.
  437. .XX
  438. Choose the \fIwarntime\fR and \fIfailtime\fR values (in hours).
  439. .NH 3
  440. Command Names and Locations 
  441. .PP
  442. The section COMMAND NAMES & LOCATIONS should only need tailoring if
  443. you do change the names of the programs mentioned
  444. (something you do at your own risk).
  445. .NH 3
  446. Submit Parameters
  447. .PP
  448. The value
  449. .I maxhops
  450. in the section SUBMIT TAILORING is the maximum number of times a message
  451. may be relayed as indicated by the number of Received: lines before
  452. the message is considered dead due to looping.  It is possible that
  453. this value may have to be made significantly larger in the future
  454. to handle mail that has passed to us through numerous RFC-822 UUCP hosts.
  455. For now, we have used the value 20.
  456. .PP
  457. The \fIlnk_listsize\fR value
  458. specifies the maximum number of addresses in a message
  459. before it is considered to have a ``big'' list.
  460. If there are more than the maximum number of addresses, then \*M
  461. will not send a warning message for waiting mail and will only
  462. return a ``citation'' for failed mail.  A ``citation'' consists
  463. of the entire header plus the first few lines of the message
  464. body.
  465. .PP
  466. The \fImgt_addid\fR will cause \fIsubmit\fR to guarantee the existence
  467. of a Message-ID: line on every message entering the \*M system.
  468. A Message-ID will only be added if it is missing.
  469. .XX
  470. Set the value of \fImaxhops\fR, \fIlnk_listsize\fR, and \fImgt_addid\fR.
  471. .NH 3
  472. Deliver Parameters
  473. .PP
  474. The section DELIVER TAILORING controls the deliver program.
  475. .I Maxqueue
  476. is the maximum number of messages that will be tolerated before deliver
  477. stops sorting the mail queue before delivering.  If there are more than
  478. .I maxqueue
  479. messages in the channel's queue,
  480. deliver will process the queue in the order it
  481. is read which will probably not be the order in which messages
  482. were queued.
  483. A suggested value is 300.  This value can be larger if you do not
  484. have any dial-in sites that might time out waiting for you to find a
  485. message in pickup mode.
  486. .I Mailsleep
  487. is the number of seconds that the daemon sleeps between sweeps on the
  488. mail queues looking for messages to deliver.  The value is typically
  489. 600 (10 minutes).
  490. .XX
  491. Set the values of \fImaxqueue\fR and \fImailsleep\fR.
  492. .NH 3
  493. Address Transformation
  494. .PP
  495. The section ADDRESS TRANSFORMATION should not be altered.  This section
  496. was used to override the default header munging behavior.
  497. It has been superceded by a more general mechanism, but this
  498. table is kept in case the capability is needed again in some
  499. special situation.  It cannot be runtime tailored.
  500. .NH 3
  501. Local Delivery Options
  502. .PP
  503. The next section, LOCAL DELIVERY TAILORING,
  504. has several variables that can be tuned to local requirements.
  505. The
  506. .I dlvfile
  507. variable is the name of the maildelivery control file (see the manual
  508. section \fImaildelivery(5)\fR).  This should be ``.maildelivery''
  509. to be standard and avoid confusion with the documentation.
  510. .I Sysdlvfile
  511. is the full path of the name of a maildelivery file
  512. to be used if the user does not specify one.
  513. If this is set to `(char *)0', then there will not be a default
  514. maildelivery file.  This file must be owned by root and generally
  515. unwritable.
  516. .I Mldfldir
  517. is used to control the location of default mailboxes.
  518. If the variable is set to 0, the mailbox will be created in the user's
  519. home directory.  If it is non-zero, it will be treated as the name
  520. of a directory in which the mailbox name will be the same as the
  521. username (old V7 style mail boxes).
  522. .I Mldflfil
  523. is the name to call the mailbox if the mailbox is going to be in the
  524. user's home directory.
  525. .I Mldfldir
  526. and
  527. .I mldflfil
  528. have an inverse relationship.  Only one should be defined at a time,
  529. the other should be zero.  We recommended that
  530. .I mldfldir
  531. be zero and that
  532. .I mldflfil
  533. be ``mailbox''.
  534. Another common value for
  535. .I mldflfil
  536. is ``.mail''.
  537. The strings
  538. .I delim1
  539. and
  540. .I delim2
  541. define the message prefix and message suffix respectively for mailbox
  542. files.  These should probably not be altered as some user programs
  543. may still have these values hardcoded to ``\\001\\001\\001\\001''.
  544. If you are introducing MMDF for the first time at your site you will
  545. not have this problem, but it is still unwise to change the delimiter
  546. unless you have a very good reason.
  547. .XX
  548. Set the values of \fImldflfil\fR and \fImldfldir\fR.
  549. .NH 3
  550. UUCP Channel Parameters
  551. .PP
  552. The section UUCP CHANNEL TAILORING controls the behavior of the
  553. .I rmail
  554. and
  555. UUCP channel
  556. programs, the input side of the UUCP channel.
  557. The things to tailor here are the strings
  558. .I Uchan,
  559. .I Uuxstr,
  560. and
  561. .I Uuname.
  562. .I Uchan
  563. defines the default channel that rmail will indicate as
  564. the source channel for incoming UUCP mail.
  565. This should probably be ``uucp''.
  566. The string
  567. .I Uuxstr
  568. controls UUX
  569. invocation.
  570. One or both of the strings in this part may be removed
  571. in the future as the UUCP channel is modified to use more of the
  572. basic channel configuring facilities.
  573. The string
  574. .I Uuname
  575. determines the name that appears in the blank:
  576. .nf
  577. From blah <date stuff> remote from ________
  578. .fi
  579. .br
  580. .XX
  581. Adjust the strings \fIUchan\fR, \fIUuxstr\fR, and \fIUuname\fR.
  582. .NH 3
  583. NIFTP Channel Parameters
  584. .PP
  585. The section headed NIFTP CHANNEL TAILORING is only for UK sites
  586. running the JNTmail code.  Tailoring is self explanatory
  587. (JNTmail spool location).
  588. .NH 3
  589. Multiple Host Feature Parameters
  590. .PP
  591. The variable
  592. .I locmachine
  593. in the section MULTIPLE HOST TAILORING must be changed to contain
  594. your machine name.  This is the simple identifier that distinguishs
  595. your host from others at your site.  This is used by code that
  596. makes a collection of hosts look like one site.  This string
  597. can also be set in the runtime configuration file for sites that
  598. want to run common binaries.  This is normally the name of the host
  599. minus the domain suffix (e.g. VGR for VGR.BRL.MIL, or
  600. BRL-ORANGE for BRL-ORANGE.ARPA).
  601. .XX
  602. Set \fBlocmachine\fR to a string appropriate for your machine.
  603. .NH 3
  604. Authorization Parameters
  605. .PP
  606. The last section, AUTHORIZATION TAILORING, is tailoring for the
  607. authorization code (`authorisation' for you folks in the UK).
  608. The
  609. .I authrequest
  610. string is the address of someone who should get notices of
  611. requests for authorization.
  612. The
  613. .I authfile
  614. string is the file which should contain a politely worded warning
  615. about usage of a restricted path.  The paper on authorization
  616. in the \fIdoc\fR directory,
  617. \fIConfiguring MMDF Authorization\fR by Steve Kille,
  618. describes this facility in greater detail.  Typically
  619. the address used for
  620. .I authrequest
  621. is simply the same as
  622. .I supportaddr
  623. in Section 2.5.1 of this paper.
  624. .XX
  625. Choose appropriate strings for \fIauthrequest\fR and \fIauthfile\fR.
  626. .NH 2
  627. Compile-Time Tailoring conf/\fIsite\fB/chan.c
  628. .PP
  629. The file chan.c is used to tailor certain channel and table
  630. specific structures of \*M.
  631. If you plan on using runtime configuration you can simply skip this
  632. section since this need only be tailored by systems that plan
  633. to hardcode in all channel and table information for speed or
  634. size considerations.
  635. .XX
  636. Edit the file chan.c (if you are not using runtime configuration).
  637. .PP
  638. The variable
  639. .I ch_dflnam
  640. defined the name of the default channel to which mail is submitted.
  641. In any normal system, this should be ``local''.
  642. The definition for the head of the list of alias sources
  643. follows ( Alias *al_list = (Alias *)0 ).
  644. This should not be altered.
  645. The following section defines two more tables (\fItb_mailids\fR and
  646. \fItb_users\fR).  These are only used if the flag variable \fImid_enable\fR
  647. is non-zero indicating that you wish to use the Mail-IDs feature
  648. of \*M.  The Mail-IDs feature disassociates mail addresses from login names.
  649. If Mail-IDs are disabled, you should still leave the table
  650. definitions installed as they are referenced in other modules even
  651. when not used.
  652. .XX
  653. Set \fImid_enable\fR to either 0 or 1 (1 enables Mail-IDs).
  654. .PP
  655. In the next section you should define and initialize channel, table, and
  656. domain structures for all your channels if you are using a hardcoded
  657. configuration.  This is not common and requires a reasonable
  658. knowledge of C and structure initialization.  See the file h/ch.h
  659. for a definition of the channel structures, h/tb* for table
  660. structures,
  661. and h/dm* for domain table
  662. structures. Once these are defined and initialized,
  663. proceed to add all your tables to the arrays
  664. .I chsrch,
  665. .I exsrch,
  666. and
  667. .I tblist.
  668. You will also have to make sure you do not exceed the maximum
  669. array sizes (NUMTABLES, NUMCHANS, and NUMDOMAINS).  (If necessary,
  670. increase these values).  Finally count up the number of pointers
  671. in each array and update the variables
  672. .I tb_numtables,
  673. .I ch_numchans,
  674. and
  675. .I dm_numtables.
  676. .XX
  677. Add pointers to your structures to the appropriate arrays.
  678. .XX
  679. Adjust the xx_numwhatits variables to indicate number in use.
  680. .NH 2
  681. Compile-Time Tailoring conf/\fIsite\fB/conf_dial.c
  682. .XX
  683. Edit the file conf_dial.c
  684. .PP
  685. This file is used to hardcode information for the dial-out package used 
  686. by the PhoneNet channel (phone/slave).
  687. You can ignore this file if you do not intend to use the PhoneNet code.
  688. Although you can hardcode the information for ports (dial-out lines)
  689. and lines (directly connected lines, no separate dialer),
  690. the common practice
  691. is to use runtime configuration.  If you want or need to hardcode,
  692. see the d_*.h files for definitions of the contents of these structures.
  693. As you add entries to the structures, be sure to update
  694. the
  695. .I d_num{prts,lines}
  696. variables and don't exceed the definitions for
  697. NUMPRTS and NUMLINES.  These maximums must be set even if you do
  698. runtime configuration.
  699. If you expect to need more ports or lines
  700. than those #defines allow, even if doing runtime configuration, then
  701. increase the size of these definitions appropriately.
  702. .I D_calllog
  703. is the file in which the dialing software will record call attempts
  704. for billing or statistics purposes.  Choose an appropriate place.
  705. Finally, the
  706. .I d_dialprog
  707. variable is the name of a program that will do dialing for your dial
  708. out ports if you have such a program.  This variable is obsolete and
  709. will likely be removed in the near future.
  710. .XX
  711. Check NUMPRTS and NUMLINES; adjust \fId_calllog\fR if necessary.
  712. .PP
  713. The section PHONE RELAYING TAILORING is for controlling the
  714. behavior protocol layer of the dial package.
  715. The arrays d_lrill and d_lxill have a bit for each of the 128 ASCII characters.
  716. If the bit is set, then that character will never be sent
  717. directly, but will be sent using a two character encoding in printable
  718. ASCII.
  719. These should not need altering unless your system is quite non-standard
  720. and use of a certain character not already disabled causes your terminal
  721. driver to not pass the character directly to the user.
  722. .PP
  723. The section PHONE LOGGING is similar to the logging section in conf.c
  724. You may wish to adjust the path of \fIph_log\fR.  The same
  725. is true of the string \fIdef_trn\fR.
  726. .I def_trn
  727. is a transcript file which is not size limited, but is recreated
  728. at the beginning of each call.
  729. .NH 2
  730. Compile-Time Tailoring conf/\fIsite\fB/d_lock.h
  731. .PP
  732. This file is used to set the style of locking that the PhoneNet channel
  733. will use on the dial-out lines.
  734. You may ignore this file if you do not intend to run the PhoneNet channel.
  735. .XX
  736. Edit the file d_lock.h
  737. .PP
  738. In this file you determine where locks are to be placed,
  739. the format of the lockfiles, and the method used to verify if
  740. a lock is active.
  741. .PP
  742. UUCPLOCK determines if UUCP-style locking will be used and where
  743. those locks will go.
  744. If you intend for the PhoneNet channel and any of UUCP, tip, cu,
  745. or uugetty to share dial-out lines, you must turn this on and set its
  746. value to your UUCP locking directory, usually /usr/spool/uucp
  747. or /usr/spool/locks.
  748. If PhoneNet will have its own dial-out lines,
  749. you may #undefine UUCPLOCK.
  750. .PP
  751. ASCIILOCKS determines the format of PhoneNet's lockfiles.
  752. If you have UUCPLOCK defined, PhoneNet's lockfiles must be in the
  753. same format as UUCP's.
  754. It is easy to determine which format you should use.
  755. Cd to UUCP's lock directory and examine one of the lockfiles.
  756. If the file contains a human-readable string of digits,
  757. then you should #define ASCIILOCKS.
  758. If the lockfile contains only a few bytes of gibberish,
  759. you have binary lockfiles and you should #undefine ASCIILOCKS.
  760. (If you have binary lockfiles, you can read their contents with ``od -d''.)
  761. .PP
  762. SIZEOFPID controls the size of the lockfiles and is only
  763. important if you have ASCIILOCKS defined.
  764. To determine what value to use, cd to UUCP's lock
  765. directory and do an ``ls -l'' on one of the lockfiles.
  766. Subtract 1 from the size of the lockfile and set SIZEOFPID to that value.
  767. .PP
  768. ATTSVKILL determines how locks are to be verified.
  769. Define this if your system can do kill(pid, 0) to check the
  770. existence of a process.
  771. .XX
  772. Adjust UUCPLOCK. ASCIILOCKS, SIZEOFPID and ATTSVKILL as necessary.
  773. .NH 2
  774. Compile-Time Tailoring conf/\fIsite\fB/Makefile.com
  775. .XX
  776. Set HOST to match your configuration directory name
  777. .PP
  778. The SYSTEM definition is used to select the appropriate
  779. versions of several files that are system type dependent.
  780. Currently, we support SYSTEM types of `2.9', `4.1', `4.2', `v7', and `5.2',
  781. corresponding to 2.9BSD, 4.1BSD, 4.2BSD, Version 7, and System V Release 2
  782. respectively.
  783. For 4.3BSD or SUNS, use `4.2' (you will need to compile the inetd
  784. version of smtpd--smtpd.4.3.c or smtpd.sun.c--manually if you don't want
  785. the standalone daemon).
  786. Most (if not all) of the systems in current use can be
  787. fit into one of these four types.
  788. .XX
  789. Set SYSTEM to the type for your system.
  790. .PP
  791. MMPREF is simply the string to be appended to the front of every
  792. command when installed.  This is a seldom-used kludge retained for
  793. system testing.  It should be blank.
  794. The definitions of LIBDIR, CHANDIR, and TBLDIR must coincide with
  795. the variables \fIcmddfldir\fR, \fIchndfldir\fR, and \fItbldfldir\fR
  796. in conf.c (tailored above).
  797. Typically these are /usr/mmdf, /usr/mmdf/chans, and /usr/mmdf/table
  798. respectively.
  799. BINDIR is the directory into which you wish to install the user interface
  800. programs.  Typically, this is /usr/bin or /usr/local/bin.
  801. On BRL Unix systems
  802. this is /usr/brl/bin.
  803. RCVDIR is the directory into which
  804. you wish to install the various ``rcvmail''
  805. programs.  These are automatic mail receiving programs that
  806. are activated by the user's installation of a .maildelivery file to control
  807. the delivery of mail to files and pipes.
  808. The directory should be generally accessible but write protected
  809. for security.  A typical value is /usr/mmdf/rcvmail.
  810. .XX
  811. Set the definitions for MMDF directories.
  812. .PP
  813. The next section relates to access control.
  814. INSTALL should be set to the pathname of the
  815. .I install
  816. program on your system.
  817. The arguments for INSTALL are set up to use with the BSD version
  818. of install(1),
  819. the SysV version has the arguments reversed which will no doubt
  820. cause quite a bit of confusion if one it used on the wrong system.
  821. For non-BSD derived systems a freely re-distributable version
  822. of install is provided called 
  823. .I installit .
  824. The value of INSTALL will normally be either
  825. \fIinstall,\fP or \fIsh ../../installit,\fP but sometimes 
  826. \fIksh ../../installit\fP is necessary.
  827. CHOWN should be set to the full pathname of the
  828. .I chown
  829. program on your system.
  830. Normally this is either /bin/chown or /etc/chown.
  831. MMDFLOGIN is the name of the account created for use by
  832. the mail system, and must agree with the variable \fImmdflogin\fR
  833. in the file conf.c (in Section 2.5.1 of this paper).
  834. ROOTLOGIN is the name of the superuser account on your system
  835. (first line in /etc/passwd), typically `root'.
  836. PGMPROT controls the default mode for executables.  It should be
  837. no less restrictive than 511 and no more permissive than 775
  838. if you have a systems group for maintenance activities.  We recommend 755.
  839. .XX
  840. Tailor CHOWN, MMDFLOGIN, ROOTLOGIN, and PGMPROT if necessary.
  841. .PP
  842. The CONFIGDEFS line contains a wealth of tailoring, some of which
  843. may be peculiar to your system and not known to me.
  844. The line is used to define C preprocessor
  845. variables.  To define a C preprocessor variable, prepend "-D" to the variable
  846. and list it on the CONFIGDEFS line.  For example, to define DEBUG level one,
  847. you would add
  848. -DDEBUG=1 to CONFIGDEFS.
  849. CONFIGDEFS is used to build both the CFLAGS and LFLAGS option lines
  850. (these lines should end with $(CONFIGDEFS)).
  851. The available preprocessor variables are:
  852. .IP DOASSIGN 15
  853. Enables the d_assign code in the dial package.  This code calls the program
  854. /bin/assign to gain exclusive access to a file.  It does not appear that 
  855. the d_assign code is ever used so don't bother defining DOASSIGN.
  856. .IP SECURETTY 15
  857. Many sites are running their systems with TTYs in more secure mode
  858. than generally writable.  Usually these systems use the execute bit
  859. to indicate write permission and have a privileged program make the
  860. access.  If you are such a site, you will want to investigate
  861. the effect of SECURETTY and modify it if necessary.  Vanilla sites
  862. should not define SECURETTY.  BRL VAX UNIX sites must define SECURETTY.
  863. .IP DEBUG 15
  864. Most sites should enable DEBUG=1 unless there is a serious
  865. crunch for space.  This will give you fairly detailed debugging of
  866. the system if you need it.
  867. Setting DEBUG=2 will include even more debugging for address parser
  868. and reformatting code.
  869. If you do not enable DEBUG=1, you will seriously
  870. affect your ability to trace problems later.
  871. Once you have your system up an running reliably you can recompile it
  872. without DEBUG of either kind if you want the space and the very minor
  873. performance increase.
  874. .IP D_LOG 15
  875. The same caution applies for D_LOG as for DEBUG.  This variable controls
  876. logging in the dial package.
  877. If you are tight on space or
  878. if you don't use the dial package (no phone or
  879. pobox channels) you may safely omit D_LOG.
  880. .IP D_DBGLOG 15
  881. This controls more debug logging for the dial package.
  882. Again, if you have the
  883. space and if you use the dial package (PhoneNet),
  884. define it to allow extensive tracing if
  885. problems arise later.
  886. .IP RUNALONE 15
  887. This makes the channel programs operate independently from \fIdeliver\fR.  It
  888. hasn't been used for years and requires reading the code to understand its
  889. effect.  Do NOT define RUNALONE! (it is used for debugging)
  890. .IP V4_2BSD 15
  891. Enables code that is specific for 4.2 BSD .  All 4.2 BSD sites must define this
  892. variable.  This should be used by 4.3 BSD sites as well.
  893. 4.3 BSD sites will also want the new src/smtp/smtpd.4.3.c for use with INETD.
  894. They will have to compile this manually for now (or copy it to smtpd.4.2.c).
  895. .IP V4_3BSD 15
  896. Enables code specific for 4.3BSD.  
  897. Right now this is limited to the NAMESERVER support.
  898. .IP NODIAL 15
  899. Prevents the dial package (PhoneNet protocol) from being compiled.
  900. This saves a fair amount of space and compile time.
  901. Define NODIAL if you do not intend
  902. to use the phone or pobox channels.
  903. (You will also need to take `dial' out of Makefile.lib, see below.)
  904. .IP SYS5 15
  905. Enables code that does Bell System V tricks (probably also useful for System
  906. III installations).  Note: if you are running System V, you must also append
  907. -Drindex=strrchr and -Dindex=strchr to CFLAGS.
  908. .IP SYS5r3 15
  909. Enables code specific to System Vr3.
  910. Note: if you have the WIN/TCP code 
  911. you may need to add -I/usr/netinclude to CFLAGS and -lnet to NETLIBS.
  912. .IP NODUP2 15
  913. Define this variable if you don't have a dup2() system call or subroutine.
  914. .IP NOFCNTL 15
  915. If you defined NODUP2, then you should also define NOFCNTL if you don't have
  916. the fcntl(x, F_DUPFD) system call either.
  917. .IP NAMESERVER 15
  918. Enables the nameserver lookup code for accessing domain servers.  The
  919. NAMESERVER support is new.  You will be required to include either
  920. tb_ns.fake.c or tb_ns.<sys>.c.  Currently there is only support for
  921. 4.2BSD networking.  See TB_NS below.
  922. .IP NODOMLIT 15
  923. Prevents Domain Literals (such as [10.0.0.59]) from appearing in addresses.
  924. Since \*M doesn't currently handle Domain Literals properly, use of this option
  925. is strongly advised.
  926. .IP LEFTDOTS 15
  927. Enables intpretation of dots as delimiters on the LHS of an @ in addresses.
  928. For example, "user.host@yourdomain".  Since % or 822-routing is preferred here,
  929. only enable LEFTDOTS if you have historical need to.
  930. .IP -Dvoid=int 15
  931. Define this translation if your C compiler doesn't understand voids (e.g. V7).
  932. .IP NO_VARARGS 15
  933. Define this variable if your machine doesn't allow variable numbers of
  934. arguments to be passed to routines the way Vaxes (and some others) do.
  935. .IP CITATION 15
  936. Define CITATION=n to limit (to n) the number of lines of text included in error
  937. returns by \fIrmail\fR and \fIniftp\fR.  n should be at least
  938. six, if CITATION is defined at all.  If not defined, \fIrmail\fR will return
  939. the entire message and \fIniftp\fR will return the first 500 lines.
  940. .IP DBMCACHE 15
  941. Define DBMCACHE if your version of dbm(3) builds databases in core and then
  942. dumps them to disk with dbmcachedump().
  943. .IP STATSORT 15
  944. Define STATSORT if you want \fIdeliver\fR to sort the mail queue based on
  945. a stat(2) of the message text file instead of reading the timestamp that is
  946. stored in the message address file.  Using stat() is much more efficient but
  947. it assumes the modified date of the text file hasn't been changed since the
  948. message was queued.  This is usually a safe assumption so defining STATSORT is
  949. recommended.
  950. .IP DOTFORWARD 15
  951. Enable code which looks for a file \fI~user/.forward\fP which specifies
  952. an address to which to forward the mail.
  953. This is implemented in submit similarly to an alias expansion,
  954. and is different from using resend(1) in \fI~user/.maildelivery\fP in that 
  955. the headers are not changed.
  956. The file must either be owned by the user or one of the user id's
  957. listed in the macro PRIV_USER,
  958. and also must be readable by \fIsubmit\fP 
  959. (which usually means \fImmdf\fP).
  960. .XX
  961. Tailor the CONFIGDEFS line to your site's requirements and system type.
  962. .PP
  963. The CFLAGS line is the combination of the CONFIGDEFS given above
  964. and any C compiler dependent options.
  965. The basic boilerplate content is ``-O -I../../h''
  966. which asks for the object code optimizer and specifies the path to
  967. the header file directory.  If you do not have an optimizer or
  968. it does not work properly, remove the ``-O''.
  969. .XX
  970. Tailor the CFLAGS line to your system's C compiler.
  971. .PP
  972. LINT is the pathname of your lint program, if you have one.  If not,
  973. define LINT to be something innocuous like `echo'.
  974. LFLAGS are the flags to LINT; tailor as you like.
  975. This line should end with $(CONFIGDEFS) just like CFLAGS.
  976. LDFLAGS are the flags you want to give to the loader (ld).
  977. These may be site dependent; for example, a PDP-11 will require use
  978. of split instruction and data space by using `-i'.
  979. Do not include libraries in the LDFLAGS definition.
  980. Do not tailor MMDFLIBS.
  981. SYSLIBS is a list of libraries required from the system given
  982. either explicitly or using the -l\fIlibname\fR notation.
  983. Typically you will require at least -ldbm for the hashed database
  984. library if you are using it.
  985. SYS5 systems using the WIN/TCP will need to use -lnet.
  986. Systems without the new Berkeley directory access routines will also need
  987. to include -lndir or ../../libndir/libndir.a.
  988. The ndir library is normally supplied in the sub-directory libndir in
  989. the \*M distribution.
  990. The AR definition is simply the path or name of the library archiver,
  991. typically just `ar'.
  992. .XX
  993. Tailor LDFLAGS and SYSLIBS (and perhaps LINT, LFLAGS, and AR).
  994. .PP
  995. CH_TB selects one of two types of table lookup.  The two choices: use
  996. linear search tables (slow) or the hashed database mechanism (fast).
  997. In an independent survey,
  998. 99 out of 100
  999. sites recommended fast over slow (the 100th was a masochist).
  1000. If you don't have the dbm library, get it from some other site.
  1001. It was distributed with V7 and all BSD systems.  It is FAST.
  1002. Set CH_TB to `ch_tbdbm' if you want to use a dbm hashed
  1003. database (recommended) or `ch_tbseq' if you want to use linear
  1004. searched tables.
  1005. .PP
  1006. The TB_NS variable indicates which nameserver module to use.
  1007. There are currently only
  1008. two choices, `fake' and `4.2'.  `fake' is appropriate
  1009. if you didn't specify -DNAMESERVER in CFLAGS above
  1010. or if your system is a non-BSD4.2 Unix.
  1011. .XX
  1012. Tailor TB_NS.
  1013. .PP
  1014. LOCALUTIL is for listing special modules needed based on
  1015. different configurations.
  1016. .IP \(bu
  1017. If you do not want runtime tailoring, include tai_fake.o.
  1018. Otherwise you should include tai_file.o.  The latter is highly
  1019. recommended (tai_file.o).
  1020. .IP \(bu
  1021. You must include the name of one of the several locking code
  1022. modules.
  1023. There are many systems with home grown locking mechanisms that
  1024. are much better than those provided with vanilla UNIX.
  1025. 4.2BSD comes with a very good discretionary locking mechanism.
  1026. Examine the various lk_lock.*.c files in lib/util and choose
  1027. one that is appropriate for your system and include the name
  1028. of its object module here (substitute .o for .c).
  1029. If you have a type of locking available for which we do not have
  1030. a module, choose one that is close to what you need and modify
  1031. it accordingly.
  1032. If you have no locking mechanism, you should specify lk_lock.o.
  1033. This will include a locking package that uses links to lock files.
  1034. If you use this version and you also use MH, then you can coordinate
  1035. mailbox locking between MMDF and MH by setting "lockstyle: 2" and
  1036. "lockldir: LOCKDIR" in MH's mtstailor file where LOCKDIR is the same
  1037. directory you choose for the MMDF locking directory
  1038. (see section 2.5.2).
  1039. .PP
  1040. The last item to tailor here is which dependency generation
  1041. script to use.  The first one is for systems that do NOT
  1042. have the proper support in \fIcc\fP.
  1043. It uses
  1044. .I grep
  1045. and
  1046. .I sed
  1047. to generate
  1048. the dependencies.  
  1049. The second entry for ``depend:'' comes in two parts and uses the options to
  1050. .I cc
  1051. to generate dependencies more accurately, 
  1052. by way of the C preprocessor.
  1053. The exact form this takes varies from system to system.
  1054. On ``pure'' 4.3BSD systems, you use \-M and cc will generate the dependencies.
  1055. On Ultrix v3 systems, the ``\-M'' flag was already being used for something else
  1056. and instead you use ``\-Em''.
  1057. On System V release 3.2 the preprocessor will only generate a list of
  1058. files which are included,
  1059. but with of proper masaging this list can be turned into proper dependencies.
  1060. These options are specified with a macro called ``THE_M_FLAG''.
  1061. Then there are two seperate sections of the entry,
  1062. one which handles the Ultrix/BSD system and the other for SysV.
  1063. The comments in the sample Makefile.com files should make this much clearer.
  1064. .XX
  1065. Make sure the proper version for your
  1066. system is uncommented and comment out
  1067. the other version, that that THE_M_FLAG has an appropriate value.
  1068. .NH 2
  1069. Compile-Time Tailoring conf/\fIsite\fB/Makefile.lib
  1070. .PP
  1071. There are only four things to be modified here: all defines at the top
  1072. of the file.
  1073. .PP
  1074. First, tailor MAKE.  If you need to use a special path for the make program,
  1075. then define MAKE to be that path, otherwise MAKE should just be `make'.
  1076. .PP
  1077. Second, tailor RANLIB.  Some systems (primarily System III and System V
  1078. sites) do not have the \fIranlib\fR archive table of contents program
  1079. and so must always create a library in the proper order for searching.
  1080. This is done with the
  1081. .I lorder
  1082. and
  1083. .I tsort
  1084. programs.  If you do not have
  1085. .I ranlib,
  1086. define RANLIB to be `libfix'.  Libfix is a shellfile
  1087. in the directory 
  1088. .B lib
  1089. that will do the proper things to build
  1090. a sorted \*M library.  If you are a site that has
  1091. .I ranlib,
  1092. then
  1093. simply define RANLIB to be `ranlib'.
  1094. .PP
  1095. Third, if you do not plan to use the dial package (no PhoneNet)
  1096. then remove dial from the list of SUBDIRS (in this case
  1097. you should also have defined NODIAL in Makefile.com).
  1098. Normally SUBDIRS will be ``addr dial mmdf table util''.
  1099. .PP
  1100. Fourth, if you need to use libz.a then 
  1101. uncomment the lines which "cd ../libz" and run make.
  1102. Also in the ``install:'' tag you may wish to copy libmmdf.a to
  1103. /lib, /usr/lib or some other place with something like:
  1104. .DS L
  1105.         $(INSTALL) libmmdf.a /usr/lib/libmmdf.a
  1106.         $(RANLIB) /usr/lib/libmmdf.a
  1107. .DE
  1108. .XX
  1109. Set MAKE, RANLIB, and SUBDIRS to appropriate strings.
  1110. .NH 2 
  1111. Compile-Time Tailoring conf/\fIsite\fB/Makefile.src
  1112. .PP
  1113. There are a couple of experimental or new channels that you may
  1114. want to use that are not on the line defining
  1115. SUBDIR, or it may be commented out (preceded by a #).
  1116. The standard entries are tools, submit, deliver, local,
  1117. list, delay, smtp, phone, pobox, uucp, and prog.
  1118. If you include the nameserver code you will need `delay', otherwise
  1119. it can be left out.
  1120. You may also want to remove references to
  1121. directories you know you are not going
  1122. to use.
  1123. This will save compile time, since you will not build things
  1124. you do not intend to use.  If you have specified -DNODIAL, you can safely
  1125. comment-out the phone and pobox directories.
  1126. .XX
  1127. Check the contents of SUBDIR and adjust if necessary.
  1128. .NH 2
  1129. Compile-Time Tailoring conf/\fIsite\fB/msgtailor.c
  1130. .PP
  1131. There are a quite a few things to tailor for the
  1132. .I msg
  1133. program.
  1134. The first is the number of messages supported in one mailbox.  This
  1135. is basically limited only by the host machine's address space.
  1136. The
  1137. .I msgtailor.c
  1138. file already has some typical values for 16 bit and 32 bit systems.
  1139. NMSGS is the maximum number of messages to be supported.  For 16 bit
  1140. systems, the maximum should be no more than 500, on 32 bit systems,
  1141. the upper limit is somewhat arbitrary, but does affect storage space.
  1142. We suggest 2000.
  1143. .I Savmsgfn
  1144. is the name of the place to save mail from the main mailbox (as
  1145. tailored in Section 2.5.7).  This is usually ``mbox''.
  1146. The string
  1147. .I resendprog
  1148. is a string that is fed to a subroutine of 
  1149. .I msg
  1150. to cause the resending
  1151. program (supplied as uip/other/resend.c) to be invoked.
  1152. It must begin with a `|' (pipe symbol) and
  1153. the remainder of the string must be the path to the resending program,
  1154. which normally gets installed in BINDIR (see Section 2.8).
  1155. It is possible to omit the full path but it is not recommended.
  1156. Note that a space character is required at the end of
  1157. .I resendprog.
  1158. The stand-alone section should be ignored.
  1159. .XX
  1160. Set up \fIsavemsgfn\fR and \fIresendprog\fR, and NMSGS if necessary.
  1161. .PP
  1162. The strings
  1163. .I dflshell
  1164. and
  1165. .I dfleditor
  1166. define the default shell for subprocesses and default editor
  1167. for two window answer mode (respectively).  Both can be
  1168. overridden by the normal shell variables (``SHELL'' and ``EDITOR'').
  1169. The default editor should be able to edit multiple files simultaneously
  1170. if invoked with more than one file name.
  1171. If you have no editors with this feature, set
  1172. .I dlfeditor
  1173. to your favorite editor and see the ``twowinfil'' capability
  1174. of .msgrc files.
  1175. .XX
  1176. Set up the \fIdflshell\fR and \fIdfleditor\fR.
  1177. .PP
  1178. The following variables are basically self explanatory and control
  1179. the default behavior of such features as command completion, paging,
  1180. and informative messages.
  1181. If in doubt, leave the settings alone.
  1182. The normal BRL settings are given below:
  1183. .sp
  1184. .TS
  1185. l l l .
  1186. int    pagesize = 22;        /* default line count */
  1187. int    linelength = 80;    /* default line size */
  1188.  
  1189. int    paging = OFF;        /* Internal paging of long messages */
  1190. int    verbose = ON;        /* Command completion (raw mode) */
  1191. int    keystrip = ON;        /* Strip header lines on display */
  1192. int    bdots = ON;        /* Binary box dots */
  1193. int    mdots = ON;        /* Mailbox dots */
  1194. int    bprint = ON;        /* Reading... messages */
  1195. int    quicknflag = OFF;    /* Turn off NEW before message prints */
  1196. int    filoutflag = ON;    /* Filter text (display controls as ^X) */
  1197. int    binsavflag = ON;    /* Save binary box on exec's & pauses */
  1198. .TE
  1199. .NH 2
  1200. Compile-Time Tailoring conf/\fIsite\fB/s_tailor.h
  1201. .PP
  1202. This file defines some of the operating characteristics of the 
  1203. \fIsend\fR and \fIsnd\fR programs.
  1204. There are three #defines you can tailor in this file.
  1205. Your choices are to either #define or #undef two of the following,
  1206. and change the value of the third.
  1207. SENTFILE causes a copy of each message sent to be placed in a file
  1208. called .sent in the user's home directory.
  1209. This option is obsoleted by the new version of \fIsend\fR; the user can
  1210. now tailor this feature by editing the .sendrc file in his home directory.
  1211. Formerly, FNCYPRNT was used to enable paginated printing of the message
  1212. by the review command.
  1213. Now, the user can tailor this feature by editing the .sendrc
  1214. file in his home directory.
  1215. PWNAME, when defined, enables the code that will try to get the
  1216. user's real name from the gecos field of /etc/passwd if no .signature
  1217. file exists.
  1218. The code stops at the first comma and knows about the '&'
  1219. notation for abbreviating the login name.
  1220. If your site has gecos fields which contain other
  1221. information or the format is not compatible, do not #define PWNAME.
  1222. SENDRC sets the name of the user's run-configuration file.
  1223. You probably shouldn't change this.
  1224. .XX
  1225. Check the settings of SENTFILE, PWNAME, and SENDRC.
  1226. .NH 2
  1227. Compile-Time Tailoring conf/\fIsite\fB/s_tailor.c
  1228. .PP
  1229. This is the main tailoring file for the \fIsend\fR and \fIsnd\fR program.
  1230. There are three things to tailor here.
  1231. Set the initialization of the strings for the default
  1232. line and screen editors, and the default spelling checker.
  1233. .I Dfleditor
  1234. should be set to the local default line editor.
  1235. .I Dflveditor
  1236. should be set to the local default visual (screen) editor.  This will be used
  1237. as the default editor in the \fIsnd\fR program.
  1238. .I Dflchecker
  1239. should be set to the local default spelling checker.
  1240. If the names are simple names (e.g. "ed") your users will be able
  1241. to find versions in their search paths; if the names are full paths,
  1242. \fIsend\fR and \fIsnd\fR will always run the versions you specify unless 
  1243. overridden by the user.
  1244. Users can always override these settings in their .sendrc files.
  1245. .XX
  1246. Set the strings \fIdfleditor\fR, \fIdflveditor\fR and \fIdflchecker\fR
  1247. for your site.
  1248. .NH 2
  1249. Other Compile Time Problems
  1250. .PP
  1251. If you are a 4.3BSD or SUN site or have access to the
  1252. Berkeley Inetd or another Internet super-server,
  1253. you may want the version of smtpd designed to
  1254. run under these super-servers.
  1255. For the time being, you will need to
  1256. move smtpd.4.2.c to smtpd.4.2.old
  1257. and install smtpd.4.3.c or smtpd.sun.c as smtpd.4.2.c in the
  1258. directory src/smtp so the makefiles can generate
  1259. the module you need.
  1260. In the future this difference will be more cleanly handled
  1261. in the configuration procedure.
  1262. .XX
  1263. If you really want to use a super-server, install smtpd.4.3.c or smtpd.sun.c.
  1264. .NH 2
  1265. Compiling Your \*M System
  1266. .PP
  1267. You are now ready to generate your version of \*M.
  1268. You must first go to the conf directory and install your
  1269. site specific files by running the `sitesetup' shell program
  1270. located there.  Yoursitname is the name of the directory
  1271. you chose and should also match the HOST variable in the Makefile.com
  1272. you edited earlier.
  1273. Please do not try to run this shellscript with C-shell or
  1274. some other non-standard shell.
  1275. .XX
  1276. In conf, run `sh sitesetup yoursitename'.
  1277. .PP
  1278. If you have not run a ``make clean'' yet, you should do so now.
  1279. .PP
  1280. Next you should go to the top directory and run ``make depend''.
  1281. This will go recursively through \fBlib\fR, \fBsrc\fR and \fBuip\fR
  1282. generating the dependencies for your system.  Remember the comments
  1283. about this mechanism made at the beginning of this document.
  1284. .XX
  1285. In the top directory, run `make depend'.
  1286. .PP
  1287. The master makefile in the top of the \*M source tree
  1288. will attempt to recompile everything in the subdirectories
  1289. \fBlib\fR, \fBsrc\fR, and \fBuip\fR (in that order).  You can also run
  1290. make in each of these directories alone, although
  1291. \fImake\fR must be run in \fBlib\fR first.
  1292. .PP
  1293. If you want to run each of the make's separately,
  1294. change directory to the \fBlib\fR directory and run \fImake\fR.
  1295. This should result in the file lib/libmmdf.a several minutes
  1296. later (15-30 minutes, depending on machine speed).
  1297. Assuming libmmdf.a was generated
  1298. successfully, change directory to the \fBsrc\fR directory
  1299. and run \fImake\fR to build the core \*M programs (burn another 15-30
  1300. minutes).
  1301. Finally, go to the \fBuip\fR directory and run \fImake\fR there.
  1302. In all cases, libmmdf.a must be built before any other directories
  1303. are made or the objects will not load successfully (they need
  1304. the library!).
  1305. .PP
  1306. Remember that make depend will insert some bogus dependencies if
  1307. you do not have
  1308. .I cc
  1309. \-M, so make will stop a few times.  When it does
  1310. remove the offending bogus dependency and continue.  You will only
  1311. have to do this once.  Make depend should not have to be run again
  1312. unless significant source changes are made.
  1313. .XX
  1314. If you didn't run the make's separately
  1315. above, run `make' at the top of the \*M source tree
  1316. .PP
  1317. Note that to use the Sun 3.4 \fImake\fR with the \*M makefiles,
  1318. you need to do specify MFLAGS=-r on the `make' command line (or -r
  1319. on the `gen' command line).  You must also include the .c.o: and .SUFFIXES: 
  1320. rules in your Makefile.com (see the sample \fBconf\fR directories).
  1321. .NH 2
  1322. Handling Problems While Compiling
  1323. .PP
  1324. If you run into problems you can always interrupt the process,
  1325. correct the problem, and continue by calling \fImake\fR again
  1326. from the directories \fBlib\fR, \fBsrc\fR, or \fBuip\fR (or just running the
  1327. master makefile again from the top directory).
  1328. Remember that if you try to build any of the subdirectories of \fBlib\fR, 
  1329. \fBsrc\fR, or \fBuip\fR (e.g. \fBsrc/deliver\fR)
  1330. while in that directory, you must invoke \fImake\fR via the shellfile
  1331. \fIgen\fR in the subdirectory.  \fIGen\fR takes all the same arguments
  1332. as \fImake\fR but includes the file ../../Makefile.com along
  1333. with ./Makefile.real by using the \-f option of \fImake\fR.
  1334. .NH 2
  1335. Additional Makefile Features
  1336. .PP
  1337. The makefiles in \fBsrc\fR and \fBuip\fR also support
  1338. the command ``make dist''
  1339. which makes a tar-format file with all the executable binaries
  1340. and a shellfile called ``install.sh'' which, if run, will install all
  1341. the binaries and chown/chmod them appropriately.  A ``make dist'' should 
  1342. only be run after the system has been successfully built and (preferably)
  1343. tested on the current system.  This facility makes it much easier to
  1344. maintain multiple systems from a master source machine and greatly
  1345. simplifies distributing and installing new versions.
  1346. (This facility is a bit flakey.)
  1347. .PP
  1348. As mentioned before, all the Makefiles support ``make clean''
  1349. and ``make depend'' (or ``gen clean'' and ``gen depend'' as
  1350. appropriate to your current directory).
  1351.