2 # INSTALL -- installation instructions
10 Please read all of the following instructions before you begin
13 You should check the MACHINES file to see if there are any specific
14 build instructions for your operating system. To build nmh, you will
15 need an ANSI C compiler such as gcc.
17 1) From the top-level source directory, run the command
21 This will check the configuration of your OS, and create the
22 include file config.h, as well as the various Makefiles.
24 The configure script accepts various options. The options of
25 most interest are listed in a section below. To see the list
26 of all available options, you can run
30 2) Look through the user configuration section at the beginning
31 of the generated include file `config.h'. You may
32 want to customize some #defines for your environment.
38 Note that if you have [n]mh files in your install directories with the same
39 names as the files being installed, the old ones will get overwritten without
40 any warning. The only directory that isn't true for is the `etc' directory
41 -- in that directory, the previous copy of each <file> will be backed up as
42 <file>.prev if it differs from the newly-installed copy. Watch for any diff
43 output while make is processing that directory to see if you need to merge
44 changes from *.prev files into the new versions.
46 5) Edit the file `mts.conf' (installed in the nmh `etc' directory)
47 and make any necessary changes for the mail transport interface
50 The default `mts.conf' file assumes you retrieve new mail from
51 a local (or NFS mounted) maildrop, and send outgoing mail by
52 injecting the message to a mail transfer agent (such as sendmail)
53 on the local machine via SMTP.
55 If, instead, all your mail sending and receiving occurs on a
56 remote POP/SMTP server, you will need to look at the values of the
57 variables "localname", "pophost", and "servers":
59 a) "localname" defines the hostname that nmh considers local.
60 If not set, then nmh queries your OS for this value. You will
61 want to change this if you wish your e-mail to appear as if it
62 originated on the POP server.
64 b) "pophost" defines the server that runs the POP daemon, and to
65 which `inc' and `msgchk' will always query for new mail.
67 c) "servers" defines the server to which you send outgoing SMTP
70 If you compile with POP support, but don't want to use it exclusively,
71 you can use the `-host' and `-user' options to `inc' and `msgchk'
72 rather than hardcoding pophost in `mts.conf'.
74 Check the `mh-tailor' man page for a list of all the available options
75 for this file ("masquerade" may be of particular interest).
77 6) If you have enabled POP support, make sure that `pop3' (or more
78 precisely the value of the define POPSERVICE in config.h) is defined
79 in the /etc/services file (or its NIS/NIS+ equivalent) on the client
80 machine. It should be something equivalent to "110/tcp". This might
81 have already been done when the POP daemon was installed.
83 7) Edit the file `mhn.defaults' (installed in the nmh `etc' directory).
84 This file contains the default profile entries for the nmh command
85 `mhn' and is created by the script `mhn.defaults.sh'. This script
86 will search a generic path (essentially your $PATH) for programs to
87 handle various content types (for example, xv to display images).
88 You can re-run this script and give it a more tailored path. You may
89 want to re-run this script later if you install new programs to
90 display content. An example of this is:
93 % ./mhn.defaults.sh /usr/local/bin:/usr/X11/bin:/usr/ucb > mhn.defaults
95 and then move `mhn.defaults' into the nmh `etc' directory.
97 The `mhn.defaults.sh' script only searches for a simple set of programs.
98 If you have specialized programs to handle various types, you will need
99 to edit the `mhn.defaults' file manually. The syntax of this file is
100 described in the man page for `mhn', and in section 9.4 of the book
101 "MH & xmh: Email for Users and Programmers", 3rd edition, by Jerry Peek,
102 on the Internet at <http://www.ics.uci.edu/~mh/book/mh/confmhn.htm>.
104 9) Add an optional global mh.profile, if desired. This profile should be
105 placed in the nmh `etc' directory with the name `mh.profile'. This
106 file will be used to construct the initial .mh_profile of a new nmh
107 user, but will not be consulted after that.
109 -----------------------------------------------
110 Compiler options, or using a different compiler
111 -----------------------------------------------
112 By default, configure will use the "gcc" compiler if found. You can use a
113 different compiler, or add unusual options for compiling or linking that
114 the "configure" script does not know about, by either editing the user
115 configuration section of the top level Makefile (after running configure)
116 or giving "configure" initial values for these variables by setting them
117 in the environment. Using a Bourne-compatible shell (such as sh,ksh,zsh),
119 you can do that on the command line like this:
120 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
122 Or on systems that have the "env" program, you can do it like this:
123 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
125 ----------------------------------------
126 Building nmh on additional architectures
127 ----------------------------------------
128 To build nmh on additional architectures, you can do a "make distclean".
129 This should restore the nmh source distribution back to its original
130 state. You can then configure nmh as above on other architectures in
131 which you wish to build nmh. Or alternatively, you can use a different
132 build directory for each architecture.
134 ---------------------------------
135 Using a different build directory
136 ---------------------------------
137 You can compile the nmh in a different directory from the one containing
138 the source code. Doing so allows you to compile it on more than one
139 architecture at the same time. To do this, you must use a version of
140 "make" that supports the "VPATH" variable, such as GNU "make". "cd" to
141 the directory where you want the object files and executables to go and
142 run the "configure" script. "configure" automatically checks for the
143 source code in the directory that "configure" is in. For example,
145 cd /usr/local/solaris/nmh
146 /usr/local/src/nmh-1.0/configure
149 ---------------------
150 Options for configure
151 ---------------------
152 --prefix=DIR (DEFAULT is /usr/local/nmh)
153 This will change the base prefix for the installation location
154 for the various parts of nmh. Unless overridden, nmh is installed
155 in ${prefix}/bin, ${prefix}/etc, ${prefix}/lib, ${prefix}/man.
157 --bindir=DIR (DEFAULT is ${prefix}/bin)
158 nmh's binaries (show, inc, comp, ...) are installed here.
160 --libdir=DIR (DEFAULT is ${prefix}/lib)
161 nmh's support binaries (post, slocal, mhl, ...) are installed here.
163 --sysconfdir=DIR (DEFAULT is ${prefix}/etc)
164 nmh's config files (mts.conf, mhn.defaults, ...) are installed here.
166 --mandir=DIR (DEFAULT is ${prefix}/man)
167 nmh's man pages are installed here.
170 Enable debugging support.
172 --enable-masquerade[='draft_from mmailid username_extension']
173 If this option is not specified, the mts.conf file will contain the line
174 "masquerade: " (with no value), which may be manually edited later. You
175 may find it convenient to specify a value at configure-time, however, so
176 that each time nmh is reinstalled, the right value will be there.
178 The above usage shows all three masquerade options being specified, but any
179 subset of the three may be specified. If you do want to enable all three,
180 you can simply use `configure --enable-masquerade' as a shortcut.
182 See the mh-tailor(5) man page for full documentation of "masquerade:".
184 --enable-mhe (DEFAULT)
185 Add support for the Emacs front-end `mhe'.
188 Enable client-side support for pop.
191 Enable client-side support for apop (Authenticated POP).
193 --with-editor=EDITOR (DEFAULT is vi)
194 specify the full path of the default editor to use. If this
195 option is not given, then the configuration process will search
196 for the `vi' command and use it as the default. If you wish to
197 specify an interface which is compatible with MH, then use the
198 nmh command `prompter'. If you specify `prompter', then you don't
199 need to give the full pathname.
202 Specify the location of Hesiod.
205 Specify the location of Kerberos V4 for KPOP support. After
206 running configure, you will need to change the POPSERVICE #define in
207 config.h if you want to use KPOP exclusively (rather than being able
208 to switch between KPOP and normal POP3). See the comments inside
209 config.h for details.
211 --with-mts=MTS (DEFAULT is smtp)
212 Specify the default mail transport system you want to use. The two
213 acceptable options are "smtp" (which is the default), and
214 "sendmail". This value will be put into the mts.conf file. You
215 may find it convenient to specify a value at configure-time,
216 however, so that each time nmh is reinstalled, the right value will
219 If you use "smtp", this will enable a direct SMTP (simple mail
220 transport protocol) interface in nmh. When sending mail, instead
221 of passing the message to the mail transport agent, `post' will
222 open a socket connection to the mail port on the machine specified
223 in the `mts.conf' file (default is localhost), and speak SMTP
226 If you use "sendmail", then `post' will send messages by forking a
227 local copy of sendmail. Currently it will still speak SMTP with
228 this local copy of sendmail.
230 If you wish to use a transport agent other than sendmail, you will
231 need to use a `sendmail wrapper'.
233 --with-pager=PAGER (DEFAULT is more)
234 Specify the default pager (file lister) to use. If this option
235 is not given, then the configuration process will search for the
236 command `more' and use it as the default.
238 --with-smtpservers='SMTPSERVER1[ SMTPSERVER2...]' (DEFAULT is localhost)
239 If this option is not specified, the mts.conf file will contain
240 the line "servers: localhost", which may be manually edited later.
241 You may find it convenient to specify a value at configure-time,
242 however, so that each time nmh is reinstalled, the right value will be
245 See the mh-tailor(5) man page for full documentation of "servers:".
249 nmh-workers@mhost.com