Commit | Line | Data |
---|---|---|
f8beb284 MW |
1 | /*$Id: idx.h,v 1.57 1999/11/29 04:54:01 lindberg Exp $*/ |
2 | /*$Name: ezmlm-idx-040 $*/ | |
3 | #ifndef IDX_H | |
4 | #define IDX_H | |
5 | ||
6 | /* Version of this release */ | |
7 | #define EZIDX_VERSION "ezmlm-idx-0.40\n" | |
8 | ||
9 | /* Range for '-thread' to protect large archives. A '-thread' search */ | |
10 | /* will start at most THREAD_BEFORE messages before the action argument */ | |
11 | /* and go to at most THREAD_AFTER messages after the action argument. */ | |
12 | #define THREAD_BEFORE 2000 | |
13 | #define THREAD_AFTER 2000 | |
14 | ||
15 | /* Maximum number of messages returned by get */ | |
16 | /* You also have to update /text/bottom in ezmlmrc if you change this */ | |
17 | #define MAXGET 100 | |
18 | ||
19 | /* Number of messages before latest digest to return for list-get.99999_x */ | |
20 | /* This is still subject to the MAXGET restriction */ | |
21 | #define HISTGET 30 | |
22 | ||
23 | /* Maximum subject index entries returned by index */ | |
24 | /* Must be multiple of 100 */ | |
25 | /* You also have to update /text/bottom in ezmlmrc if you change this */ | |
26 | #define MAXINDEX 2000 | |
27 | ||
28 | /* Max dir/text file size allowed by -edit */ | |
29 | #define MAXEDIT 10240 | |
30 | ||
31 | /* Timeout in seconds before a bounce warning is sent. Default is */ | |
32 | /* 1000000, i.e. 11.57 days. Setting it lower reduces the number of */ | |
33 | /* messages in the bouce dir, but makes it more likely that an address */ | |
34 | /* is unsubscribed due to a temporary error. This compile-time default */ | |
35 | /* should rarely need changing, as it can be overridden with the ezmlm-warn */ | |
36 | /* -t switch */ | |
37 | #define BOUNCE_TIMEOUT 1000000L | |
38 | ||
39 | /* ezmlm-limit defaults. Convert to moderation or defer if more than */ | |
40 | /* LIMMSG messages arrive within LIMSECS */ | |
41 | #define LIMMSG 30L | |
42 | #define LIMSECS 3600L | |
43 | ||
44 | /* Command names and alternative command names */ | |
45 | /* all alternates must be defined! */ | |
46 | /* The language-specific blocks need to undefine and redefine commands */ | |
47 | ||
48 | #define ALT_LIST "list" | |
49 | #define ALT_LISTN "listn" | |
50 | #define ALT_EDIT "edit" | |
51 | #define ALT_FAQ "faq" | |
52 | #define ALT_GET "get" | |
53 | #define ALT_HELP "help" | |
54 | #define ALT_INDEX "index" | |
55 | #define ALT_INFO "info" | |
56 | #define ALT_LOG "log" | |
57 | #define ALT_REQUEST "request" | |
58 | #define ALT_SUBSCRIBE "subscribe" | |
59 | #define ALT_THREAD "thread" | |
60 | #define ALT_UNSUBSCRIBE "unsubscribe" | |
61 | #define ALT_QUERY "query" | |
62 | ||
63 | /* to get alternative command names, you need to undefine and redefine */ | |
64 | /* them. Do this within a language block and send it to the author for */ | |
65 | /* inclusing in future versions. If it's here already, just uncomment the */ | |
66 | /* define for the appropriate language. */ | |
67 | /* #define LANG_FR 1 */ | |
68 | ||
69 | /* French Version */ | |
70 | #ifdef LANG_FR | |
71 | #undef ALT_SUBSCRIBE | |
72 | #define ALT_SUBSCRIBE "-inscription" | |
73 | #undef ALT_UNSUBSCRIBE | |
74 | #define ALT_UNSUBSCRIBE "-desinscription" | |
75 | #endif | |
76 | /* end French Version */ | |
77 | ||
78 | /* Text that is used in the outgoing messages (there is some other text, but */ | |
79 | /* it needs to stay constant in order to comply with rfc1153 */ | |
80 | ||
81 | /* Topics (messages nnn through mmm):\n */ | |
82 | #define TXT_TOP_TOPICS "Topics" | |
83 | #define TXT_TOP_MESSAGES " (messages " | |
84 | #define TXT_TOP_THROUGH " through " | |
85 | #define TXT_TOP_LAST "):\n" | |
86 | ||
87 | /* in digest */ | |
88 | #define TXT_ADMINISTRIVIA "\nAdministrivia:\n\n" | |
89 | #define TXT_SUPPRESSED "\n<suppressed>\n\n" | |
90 | ||
91 | /* for the message author line: 000 by */ | |
92 | /* keep this short! */ | |
93 | #define TXT_BY " by: " | |
94 | ||
95 | /* Since this is now run-time configurable, we'll go with the lowest */ | |
96 | /* common denominator (per rfc2046). -> ISO-8859-1 if you don't like that */ | |
97 | #define TXT_DEF_CHARSET "us-ascii" | |
98 | ||
99 | /* should start with 20 'a' [in place of hash] */ | |
100 | #define TXT_NOINDEX "aaaaaaaaaaaaaaaaaaaa <- subject index not available for message(s) ->\n" | |
101 | ||
102 | /* When copy of the message is suppressed (is this really used?)*/ | |
103 | #define TXT_SUPPRESSED "\n<suppressed>\n\n" | |
104 | ||
105 | /* Subject: MODERATE for inlocal@inhost */ | |
106 | #define TXT_MODERATE "MODERATE for " | |
107 | ||
108 | /* Subject: Returned post for inlocal@inhost */ | |
109 | /* (used both for rejected and timed-out posts) */ | |
110 | #define TXT_RETURNED_POST "Returned post for " | |
111 | ||
112 | /* Subject: CONFIRM subscribe to | unsubscribe from */ | |
113 | #define TXT_USRCONFIRM "confirm " | |
114 | #define TXT_MODCONFIRM "CONFIRM " | |
115 | #define TXT_SUBSCRIBE_TO "subscribe to " | |
116 | #define TXT_UNSUBSCRIBE_FROM "unsubscribe from " | |
117 | ||
118 | /* Subject: WELCOME to */ | |
119 | #define TXT_WELCOME "Subject: WELCOME to " | |
120 | ||
121 | /* Subject: GOODBYE from */ | |
122 | #define TXT_GOODBYE "Subject: GOODBYE from " | |
123 | ||
124 | /* Subject: ezmlm response\n */ | |
125 | #define TXT_EZMLM_RESPONSE "Subject: ezmlm response\n" | |
126 | ||
127 | /* Subject: majordomo results\n\n [where "majordomo" is outlocal] */ | |
128 | #define TXT_RESULTS " results\n\n" | |
129 | ||
130 | /* Subject: Edit file xxx for list@host */ | |
131 | #define TXT_EDIT_RESPONSE "Subject: EDIT " | |
132 | #define TXT_EDIT_FOR " for " | |
133 | ||
134 | /* Subject: Editable text files\n */ | |
135 | #define TXT_EDIT_LIST "Subject: List of editable text files\n" | |
136 | ||
137 | /* markers for ezmlm-manage text file edit */ | |
138 | /* MUST start with '%' */ | |
139 | #define TXT_EDIT_START "%%% START OF TEXT FILE" | |
140 | #define TXT_EDIT_END "%%% END OF TEXT FILE" | |
141 | ||
142 | #define TXT_EDIT_SUCCESS "Subject: Success editing " | |
143 | ||
144 | /* Text for '-list' command */ | |
145 | #define TXT_LISTMEMBERS "\nSubscribers to this list are:\n\n" | |
146 | ||
147 | /* Output formats - letter used to override default */ | |
148 | #define FORMATS "mrvnx" | |
149 | #define MIME 'm' | |
150 | #define RFC1153 'r' | |
151 | /* ---------------- virgin = MIME without header processing */ | |
152 | #define VIRGIN 'v' | |
153 | /* NATIVE 'n' = VIRGIN without threading */ | |
154 | #define NATIVE 'n' | |
155 | /* MIXED => multipart/mixed MIME instead of multipart/digest. Needed to bypass*/ | |
156 | /* pine bug when content-transfer-encoding is used (pine fails to show the */ | |
157 | /* initial encoded text/plain part of mulpart/digest, but not of ../mixed) */ | |
158 | #define MIXED 'x' | |
159 | /* default output format. */ | |
160 | #define DEFAULT_FORMAT MIME | |
161 | ||
162 | /* Use MIME enclosure for message to moderate by default (1) or not (0) */ | |
163 | /* ezmlm-store switches -m/-M override */ | |
164 | #define MOD_MIME 1 | |
165 | ||
166 | /* Used to add "filname=listname.msgno" to digest part content-type line. | |
167 | This confuses the heck out of Outlook Express 5.0. To circumvent this | |
168 | bug the addition has been removed. Uncomment the next line to get it | |
169 | anyway. */ | |
170 | /* #define DIGEST_PART_FILENAME */ | |
171 | ||
172 | /* Mode of messages in archive. For ezmlm-0.53 this is 0744, but for */ | |
173 | /* "secret" lists it may make more sense to make it 0700. */ | |
174 | #define MODE_ARCHIVE 0744 | |
175 | ||
176 | /* ezmlm-get actions (ACTION_GET also for -get in ezmlm-manage) */ | |
177 | #define ACTION_GET "get" | |
178 | #define ACTION_INDEX "index" | |
179 | #define ACTION_THREAD "thread" | |
180 | ||
181 | /* ezmlm-request actions */ | |
182 | #define ACTION_REQUEST "request" | |
183 | ||
184 | /* actions for post acceptance/rejection */ | |
185 | #define ACTION_ACCEPT "accept-" | |
186 | #define ACTION_REJECT "reject-" | |
187 | ||
188 | /* ezmlm-manage actions */ | |
189 | #define ACTION_LIST "list" | |
190 | #define ACTION_LISTN "listn" | |
191 | #define ACTION_HELP "help" | |
192 | #define ACTION_INFO "info" | |
193 | #define ACTION_FAQ "faq" | |
194 | #define ACTION_LOG "log" | |
195 | #define ACTION_SUBSCRIBE "subscribe" | |
196 | #define ACTION_UNSUBSCRIBE "unsubscribe" | |
197 | #define ACTION_QUERY "query" | |
198 | #define ACTION_EDIT "edit" | |
199 | /* if you change this, you MUST ADJUST LENGTH_ED as well! */ | |
200 | #define ACTION_ED "ed." | |
201 | #define LENGTH_ED 3 | |
202 | ||
203 | /* ACTION_XC has to be a string "-xc." where x is any letter. All commands */ | |
204 | /* should have different letters. They no longer have to match the first */ | |
205 | /* letter of subscribe/unsubscribe. */ | |
206 | /* The third char of ACTION_SC/TC/UV/VC has to be 'c' */ | |
207 | ||
208 | /* user subscription confirm */ | |
209 | #define ACTION_SC "sc." | |
210 | /* moderator subscription confirm */ | |
211 | #define ACTION_TC "tc." | |
212 | /* user unsubscribe confirm */ | |
213 | #define ACTION_UC "uc." | |
214 | /* moderator unsubscribe confirm */ | |
215 | #define ACTION_VC "vc." | |
216 | ||
217 | /* name addition for digest, i.e. list-"digest" Don't change! */ | |
218 | #define ACTION_DIGEST "digest" | |
219 | ||
220 | /* name addition for dir/extra db, i.e. list-"allow" */ | |
221 | #define ACTION_ALLOW "allow" | |
222 | /* name addition for dir/blacklist db, i.e. list-"deny" */ | |
223 | #define ACTION_DENY "deny" | |
224 | ||
225 | /* defaults for message time out in moderation queue. If modsub is 0 */ | |
226 | /* or empty, DELAY_DEFAULT is used. If it is set, it is made to be */ | |
227 | /* within DELAY_MIN .. DELAY_MAX. All in hours. */ | |
228 | #define DELAY_MIN 24 | |
229 | #define DELAY_DEFAULT 120 | |
230 | #define DELAY_MAX 240 | |
231 | ||
232 | /* Mode of messages in moderation queue. The owner mode is |'d with 7.*/ | |
233 | /* The group/world mode can be set to anything, but it really doesn't */ | |
234 | /* make sense to make these messages visible to anyone else. */ | |
235 | #define MODE_MOD_MSG 0700 | |
236 | ||
237 | /* name and location of system-wide customized ezmlmrc. This is where */ | |
238 | /* ezmlm-make looks first (unless the -c switch is specified) before */ | |
239 | /* falling back to the (usually unchanged) version in the ezmlm bin */ | |
240 | /* directory. */ | |
241 | #define TXT_ETC_EZMLMRC "/etc/ezmlm/ezmlmrc" | |
242 | ||
243 | /* same name added to auto_bin. Note leading slash! */ | |
244 | #define TXT_EZMLMRC "/ezmlmrc" | |
245 | ||
246 | /* same in dot dir for local config (-c) */ | |
247 | #define TXT_DOTEZMLMRC ".ezmlmrc" | |
248 | ||
249 | /* name of config file for ezmlm-cron */ | |
250 | #define TXT_EZCRONRC "ezcronrc" | |
251 | ||
252 | /* default timestamp for ezmlm-limit */ | |
253 | #define TXT_LOOPNUM "loopnum" | |
254 | ||
255 | /* ezmlm-cgi config file for normal SUID root install */ | |
256 | #define EZ_CGIRC "/etc/ezmlm/ezcgirc" | |
257 | ||
258 | /* ezmlm-cgi config file for local install we expect to find the file in PWD */ | |
259 | #define EZ_CGIRC_LOC ".ezcgirc" | |
260 | ||
261 | /* default charset for ezmlm-cgi [config file overrides per list] */ | |
262 | #define EZ_CHARSET "iso-8859-1" | |
263 | ||
264 | /*------------ Specific to SQL version ------------------------------*/ | |
265 | /* cookie tag for SQL version of sublisting */ | |
266 | /* NOTE: Need to include terminal space! */ | |
267 | #define TXT_TAG "X-Ezauth: " | |
268 | ||
269 | /* max no of bounces that ezmlm-receipt stores */ | |
270 | #define MAX_MAIN_BOUNCES 50 | |
271 | ||
272 | /* Length of domain field for SQL version. It does only the text after */ | |
273 | /* the last '.' in the address, so there is no reason to set it to */ | |
274 | /* anything other than '3'. We truncate it rather than relying on the */ | |
275 | /* SQL Server since we can't be sure that the SQL Server doesn't have */ | |
276 | /* buffer overrun holes and the address is user-controlled */ | |
277 | #define DOMAIN_LENGTH 3 | |
278 | ||
279 | /* programs used for outgoing mail. Normally, qmail-queue is used. Replace */ | |
280 | /* with qmail-qmqpc to use only qmqp for outgoing mail. QMQPC is for */ | |
281 | /* large lists when DIR/qmqpservers is present. Only posts and digests will */ | |
282 | /* use QMQP. If the normal qmail-qmqpc is used the contents of */ | |
283 | /* DIR/qmqpcservers are ignored. With a patch, qmail-qmqpc will use the */ | |
284 | /* servers on it's command line. In this case, the IP addresses listed one */ | |
285 | /* per line in DIR/qmqpservers will be tried until a working one is found. */ | |
286 | /* the option is mainly to allow large list clusters on a single host to use */ | |
287 | /* different QMQPC hosts as exploders.*/ | |
288 | #define PROG_QMAIL_QUEUE "bin/qmail-queue" | |
289 | #define PROG_QMAIL_QMQPC "bin/qmail-qmqpc" | |
290 | ||
291 | /*---------- Things below this line are not configurable -----------*/ | |
292 | /* file in DIR that has the qmqpc servers (if any) */ | |
293 | #define QMQPSERVERS "qmqpservers" | |
294 | /* database types */ | |
295 | #define FLD_DIGEST 1 | |
296 | #define FLD_ALLOW 2 | |
297 | #define FLD_DENY 3 | |
298 | /* Action types */ | |
299 | #define AC_NONE 0 | |
300 | #define AC_GET 1 | |
301 | #define AC_DIGEST 2 | |
302 | #define AC_THREAD 3 | |
303 | #define AC_INDEX 4 | |
304 | #define AC_LIST 5 | |
305 | #define AC_HELP 6 | |
306 | #define AC_EDIT 7 | |
307 | #define AC_DENY 8 | |
308 | #define AC_LOG 9 | |
309 | #define AC_SUBSCRIBE 10 | |
310 | #define AC_UNSUBSCRIBE 11 | |
311 | #define AC_SC 12 | |
312 | #define AC_LISTN 13 | |
313 | ||
314 | typedef struct msgentry { /* one per message in range */ | |
315 | unsigned long subnum; /* subject number */ | |
316 | unsigned long authnum; /* message author number */ | |
317 | unsigned int date; /* yyyymm as number */ | |
318 | } msgentry; | |
319 | ||
320 | typedef struct subentry { /* one per unique subject in message range */ | |
321 | void *higher; | |
322 | void *lower; | |
323 | char *sub; /* string with terminating '\0' */ | |
324 | /* when building, higher/lower=0 marks end */ | |
325 | /* of branch. When printing, start at the */ | |
326 | /* beginning of the table and go up until */ | |
327 | /* sub = 0. */ | |
328 | unsigned int sublen; | |
329 | unsigned long firstmsg; /* the first message with this subject*/ | |
330 | unsigned long lastmsg; /* the last message with this subject*/ | |
331 | unsigned char msginthread; /* number of messages seen in this thread */ | |
332 | } subentry; | |
333 | ||
334 | typedef struct authentry { /* one per unique author in message range */ | |
335 | void *higher; | |
336 | void *lower; | |
337 | char *auth; /* string with terminating '\0' */ | |
338 | /* when building, higher/lower=0 marks end */ | |
339 | /* of branch. When printing, start at the */ | |
340 | /* beginning of the table and go up until */ | |
341 | /* auth = 0. */ | |
342 | unsigned long authlen; | |
343 | unsigned long firstmsg; /* the first message with this author */ | |
344 | /* lastmsg not very useful as author are less */ | |
345 | /* clustered than threads */ | |
346 | } authentry; | |
347 | ||
348 | typedef struct dateentry { /* date yyyymm and 1st message of that date */ | |
349 | unsigned int date; | |
350 | unsigned int msg; | |
351 | } dateentry; | |
352 | ||
353 | #endif | |
354 |