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