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