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