f38866b943b1ab8683d62643737713e6835c6697
[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 char *trashfolder = "+trash";
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 default program invoked by a "list" or "display" response
117 ** at the "What now?" prompt. It will be given the absolute pathname of
118 ** the message to show. The string ``show -file'' is most likely what you
119 ** want to be you listproc.
120 */
121 char *listproc = "show -file";
122
123 /*
124 ** This is used by mhl as a front-end.  It is also used
125 ** by mhshow as the default method of displaying message bodies
126 ** or message parts of type text/plain.
127 */
128 char *defaultpager = "more";
129
130 /*
131 ** This is the editor invoked by the various message
132 ** composition programs.  It SHOULD be a full screen
133 ** editor, such as vi or emacs, but any editor will work.
134 */
135 char *defaulteditor = "vi";
136
137 /*
138 ** This program is called after comp, et. al., have built a draft
139 */
140 char *whatnowproc = "whatnow";
141
142 /*
143 ** This is the sendmail interface to use for sending mail.
144 */
145 char *sendmail = SENDMAILPATH;
146
147 /*
148 ** This is the path to the system mail spool directory (e.g. `/var/mail').
149 */
150 char *mailspool = MAILSPOOL;
151
152
153 /*
154 ** file stuff
155 */
156
157 /*
158 ** The prefix that is prepended to the name of message files when they
159 ** are backup'd for some reason. send, for instance, does this.
160 ** Note: rmm does NOT anymore use the backup prefix.
161 ** It should typically be set to `,' or `#'.
162 */
163 char *backup_prefix = ",";
164
165 /*
166 ** Name of link to file to which you are replying or which you are
167 ** redistributing. See `$mhaltmsg' in the mh-profile(5) man page.
168 */
169 char *altmsglink = "@";
170
171 /*
172 ** Folders (directories) are created with this protection (mode)
173 */
174 char *foldprot = "0700";
175
176 /*
177 ** Every NEW message will be created with this protection.  When a
178 ** message is filed it retains its protection.
179 */
180 char *msgprot = "0600";
181
182
183
184 /*
185 ** Standard yes/no switches structure
186 */
187 struct swit anoyes[] = {
188         { "no", 0 },
189         { "yes", 0 },
190         { NULL, 0 }
191 };
192