0
|
1 /* config.c - master MH configuration file */
|
|
2 #ifndef lint
|
12
|
3 static char ident[] = "@(#)$Id: config.c,v 1.3 2006/12/05 18:17:54 kono Exp $";
|
0
|
4 #endif /* lint */
|
|
5
|
|
6 /* This file is automatically generated. Do not edit! */
|
|
7
|
|
8 /* LINTLIBRARY */
|
|
9
|
|
10 #include "../h/mh.h"
|
|
11 #ifdef MHRC
|
|
12 #include <pwd.h>
|
|
13 #endif /* MHRC */
|
|
14 #include <stdio.h>
|
16
|
15 #include <unistd.h>
|
|
16
|
0
|
17
|
|
18
|
|
19 #if defined(__STDC__)
|
|
20 #define binpath(file) "/usr/local/mh/bin/"#file
|
12
|
21 #define etcpath(file) "/usr/local/mh/lib/"#file
|
0
|
22 #else
|
|
23 #define binpath(file) "/usr/local/mh/bin/file"
|
12
|
24 #define etcpath(file) "/usr/local/mh/lib/file"
|
0
|
25 #endif
|
|
26
|
|
27 static char Config[] = "@(#)Config: MH";
|
|
28
|
10
|
29 char *options[] = {"APOP", "ATHENA", "BIND", "DBMPWD", "DUMB", "FOLDPROT='\"0700\"'", "GCOS_HACK", "ISI", "JAPAN", "LOCKF", "MHE", "MHRC", "MH_PLUS", "MIME", "MIME_HEADERS", "MORE='\"/usr/bin/less\"'", "MSGPROT='\"0600\"'", "NNTP", "NORUSERPASS", "NTOHLSWAP", "OVERHEAD", "POP", "POPSERVICE='\"pop3\"'", "POSIX", "READLINE", "RENAME", "RPATHS", "SBACKUP='\"\043\"'", "SENDMTS", "SHADOW", "SIGEMT=SIGUSR1", "SMTP", "SOCKETS", "SYS5", "SYS5DIR", "TYPESIG=void", "TZNAME", "UNISTD", "VSPRINTF", "WHATNOW", "ZONEINFO", NULL};
|
0
|
30
|
|
31
|
|
32 #ifndef __STDC__
|
|
33 #ifdef MHRC
|
|
34 #ifdef SYS5
|
|
35 struct passwd *getpwnam ();
|
|
36 #endif /* SYS5 */
|
|
37 #endif /* MHRC */
|
|
38 #endif
|
|
39
|
|
40 /* */
|
|
41
|
|
42 static char lpath[BUFSIZ];
|
|
43
|
|
44 char *libpath (file)
|
|
45 char *file;
|
|
46 {
|
|
47 char *cp;
|
|
48 #ifdef MHRC
|
|
49 char *pp;
|
|
50 struct passwd *pw;
|
|
51 #endif /* MHRC */
|
|
52
|
|
53 #ifdef MHRC
|
|
54 m_getdefs ();
|
|
55 #endif /* MHRC */
|
|
56
|
|
57 switch (*file) {
|
|
58 case '/':
|
|
59 return file;
|
|
60
|
|
61 #ifdef MHRC
|
|
62 case '~':
|
16
|
63 if ((cp = index (pp = file + 1, '/')))
|
0
|
64 *cp++ = '\0';
|
|
65 if (*pp == '\0')
|
|
66 pp = mypath;
|
|
67 else
|
16
|
68 if ((pw = getpwnam (pp)))
|
0
|
69 pp = pw -> pw_dir;
|
|
70 else {
|
|
71 if (cp)
|
|
72 *--cp = '/';
|
|
73 goto try_it;
|
|
74 }
|
|
75
|
|
76 (void) sprintf (lpath, "%s/%s", pp, cp ? cp : "");
|
|
77 if (cp)
|
|
78 *--cp = '/';
|
|
79
|
|
80 if (access (lpath, 04) != NOTOK)
|
|
81 return lpath; /* else fall */
|
|
82 try_it: ;
|
|
83 #endif /* MHRC */
|
|
84
|
|
85 default:
|
|
86 if (access ((cp = m_mailpath (file)), 04) != NOTOK)
|
|
87 return cp;
|
|
88 }
|
|
89
|
|
90 (void) sprintf (lpath, etcpath (%s), file);
|
|
91 return (access (lpath, 04) != NOTOK ? lpath : file);
|
|
92 }
|
|
93
|
|
94 /* */
|
|
95
|
|
96 /*
|
|
97 * Standard yes/no switches structure
|
|
98 */
|
|
99
|
|
100 struct swit anoyes[] = {
|
|
101 "no", 0,
|
|
102 "yes", 0,
|
|
103 NULL, 0
|
|
104 };
|
|
105
|
|
106 /* */
|
|
107
|
|
108 /*
|
|
109 * MH constants
|
|
110 */
|
|
111
|
|
112 char *components = "components";
|
|
113 char *current = "cur";
|
|
114 char *defalt = "inbox";
|
|
115 char *digestcomps = "digestcomps";
|
|
116 char *distcomps = "distcomps";
|
|
117 char *draft = "draft";
|
|
118 char *forwcomps = "forwcomps";
|
|
119 char *inbox = "inbox";
|
|
120 char *mh_defaults = etcpath (mh.profile);
|
|
121 char *mh_profile = ".mh_profile";
|
|
122 char *mhlformat = "mhl.format";
|
|
123 char *mhlforward = "mhl.forward";
|
|
124 char *nsequence = "Sequence-Negation";
|
|
125 char *pfolder = "Current-Folder";
|
|
126 char *psequence = "Previous-Sequence";
|
|
127 char *rcvdistcomps = "rcvdistcomps";
|
|
128 char *replcomps = "replcomps";
|
|
129 char *usequence = "Unseen-Sequence";
|
10
|
130 char *mhlibdir = "/usr/local/lib/mh"; /* NB: this will change */
|
0
|
131
|
|
132
|
|
133 /*
|
|
134 * MH not-so constants
|
|
135 */
|
|
136
|
|
137 char *context = "context";
|
|
138 #ifndef NOMHSEQ
|
|
139 char *mh_seq = ".mh_sequences";
|
|
140 #else /* NOMHSEQ */
|
|
141 char *mh_seq = NULL;
|
|
142 #endif /* NOMHSEQ */
|
|
143
|
|
144
|
|
145 /*
|
|
146 * MH globals
|
|
147 */
|
|
148
|
|
149 char ctxflags; /* status of user's context */
|
|
150
|
|
151 char *invo_name; /* pgm invocation name */
|
|
152 char *mypath; /* user's $HOME */
|
|
153 char *defpath; /* pathname of user's profile */
|
|
154 char *ctxpath; /* pathname of user's context */
|
|
155
|
|
156 struct node *m_defs; /* profile/context structure */
|
|
157
|
|
158 /* */
|
|
159
|
|
160 /*
|
|
161 * MH processes
|
|
162 */
|
|
163
|
|
164
|
|
165 /*
|
|
166 * mhl runs this program as a visual-end.
|
|
167 */
|
|
168
|
|
169 char *faceproc = NULL;
|
|
170
|
|
171
|
|
172 /*
|
|
173 * This program is usually called directly by users, but it is
|
|
174 * also invoked by the post program to process an "fcc".
|
|
175 */
|
|
176
|
|
177 char *fileproc = binpath (refile);
|
|
178
|
|
179
|
|
180 /*
|
|
181 * This program is called to incorporate messages into a folder.
|
|
182 */
|
|
183
|
|
184 char *incproc = binpath (inc);
|
|
185
|
|
186
|
|
187 /*
|
|
188 * When a user runs an MH program for the first time, this program
|
|
189 * is called to create his MH profile, and mail directory.
|
|
190 */
|
|
191
|
|
192 char *installproc = etcpath (install-mh);
|
|
193
|
|
194
|
|
195 /*
|
|
196 * This is the program invoked by a "list" response to "What now?"
|
|
197 * whereas, showproc is the program invoked by show, next, prev.
|
|
198 */
|
|
199
|
|
200 #ifndef MORE
|
|
201 char *lproc = "/usr/ucb/more";
|
|
202 #else /* MORE */
|
|
203 char *lproc = MORE;
|
|
204 #endif /* MORE */
|
|
205
|
|
206
|
|
207 /*
|
|
208 * This is the path for the Bell equivalent mail program.
|
|
209 */
|
|
210
|
|
211 char *mailproc = binpath (mhmail);
|
|
212
|
|
213
|
|
214 /*
|
|
215 * mhl runs this program as a front-end.
|
|
216 */
|
|
217
|
|
218 #ifndef MORE
|
|
219 char *moreproc = "/usr/ucb/more";
|
|
220 #else /* MORE */
|
|
221 char *moreproc = MORE;
|
|
222 #endif /* MORE */
|
|
223
|
|
224
|
|
225 /*
|
|
226 * This program is mhl - the nifty message lister
|
|
227 */
|
|
228
|
|
229 char *mhlproc = etcpath (mhl);
|
|
230
|
|
231
|
|
232 /*
|
|
233 * This is the super handy BBoard reading program, which is really just the MH
|
|
234 * shell program
|
|
235 */
|
|
236
|
|
237 char *mshproc = binpath (msh);
|
|
238
|
|
239
|
|
240 /*
|
|
241 * This program is called to pack a folder.
|
|
242 */
|
|
243
|
|
244 char *packproc = binpath (packf);
|
|
245
|
|
246
|
|
247 /*
|
|
248 * This is the delivery program called through send to
|
|
249 * actually deliver mail to users. This is the interface to
|
|
250 * the MTS.
|
|
251 */
|
|
252
|
|
253 #if BERK && SENDMTS && !SMTP
|
|
254 char *postproc = etcpath (spost);
|
|
255 #else
|
|
256 char *postproc = etcpath (post);
|
|
257 #endif /* BERK */
|
|
258
|
|
259
|
|
260 /*
|
|
261 * This program is called to remove a folder.
|
|
262 */
|
|
263
|
|
264 char *rmfproc = binpath (rmf);
|
|
265
|
|
266
|
|
267 /*
|
|
268 * This program is called to remove a message by rmm or refile -nolink.
|
|
269 * It's usually empty, which means to rename the file to a backup name.
|
|
270 */
|
|
271
|
|
272 char *rmmproc = NULL;
|
|
273
|
|
274
|
|
275 /*
|
|
276 * This program is usually called by the user's whatnowproc, but it
|
|
277 * may also be called directly to send a message previously composed.
|
|
278 */
|
|
279
|
|
280 char *sendproc = binpath (send);
|
|
281
|
|
282
|
|
283 /*
|
|
284 * This program is called to list messages by the show program.
|
|
285 * By setting showproc to mhl, the user can run mhl instead.
|
|
286 */
|
|
287
|
|
288 #ifndef MORE
|
|
289 char *showproc = "/usr/ucb/more";
|
|
290 #else /* MORE */
|
|
291 char *showproc = MORE;
|
|
292 #endif /* MORE */
|
|
293
|
|
294
|
|
295 /*
|
|
296 * This program is called under stand-alone MH to deliver a message to
|
|
297 * a local user. Under other MTS's it can be used to emulate a
|
|
298 * MMDF-II .maildelivery mechanism.
|
|
299 */
|
|
300
|
|
301 char *slocalproc = etcpath (slocal);
|
|
302
|
|
303
|
|
304 /*
|
|
305 * This program is called by vmh as the back-end to the window management
|
|
306 * protocol
|
|
307 */
|
|
308
|
|
309 char *vmhproc = binpath (msh);
|
|
310
|
|
311
|
|
312 /*
|
|
313 * This program is called after comp, et. al., have built a draft
|
|
314 */
|
|
315
|
|
316 char *whatnowproc = binpath (whatnow);
|
|
317
|
|
318
|
|
319 /*
|
|
320 * This program is called to list/validate the addresses in a message.
|
|
321 */
|
|
322
|
|
323 char *whomproc = binpath (whom);
|
|
324
|
|
325 /* */
|
|
326
|
|
327 /*
|
|
328 * This is the editor invoked by the various message composition
|
|
329 * programs. It SHOULD be a 2-D scope editor, such as Rand's ned
|
|
330 * or Berkeley's ex, but any editor will work. We use prompter as
|
|
331 * the default, since with -prepend it works just fine with forw.
|
|
332 */
|
|
333
|
|
334 char *sysed = "prompter";
|
|
335
|
|
336
|
|
337 /*
|
|
338 * This is the MH alias file.
|
|
339 */
|
|
340
|
|
341 char *AliasFile = etcpath (MailAliases);
|
|
342
|
|
343 /* */
|
|
344
|
|
345 /*
|
|
346 * File protections
|
|
347 */
|
|
348
|
|
349
|
|
350 /*
|
|
351 * Folders (directories) are created with this protection (mode)
|
|
352 */
|
|
353
|
|
354 #ifndef FOLDPROT
|
|
355 #define FOLDPROT "0711"
|
|
356 #endif /* not FOLDPROT */
|
|
357
|
|
358 char *foldprot = FOLDPROT;
|
|
359
|
|
360
|
|
361 /*
|
|
362 * Every NEW message will be created with this protection. When a
|
|
363 * message is filed it retains its protection, so this only applies
|
|
364 * to messages coming in through inc.
|
|
365 */
|
|
366
|
|
367 #ifndef MSGPROT
|
|
368 #define MSGPROT "0644"
|
|
369 #endif /* not MSGPROT */
|
|
370
|
|
371 char *msgprot = MSGPROT;
|