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