83ea0aede99b34be935cf739e6f3b468ab6a7567
[mmh] / config / config.c
1 /*
2 ** config.c -- master nmh configuration file
3 **
4 ** This code is Copyright (c) 2002, by the authors of nmh.  See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
7 */
8
9 #include <h/mh.h>
10
11
12 /*
13 ** Standard yes/no switches structure
14 */
15 struct swit anoyes[] = {
16         { "no", 0 },
17         { "yes", 0 },
18         { NULL, 0 }
19 };
20
21
22 /*
23 ** nmh constants
24 */
25
26 /* initial profile for new users */
27 char *mh_defaults = NMHETCDIR"/mh.profile";
28
29 /* default name of user profile */
30 char *mh_profile = ".mh_profile";
31
32 /* name of current message "sequence" */
33 char *current = "cur";
34
35 /* standard component files */
36 char *components     = "components";       /* comp         */
37 char *replcomps      = "replcomps";        /* repl         */
38 char *replgroupcomps = "replgroupcomps";   /* repl -group  */
39 char *forwcomps      = "forwcomps";        /* forw         */
40 char *distcomps      = "distcomps";        /* dist         */
41 char *rcvdistcomps   = "rcvdistcomps";     /* rcvdist      */
42 char *digestcomps    = "digestcomps";      /* forw -digest */
43
44 /* standard format (filter) files */
45 char *mhlformat      = "mhl.format";       /* show         */
46 char *mhlreply       = "mhl.reply";        /* repl -filter */
47 char *mhlforward     = "mhl.forward";      /* forw -filter */
48
49 char *draftfolder = "+drafts";
50
51 char *inbox = "Inbox";
52 char *defaultfolder = "+inbox";
53
54 char *curfolder = "Current-Folder";
55 char *usequence = "Unseen-Sequence";
56 char *psequence = "Previous-Sequence";
57 char *nsequence = "Sequence-Negation";
58
59 /* profile entries for storage locations */
60 char *nmhstorage   = "nmh-storage";
61 char *nmhcache     = "nmh-cache";
62 char *nmhprivcache = "nmh-private-cache";
63
64 /* profile entry for external ftp access command */
65 char *nmhaccessftp = "nmh-access-ftp";
66
67 char *mhlibdir = NMHLIBDIR;
68 char *mhetcdir = NMHETCDIR;
69
70
71 /*
72 ** nmh not-so constants
73 */
74
75 /*
76 ** Default name for the nmh context file.
77 */
78 char *context = "context";
79
80 /*
81 ** Default name of file for public sequences.  If NULL,
82 ** then nmh will use private sequences by default, unless the
83 ** user defines a value using the "mh-sequences" profile entry.
84 */
85 #ifdef NOPUBLICSEQ
86 char *mh_seq = NULL;
87 #else
88 char *mh_seq = ".mh_sequences";
89 #endif
90
91
92 /*
93 ** nmh globals
94 */
95
96 char ctxflags;          /* status of user's context   */
97 char *invo_name;        /* command invocation name    */
98 char *mypath;           /* user's $HOME               */
99 char *defpath;          /* pathname of user's profile */
100 char *ctxpath;          /* pathname of user's context */
101 struct node *m_defs;    /* profile/context structure  */
102
103
104 /*
105 ** nmh processes
106 */
107
108 /*
109 ** This is the program to process MIME composition files
110 */
111 char *buildmimeproc = NMHBINDIR"/mhbuild";
112
113 /*
114 ** This is the program to `cat' a file.
115 */
116 char *catproc = "/bin/cat";
117
118 /*
119 ** mhl runs this program as a visual-end.
120 */
121 char *faceproc = NULL;
122
123 /*
124 ** This program is usually called directly by users, but it is
125 ** also invoked by the spost program to process an "Fcc", or by
126 ** comp/repl/forw/dist to refile a draft message.
127 */
128 char *fileproc = NMHBINDIR"/refile";
129
130 /*
131 ** This program is called to incorporate messages into a folder.
132 */
133 char *incproc = NMHBINDIR"/inc";
134
135 /*
136 ** When a user runs an nmh program for the first time, this program
137 ** is called to create his nmh profile, and mail directory.
138 */
139 char *installproc = NMHLIBDIR"/install-mh";
140
141 /*
142 ** This is the default program invoked by a "list" response
143 ** at the "What now?" prompt.  It is also used by the draft
144 ** folder facility in comp/dist/forw/repl to display the
145 ** draft message.
146 */
147 char *lproc = "more";
148
149 /*
150 ** This is the path for the Bell equivalent mail program.
151 */
152 char *mailproc = NMHBINDIR"/mhmail";
153
154 /*
155 ** This is used by mhl as a front-end.  It is also used
156 ** by mhshow as the default method of displaying message bodies
157 ** or message parts of type text/plain.
158 */
159 char *moreproc = "more";
160
161 /*
162 ** This is the program (mhl) used to filter messages.  It is
163 ** used by mhshow to filter and display the message headers of
164 ** MIME messages.  It is used by repl/forw (with -filter)
165 ** to filter the message to which you are replying/forwarding.
166 ** It is used by send/spost (with -filter) to filter the message
167 ** for "Bcc:" recipients.
168 */
169 char *mhlproc = NMHLIBDIR"/mhl";
170
171 /*
172 ** This program is called to pack a folder.
173 */
174 char *packproc = NMHBINDIR"/packf";
175
176 /*
177 ** This is the delivery program called by send to actually
178 ** deliver mail to users.  This is the interface to the MTS.
179 */
180 char *postproc = NMHLIBDIR"/spost";
181
182 /*
183 ** This is program is called by slocal to handle
184 ** the action `folder' or `+'.
185 */
186 char *rcvstoreproc = NMHLIBDIR"/rcvstore";
187
188 /*
189 ** This program is called to remove a folder.
190 */
191 char *rmfproc = NMHBINDIR"/rmf";
192
193 /*
194 ** This program is called to remove a message by rmm or refile -nolink.
195 ** It's usually empty, which means to rename the file to a backup name.
196 */
197 char *rmmproc = NULL;
198
199 /*
200 ** This program is usually called by the user's whatnowproc, but it
201 ** may also be called directly to send a message previously composed.
202  */
203 char *sendproc = NMHBINDIR"/send";
204
205 /*
206 ** This is the path to the program used by "show"
207 ** to display non-text (MIME) messages.
208 */
209 char *showmimeproc = NMHBINDIR"/mhshow";
210
211 /*
212 ** This is the default program called by "show" to filter
213 ** and display standard text (non-MIME) messages.  It can be
214 ** changed to a pager (such as "more" or "less") if you prefer
215 ** that such message not be filtered in any way.
216 */
217 char *showproc = NMHLIBDIR"/mhl";
218
219 /*
220 ** This program is called after comp, et. al., have built a draft
221 */
222 char *whatnowproc = NMHBINDIR"/whatnow";
223
224 /*
225 ** This is the sendmail interface to use for sending mail.
226 */
227 char *sendmail = SENDMAILPATH;
228
229 /*
230 ** The prefix that is prepended to the name of message files when they
231 ** are "removed" by rmm. This should typically be `,' or `#'.
232 */
233 char *backup_prefix = ",";
234
235 /*
236 ** This is the editor invoked by the various message
237 ** composition programs.  It SHOULD be a full screen
238 ** editor, such as vi or emacs, but any editor will work.
239 */
240 char *defaulteditor = "vi";
241
242 /*
243 ** Name of link to file to which you are replying or which you are
244 ** redistributing. See `$mhaltmsg' in the mh-profile(5) man page.
245 */
246 char *altmsglink = "@";
247
248 /*
249 ** This is the global nmh alias file.  It is somewhat obsolete, since
250 ** global aliases should be handled by the Mail Transport Agent (MTA).
251 */
252 char *AliasFile = NMHETCDIR"/MailAliases";
253
254 /*
255 ** Folders (directories) are created with this protection (mode)
256 */
257 char *foldprot = "700";
258
259 /*
260 ** Every NEW message will be created with this protection.  When a
261 ** message is filed it retains its protection, so this only applies
262 ** to messages coming in through inc.
263 */
264 char *msgprot = "600";