1 /*$Id: idx.h,v 1.57 1999/11/29 04:54:01 lindberg Exp $*/
2 /*$Name: ezmlm-idx-040 $*/
6 /* Version of this release */
7 #define EZIDX_VERSION "ezmlm-idx-0.40\n"
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
15 /* Maximum number of messages returned by get */
16 /* You also have to update /text/bottom in ezmlmrc if you change this */
19 /* Number of messages before latest digest to return for list-get.99999_x */
20 /* This is still subject to the MAXGET restriction */
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 */
28 /* Max dir/text file size allowed by -edit */
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 */
37 #define BOUNCE_TIMEOUT 1000000L
39 /* ezmlm-limit defaults. Convert to moderation or defer if more than */
40 /* LIMMSG messages arrive within LIMSECS */
44 /* Command names and alternative command names */
45 /* all alternates must be defined! */
46 /* The language-specific blocks need to undefine and redefine commands */
48 #define ALT_LIST "list"
49 #define ALT_LISTN "listn"
50 #define ALT_EDIT "edit"
53 #define ALT_HELP "help"
54 #define ALT_INDEX "index"
55 #define ALT_INFO "info"
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"
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 */
72 #define ALT_SUBSCRIBE "-inscription"
73 #undef ALT_UNSUBSCRIBE
74 #define ALT_UNSUBSCRIBE "-desinscription"
76 /* end French Version */
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 */
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"
88 #define TXT_ADMINISTRIVIA "\nAdministrivia:\n\n"
89 #define TXT_SUPPRESSED "\n<suppressed>\n\n"
91 /* for the message author line: 000 by */
92 /* keep this short! */
93 #define TXT_BY " by: "
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"
99 /* should start with 20 'a' [in place of hash] */
100 #define TXT_NOINDEX "aaaaaaaaaaaaaaaaaaaa <- subject index not available for message(s) ->\n"
102 /* When copy of the message is suppressed (is this really used?)*/
103 #define TXT_SUPPRESSED "\n<suppressed>\n\n"
105 /* Subject: MODERATE for inlocal@inhost */
106 #define TXT_MODERATE "MODERATE for "
108 /* Subject: Returned post for inlocal@inhost */
109 /* (used both for rejected and timed-out posts) */
110 #define TXT_RETURNED_POST "Returned post for "
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 "
118 /* Subject: WELCOME to */
119 #define TXT_WELCOME "Subject: WELCOME to "
121 /* Subject: GOODBYE from */
122 #define TXT_GOODBYE "Subject: GOODBYE from "
124 /* Subject: ezmlm response\n */
125 #define TXT_EZMLM_RESPONSE "Subject: ezmlm response\n"
127 /* Subject: majordomo results\n\n [where "majordomo" is outlocal] */
128 #define TXT_RESULTS " results\n\n"
130 /* Subject: Edit file xxx for list@host */
131 #define TXT_EDIT_RESPONSE "Subject: EDIT "
132 #define TXT_EDIT_FOR " for "
134 /* Subject: Editable text files\n */
135 #define TXT_EDIT_LIST "Subject: List of editable text files\n"
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"
142 #define TXT_EDIT_SUCCESS "Subject: Success editing "
144 /* Text for '-list' command */
145 #define TXT_LISTMEMBERS "\nSubscribers to this list are:\n\n"
147 /* Output formats - letter used to override default */
148 #define FORMATS "mrvnx"
151 /* ---------------- virgin = MIME without header processing */
153 /* NATIVE 'n' = VIRGIN without threading */
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) */
159 /* default output format. */
160 #define DEFAULT_FORMAT MIME
162 /* Use MIME enclosure for message to moderate by default (1) or not (0) */
163 /* ezmlm-store switches -m/-M override */
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
170 /* #define DIGEST_PART_FILENAME */
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
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"
181 /* ezmlm-request actions */
182 #define ACTION_REQUEST "request"
184 /* actions for post acceptance/rejection */
185 #define ACTION_ACCEPT "accept-"
186 #define ACTION_REJECT "reject-"
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."
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' */
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."
217 /* name addition for digest, i.e. list-"digest" Don't change! */
218 #define ACTION_DIGEST "digest"
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"
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. */
229 #define DELAY_DEFAULT 120
230 #define DELAY_MAX 240
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
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 */
241 #define TXT_ETC_EZMLMRC "/etc/ezmlm/ezmlmrc"
243 /* same name added to auto_bin. Note leading slash! */
244 #define TXT_EZMLMRC "/ezmlmrc"
246 /* same in dot dir for local config (-c) */
247 #define TXT_DOTEZMLMRC ".ezmlmrc"
249 /* name of config file for ezmlm-cron */
250 #define TXT_EZCRONRC "ezcronrc"
252 /* default timestamp for ezmlm-limit */
253 #define TXT_LOOPNUM "loopnum"
255 /* ezmlm-cgi config file for normal SUID root install */
256 #define EZ_CGIRC "/etc/ezmlm/ezcgirc"
258 /* ezmlm-cgi config file for local install we expect to find the file in PWD */
259 #define EZ_CGIRC_LOC ".ezcgirc"
261 /* default charset for ezmlm-cgi [config file overrides per list] */
262 #define EZ_CHARSET "iso-8859-1"
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: "
269 /* max no of bounces that ezmlm-receipt stores */
270 #define MAX_MAIN_BOUNCES 50
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
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 "/usr/sbin/qmail-queue"
289 #define PROG_QMAIL_QMQPC "/usr/sbin/qmail-qmqpc"
291 /*---------- Things below this line are not configurable -----------*/
292 /* file in DIR that has the qmqpc servers (if any) */
293 #define QMQPSERVERS "qmqpservers"
309 #define AC_SUBSCRIBE 10
310 #define AC_UNSUBSCRIBE 11
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 */
320 typedef struct subentry { /* one per unique subject in message range */
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 */
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 */
334 typedef struct authentry { /* one per unique author in message range */
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 */
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 */
348 typedef struct dateentry { /* date yyyymm and 1st message of that date */