]> code.citadel.org Git - citadel.git/blob - citadel/ChangeLog
* newinstall.sh: various tweaks to make it more reliable
[citadel.git] / citadel / ChangeLog
1  $Log$
2  Revision 624.2  2004/08/15 05:04:36  ajc
3  * newinstall.sh: various tweaks to make it more reliable
4
5  Revision 624.1  2004/08/14 03:59:43  ajc
6  * newinstall.sh: shuffled around the environment variables to prevent
7    "C compiler cannot generate executables" error.
8
9  Revision 624.0  2004/08/12 13:47:47  ajc
10  * THIS IS 6.24
11
12  Revision 623.16  2004/08/11 04:09:14  ajc
13  * Replaced all "Citadel/UX" references with "Citadel"
14
15  Revision 623.15  2004/08/05 03:19:48  ajc
16  * html.c: handle the <BLOCKQUOTE> tag properly
17
18  Revision 623.14  2004/08/05 02:02:33  ajc
19  * CtdlHostAlias() now accepts "localhost" as a localhost address.
20  * working_ignetcfg is now loaded during incoming NETP commands, which
21  should theoretically take care of the missing config problem.
22
23  Revision 623.13  2004/08/02 02:51:03  ajc
24  * utilsmenu: removed.  Because most of the admin functions have been moved
25    into Citadel proper, what's left of this menu is now pathetic.
26  * techdoc/build.txt: removed verbage that referred to the old build system.
27
28  Revision 623.12  2004/07/30 03:18:21  ajc
29  * user_ops.c: limit the length of the name which can be supplied
30    to CtdlLoginExistingUser() to avoid crashing it.
31
32  Revision 623.11  2004/07/28 04:09:58  ajc
33  * serv_network.c: we had ignetcfg and working_ignetcfg, but it turns out we
34    no longer use the former anywhere, so it has been removed (along with the
35    aftersave hook that detected changes)
36
37  Revision 623.10  2004/07/25 16:20:04  error
38  * msgbase.c: CtdlCheckInternetMailPermission(): Do not allow twits to send
39    Internet mail (they shouldn't be sending ANYTHING at all)
40
41  Revision 623.9  2004/07/25 16:18:43  error
42  * citadel.spec: update version number
43
44  Revision 623.8  2004/07/25 16:17:37  error
45  * stress.c:  Slightly more verbose output
46
47  Revision 623.7  2004/07/25 16:16:19  error
48  * citadel_decls.h: fixed the new logoff() macro
49
50  Revision 623.6  2004/07/24 05:11:52  ajc
51  * citadel.c: temporarily commented out the signal() call for SIGHUP because
52    it is causing the client not to work at all on Linux 2.6 (or at least on
53    Fedora Core 2) when citadel is called as the login shell -- a SIGHUP is
54    mysteriously received at the username prompt and the program exits.
55
56  Revision 623.5  2004/07/15 02:54:49  ajc
57  * serv_network.c: grab and use a networker-local copy of the network
58    configuration, ensuring that it doesn't accidentally get clobbered while
59    the network is running.
60
61  Revision 623.4  2004/07/11 18:41:39  ajc
62  * Updated roadmap document slightly
63
64  Revision 623.3  2004/07/11 03:59:02  ajc
65  serv_network.c: small fix to above
66
67  Revision 623.2  2004/07/11 03:50:31  ajc
68  * serv_network.c: removed a stray end_critical_section()
69  * serv_network.c: purge invalid ignet_push_share entries during
70    netconfig load instead of during rewrite
71
72  Revision 623.1  2004/07/10 02:51:01  ajc
73  * Changed "policy set" message to "policy has been updated" to make it
74    clearer.
75
76  Revision 623.0  2004/07/06 18:15:04  ajc
77  * THIS IS 6.23
78
79  Revision 622.7  2004/07/06 18:09:13  ajc
80  * When writing a message body to the CDB_BIGMSGS table instead of the main
81    message base, increase data length by one byte in order to include the
82    NULL terminator.  (Doh!)
83
84  Revision 622.6  2004/07/03 04:09:37  ajc
85  * Check the "Permission to send Internet mail" access controls when
86    messages are submitted via Authenticated SMTP.
87
88  Revision 622.5  2004/06/28 17:09:20  ajc
89  * Properly re-terminate messages posted via IMAP APPEND.  The newline
90    conversion process was shortening the text but not adjusting string
91    termination, causing extra message snippets to appear.
92
93  Revision 622.4  2004/06/24 20:38:06  ajc
94  * updated serv_vandelay.c to include new "c_ip_addr" config
95
96  Revision 622.3  2004/06/24 20:33:37  ajc
97  * Bumped internal version number to 6.23
98  * Added "Server IP address" to config (server, client, docs)
99
100  Revision 622.2  2004/06/24 15:26:33  ajc
101  * Updated the ig_tcp_server() function to allow binding to a single IP
102    address.  This is not yet used by anything.
103
104  Revision 622.1  2004/06/24 02:34:39  ajc
105  * serv_imap.c: when an IMAP socket breaks while a folder is selected,
106    auto-expunge the folder before closing it.  Fixes the "mysteriously
107    reappearing deleted messages" for clients that just drop the session
108    without issuing a CLOSE when the user closes the window.
109
110  Revision 622.0  2004/06/19 03:20:22  ajc
111  * THIS IS 6.22
112
113  Revision 621.19  2004/06/19 03:13:26  ajc
114  * Updated internal version number to 6.22
115
116  Revision 621.18  2004/06/19 02:35:16  ajc
117  *** empty log message ***
118
119  Revision 621.17  2004/06/19 02:33:54  ajc
120  * Removed the configuration option "Allow Aides access to all mailboxes."
121    This functionality *must* always be enabled for administrative create/edit
122    of vCards, which live in the user's My Citadel Config> room.
123
124  Revision 621.16  2004/06/16 04:17:43  ajc
125  * More scheduler changes.  Removed the rescan pipe again, and also
126    removed the mutex wrapper around select().  In my initial testing I am
127    getting reliable, fast service, but further testing is needed.
128
129  Revision 621.15  2004/06/16 03:13:02  ajc
130  * Scheduler fix ... added the rescan pipe back in
131
132  Revision 621.14  2004/06/15 20:42:42  ajc
133  * Store the body of any large (>1K) message in a separate database.  This
134    will allow fast headers-only retrieval later.
135
136  Revision 621.13  2004/06/15 03:05:01  ajc
137  * Bumped internal version number to 6.22
138  * Added a new faster headers-only mode that excludes enumeration of
139    MIME parts.
140
141  Revision 621.12  2004/06/14 19:09:26  ajc
142  * serv_vandelay.c: re-inserted a missing line of code for setting tempfile
143    names, which was causing exports to crash.
144
145  Revision 621.11  2004/06/11 01:26:02  ajc
146  * Optimized the scheduler some more.  The S_I_WANNA_SELECT mutex now
147    wraps only the select() call itself.
148
149  Revision 621.10  2004/06/09 03:54:07  ajc
150  * The scheduler can now "wake up" a session to deliver async messages.
151  * Renumbered the "instant msgs waiting" message and changed its usage
152
153  Revision 621.9  2004/06/07 22:12:19  ajc
154  * Removed network/filterlist network/mailinglists network/rnews.xref
155    because none of these are used anymore.
156
157  Revision 621.8  2004/06/07 16:41:28  ajc
158  * Changed "express message" to "instant message" everywhere in the code
159    and documentation, to reflect the now industry-standard terminology for
160    this function.  (Obviously, the server command names have not changed,
161    because that would break everything.)
162
163  Revision 621.7  2004/06/06 22:30:10  ajc
164  * New session scheduler.  All sessions which select() marks for activity
165    are now handled before select() is called again.
166
167  Revision 621.6  2004/06/03 02:49:14  ajc
168  * html.c: allow parsing of tags even when they're qualified
169            (i.e. <TAG foo=bar> instead of just <TAG> )
170  * html.c: handle escaped decimal characters (such as &#39; for an apostrophe)
171
172  Revision 621.5  2004/06/03 02:28:16  ajc
173  * citadel_ipc.c: SETR command was missing defaultview and flags2.  Added.
174
175  Revision 621.4  2004/05/31 15:19:14  ajc
176  * Reworked the security checks for move/copy commands.  Theoretically it's
177    performing all the same checks, but the code is far more readable.
178
179  Revision 621.3  2004/05/26 18:13:15  nbryant
180  * stress.c: silence warning
181
182  Revision 621.2  2004/05/26 16:53:31  nbryant
183  * configure.ac: check for /usr/local/BerkeleyDB.4.2
184
185  Revision 621.1  2004/05/24 01:59:16  ajc
186  * serv_network.c: when processing incoming IGnet spool, give the <C> field
187    priority over the <R> field.  This allows messages emailed to a network
188    room to be shared properly instead of attempting to deliver via email a
189    second time.
190
191  Revision 621.0  2004/05/21 01:58:16  ajc
192  * THIS IS 6.21
193
194  Revision 620.35  2004/05/20 16:14:08  ajc
195  * Changed internal version number to 6.21
196  * Added missing VIEW_* defines in citadel.h (they're used only by WebCit
197    for now, which is why Citadel didn't need them, but they should be there
198    anyway for completeness)
199  * Removed the last vestiges of the built-in spam filter.  It had been
200    commented out, but it's definitely never coming back now, so away it goes.
201  * Updated some of the docs
202
203  Revision 620.34  2004/05/15 14:19:52  error
204  * Scheduler: when next_session is to be deleted, make it point to some
205    other session which isn't being deleted (or NULL if there aren't any).
206
207  Revision 620.33  2004/05/14 03:09:54  ajc
208  * When a session kills itself (for example, due to a broken socket),
209    force the dead_session_purge() to run immediately.  This avoids
210    thousands of error messages for up to the next five seconds while it
211    waits for the next purge.
212  * For the main select() loop, we can now recover from EBADF by jumping
213    back to the code that scans for valid descriptors.  (Yeah, I used a
214    goto.  It's more readable that way, so STFU if you have a problem with
215    it.)
216
217  Revision 620.32  2004/05/11 15:21:45  nbryant
218  * configure.ac: check for <sys/prctl.h>
219  * server_main.c: call prctl(PR_SET_DUMPABLE, 1) if we are dropping root
220    permissions.
221  * sysdep.c: no longer call setrlimit(RLIMIT_CORE, ...); this can be handled
222    from a shell script.
223
224  Revision 620.31  2004/05/10 01:47:11  error
225  * messages.c: Fix crash when trying to use m<Y> next
226
227  Revision 620.30  2004/05/07 20:27:46  ajc
228  # citadel-openldap.schema: updated to include RFC2739 objects & attributes
229
230  Revision 620.29  2004/05/07 19:31:40  ajc
231  * More RFC2739 compliance: when converting vCard to LDAP, include
232    the calFBURL attribute.
233
234  Revision 620.28  2004/05/07 19:09:07  ajc
235  * Implemented partial RFC2739 compliance (calendar free/busy URL in vCard).
236    Still need to add it to LDAP.
237
238  Revision 620.27  2004/05/07 18:17:26  ajc
239  * Scrawled some notes in roadmap.txt
240
241  Revision 620.26  2004/05/06 03:38:26  ajc
242  * Never reduce the size of the thread pool, only increase it (still
243    observing the max ceiling, of course)
244  * Don't explicitly call RemoveContext() when a session exits.  The
245    subsequent call to dead_session_purge() will handle it.
246
247  Revision 620.25  2004/05/03 00:12:27  ajc
248  * Found and removed a bug that caused network rooms to be un-shared with
249    all nodes instead of only with nodes that no longer exist.
250  * New target "make upgrade" (to be consistent with other projects)
251
252  Revision 620.24  2004/04/29 02:37:58  ajc
253  * Updated the roadmap
254
255  Revision 620.23  2004/04/26 15:11:17  ajc
256  * Enable core dumps regardless of system ulimit setting
257    (maybe temporary until we fix BOOM)
258
259  Revision 620.22  2004/04/23 17:27:50  ajc
260  * user_ops.c: do not attempt to save the loaded user record into the
261    supplied buffer, when the supplied buffer is NULL.  (This calling
262    syntax is used to check for the existence of a user without storing it.)
263
264  Revision 620.21  2004/04/21 03:44:50  ajc
265  * serv_crypto.c: small fix to make self-signed certs no longer invalid
266
267  Revision 620.20  2004/04/21 03:00:06  ajc
268  * Replace ctdl_install_certificate() with convenience functions found
269    in the OpenSSL library.
270
271  Revision 620.19  2004/04/20 02:42:54  ajc
272  * techdoc/binaries.txt : updated, now includes WebCit instructions
273  * setup.c: detect when setup is run from within the Citadel Ridiculously
274    Easy Installer and skip the directory prompt; the installer sets it.
275
276  Revision 620.18  2004/04/14 18:43:51  nbryant
277  * citadel.spec: BuildRequire redhat-rpm-config
278
279  Revision 620.17  2004/04/14 16:16:47  nbryant
280  * citadel.spec: don't BuildRequire newt-devel
281
282  Revision 620.16  2004/04/14 03:42:01  ajc
283  * ICAL FREEBUSY output now includes ORGANIZER, DTSTART, and DTEND fields.
284    (Required for Kolab compatibility.)
285
286  Revision 620.15  2004/04/13 23:53:00  nbryant
287  * citadel.spec: BuildRequire bison
288
289  Revision 620.14  2004/04/13 22:44:35  nbryant
290   * citadel.spec: commented out Icon line and the openldap-servers dependency.
291   * citadel.spec: added several BuildRequires. Some of these are, strictly
292     speaking, compile time options, but the goal is to document the runtime
293     dependencies and make sure our RPM's are always built consistently.
294
295  Revision 620.13  2004/04/13 21:09:20  error
296  * citadel.spec: Updated for 6.20p1
297
298  Revision 620.12  2004/04/13 18:31:40  ajc
299  * serv_calendar.c: ICAL FREEBUSY command now tries the supplied name not
300    only as a screen name, but as an email address, and then as an
301    unqualified email address in every hosted domain.  (For Kolab compat)
302
303  Revision 620.11  2004/04/13 02:45:07  ajc
304  * Don't display the "Ending SSL/TLS" log message unless TLS is actually present
305
306  Revision 620.10  2004/04/12 20:51:40  error
307  * citadel.lsm: Update LSM for 6.20p1; uploaded to ibiblio.org
308
309  Revision 620.9  2004/04/09 23:11:01  error
310  * serv_chat.c: Differentiate when a user does not exist when paging users.
311
312  Revision 620.8  2004/04/09 23:05:52  error
313  * user_ops.c: fix unused variable compiler warnings
314
315  Revision 620.7  2004/04/03 15:42:35  ajc
316  * stress.c: include <stdlib.h> in order to get RAND_MAX
317    (Submitted by Thomas.Lotterer@cw.com, Cable & Wireless / OpenPKG)
318
319  Revision 620.6  2004/04/01 04:41:55  ajc
320  * Put some blankety-blank values in the default generated vCard so it's
321    more acceptable to LDAP conversion
322
323  Revision 620.5  2004/03/31 02:19:09  ajc
324  * Change the IMAP folder delimiter from "|" to "/" because more than a few
325    client programs don't follow RFC2060 strictly enough to work with
326    non-"/" delimiters.  Actual slashes in room names appear as "|" in IMAP.
327
328  Revision 620.4  2004/03/30 03:11:07  ajc
329  * control.c: when config.c_maxsessions is unset or negative, set it to 0
330    instead of setting it to 1 when it is 0 or negative.  The default should
331    be unlimited sessions.
332
333  Revision 620.3  2004/03/29 16:05:02  ajc
334  * begin_critical_section() -- bypass transaction checking for S_FLOORCACHE
335    sections, to avoid crashing the db layer
336
337  Revision 620.2  2004/03/29 02:33:19  error
338  * citadel.spec: major modifications for 6.xx (hasn't been updated since 5.xx)
339
340  Revision 620.1  2004/03/27 23:04:59  error
341  * citadel.lsm: update version number, sending to ibiblio
342
343  Revision 620.0  2004/03/27 02:33:26  ajc
344  * THIS IS 6.20
345
346  Revision 614.105  2004/03/27 02:33:10  ajc
347  * Bumped the version number to 6.20
348  * Corrected session.txt writeup for CONF command (three of the five LDAP
349    related fields were missing)
350  * Updated the roadmap documentation slightly
351
352  Revision 614.104  2004/03/27 02:21:30  ajc
353  * Completed documenting the LDAP Connector
354
355  Revision 614.103  2004/03/26 05:41:25  ajc
356  * Began writing up the LDAP Connector for Citadel in the documentation
357
358  Revision 614.102  2004/03/26 05:40:47  ajc
359  *** empty log message ***
360
361  Revision 614.101  2004/03/26 05:13:15  ajc
362  * citadel-slapd.conf: comment out the reference to the Citadel schema
363    and add "schemacheck off" to make it easier to get started with the
364    Citadel LDAP connector.  Also made the backend in the sample conf
365    ldbm instead of bdb, because that's what RH9 ships with.
366
367  Revision 614.100  2004/03/24 21:23:50  ajc
368  * msgbase.c: repaired a memory leak
369
370  Revision 614.99  2004/03/24 17:07:11  ajc
371  * Put a new memory leak checker into the server because it turns out that
372    the third-party ones all suck.  :)  This one doesn't involve renaming
373    all of the malloc() related functions, though.
374
375  Revision 614.98  2004/03/24 15:04:06  ajc
376  * stress.c: fix "wrong password" race condition by giving the very
377    first worker thread time to finish creating the user account before the
378    other threads start using it.  (Ok, I fixed it by creating a different
379    race condition, but if your Citadel takes more than three seconds to
380    create an account, your problems can't be fixed with the stress tester.)
381
382  Revision 614.97  2004/03/24 03:46:40  ajc
383  * Reorg header stuff to make it more compatible with leak checkers
384
385  Revision 614.96  2004/03/24 03:25:19  ajc
386  * Removed the built-in memory leak checker.  It wasn't threadsafe and
387    there now exist third-party utilities that do this job better.
388
389  Revision 614.95  2004/03/24 02:59:19  ajc
390  * After initializing the database, chown and chmod all files in the data/
391    directory correctly to avoid EPERM errors later on when we drop root privs
392
393  Revision 614.94  2004/03/22 19:37:28  error
394  * sysdep.c: worker_thread(): Make scheduling a little more fair to higher
395    sessions
396  * sysdep.c: lprintf(): Enable microsecond display in trace file
397  * stress.c: worker(): Sleep for random amount of time as per specification
398
399  Revision 614.93  2004/03/21 22:51:54  error
400  * Fix a few remaining lprintf(9, ...) to lprintf(CTDL_DEBUG, ...)
401
402  Revision 614.92  2004/03/21 22:35:20  error
403  * stress.c: Wait before posting instead of after posting.
404
405  Revision 614.91  2004/03/21 22:34:41  error
406  * database_sleepycat.c: emit a panic message when Berkeley DB wants us to
407    run recovery; should provide a little more detail on the actual error
408
409  Revision 614.90  2004/03/21 22:32:24  ajc
410  * room_ops.c: increased the thread safety of cgetfloor()
411  * housekeeping.c: check floor reference counts in two passes instead of
412    trying to manipulate multiple tables in O^2
413
414  Revision 614.89  2004/03/21 17:14:46  error
415  * stress.c: Fixed.  Now properly spawns threads and stresses out your
416    favorite Citadel server by simulating large numbers of really active
417    users.  (It's configurable on the command line, too, to vary the stress
418    level.)  Don't use it against a production system!  You've been warned!
419
420  Revision 614.88  2004/03/21 17:13:15  error
421  * configure.ac: Fix for defines for pthreads not being included properly
422
423  Revision 614.87  2004/03/21 06:15:06  ajc
424  * docs/citadel.html: documented TLS support and administration procedures
425
426  Revision 614.86  2004/03/20 22:32:06  ajc
427  * citadel.rc: changed the comments around local_screen_dimensions= to
428    reflect its legacy type of situation
429
430  Revision 614.85  2004/03/16 22:44:15  ajc
431  * Better conversion of friendly name to fully qualified vcard name
432
433  Revision 614.84  2004/03/16 21:09:37  ajc
434  * Eliminate EVT_OUTPUTMSG server extensions (don't need them anymore)
435  * Add EVT_NEWUSER server extensions
436  * EVT_NEWUSER and EVT_PURGEUSER server extensions now specify a
437    struct ctdluser * instead of a username and usernum
438  * serv_vcard.c: automatically create and submit a skeleton vCard when
439    a new user is created.
440
441  Revision 614.83  2004/03/16 19:05:50  error
442  * Further changes to stress.c, Makefile.in to build it, .cvsignore
443    (but it's still broken)
444
445  Revision 614.82  2004/03/15 18:11:34  error
446  * stress.c: various fixed/improvements (but it still isn't working)
447
448  Revision 614.81  2004/03/15 17:22:14  error
449  * First draft of the stress tester.  Isn't quite ready (it needs to be
450    tested itself!).
451
452  Revision 614.80  2004/03/15 16:48:22  error
453  * Documentation update: update citadel.html for new syslog logging
454
455  Revision 614.79  2004/03/15 16:47:04  error
456  * msgbase.c: cmd_move(): Fix the security logic for non-aides trying to
457    move or copy messages.  The logic should do the following:
458    * Allow move/copy for Aides
459    * Allow regular users to:
460      * Move a message between two personal rooms
461      * Copy a message from a Personal room to a room the user is subscribed to
462      * Copy a message from a room the user is subscribed to, to a personal room
463    * Prohibit other moves/copies
464
465  Revision 614.78  2004/03/15 16:39:27  error
466  * Multiple files: Set permissions on existing Citadel directories to prevent
467    access to the database by local unix users to prevent direct database reads.
468
469  Revision 614.77  2004/03/15 16:36:50  error
470  * Multiple files:  Convert most remaining client code to use new Citadel IPC
471    functions.  A few bits remain and will be converted when the chat system
472    is rewritten.
473
474  Revision 614.76  2004/03/14 06:35:46  ajc
475  * Cache IMAP "BODY" fetches in an already-converted format.  This speeds
476    up clients like Mozilla and Thunderbird that request big messages in
477    chunks -- we don't have to load and convert the message every time
478    another chunk is requested.
479  * Fixed a potential memory leak in fetch
480
481  Revision 614.75  2004/03/13 23:26:10  ajc
482  * imap_fetch.c: don't fetch the message from disk at all for UID and FLAGS
483    fetch items.  (It's rare, but sometimes IMAP optimizations are actually
484    possible, despite Mark DIE DIE DIE Crispin's brain-dead design!)
485
486  Revision 614.74  2004/03/13 22:52:05  ajc
487  * Documented the GNET and SNET commands  :)
488
489  Revision 614.73  2004/03/12 19:35:13  error
490  * routines2.c: Fix two typos
491
492  Revision 614.72  2004/03/12 19:32:09  error
493  * routines2.c: Convert multiple functions to use new IPC code (almost done!)
494
495  Revision 614.71  2004/03/12 19:30:06  error
496  * citadel.c: main(): Fix error response for RCHG, HCHG and UCHG commands.
497
498  Revision 614.70  2004/03/12 19:28:04  error
499  * Implement GNET/SNET commands in IPC code; provide a CtdlIPC_delete();
500    emit warnings when client code uses CtdlIPC_getline() or CtdlIPC_putline()
501    (These are reserved and should not be used by client code.)
502
503  Revision 614.69  2004/03/10 04:50:04  ajc
504  * serv_expire.c: auto-purge any Citadel account that is associated with
505    a Unix account that no longer exists.
506
507  Revision 614.68  2004/03/09 20:46:33  error
508  * Add a Linux Software Map file
509
510  Revision 614.67  2004/03/08 05:26:49  ajc
511  * When the last argument of an IMAP APPEND command is a binary literal
512    (i.e. all the time), the client will still be sending a CRLF after the
513    literal.  Added an extra client_read() after the message input to absorb
514    that extra CRLF, to keep client and server from getting out of sync.
515
516  Revision 614.66  2004/03/06 05:09:04  ajc
517  * serv_smtp.c: don't offer the STARTTLS extension if TLS is already
518    active.  Done for to-the-letter compliance with RFC2487.
519
520  Revision 614.65  2004/03/06 02:03:39  ajc
521  * serv_smtp.c: do not offer the PIPELINING extension when TLS is
522    running.  Doing so causes sessions to hang unexpectedly.
523
524  Revision 614.64  2004/03/05 23:21:25  ajc
525  * Added some more debugging to serv_smtp.c to try to figure out the
526    problem with Postfix TLS hanging during send
527
528  Revision 614.63  2004/03/05 03:36:03  ajc
529  * Remove the automatic population of A and N fields we recently added
530    when found to be NULL.  It was confusing the output functions into
531    thinking that Internet messages were local.
532
533  Revision 614.62  2004/03/03 05:43:29  ajc
534  * Generate better output when a user is kicked out of chat
535
536  Revision 614.61  2004/03/01 22:36:14  ajc
537  * Implement the NAMESPACE extension of IMAP (RFC 2342)
538
539  Revision 614.60  2004/03/01 17:47:28  error
540  * Fix missing arg in m<Y> next rewrite.
541
542  Revision 614.59  2004/03/01 17:33:30  error
543  * Rewrite m<Y> next function; now uses CtdlIPC code.
544
545  Revision 614.58  2004/03/01 04:08:34  ajc
546  * Revoke access to room when /kicked
547
548  Revision 614.57  2004/02/29 23:26:48  ajc
549  * Added /kick command to chat.  /ban coming soon.
550
551  Revision 614.56  2004/02/28 16:37:41  ajc
552  * setup.c: removed an unused temp file name variable
553
554  Revision 614.55  2004/02/27 17:23:21  error
555  * Use syslog-compatible logging levels in lprintf(); the loglevel chosen
556    is passed directly to syslog().  The available levels are docuemnted in
557    sysdep_decls.h.
558
559  Revision 614.54  2004/02/27 04:29:00  ajc
560  * Fixed a bug in PLAIN authentication
561
562  Revision 614.53  2004/02/26 22:03:24  error
563  * ;Goto floor now goes to first KNOWN room, or first room only if no known
564    rooms on the floor
565
566  Revision 614.52  2004/02/26 20:30:36  error
567  * Populate IPC into a few more places to avoid a nasty crash at MORE prompt
568
569  Revision 614.51  2004/02/26 20:17:29  error
570  * Client stability and enhancements:
571    * CtdlServInfo structure moved inside CtdlIPC; eliminates unnecessary
572      global and makes IPC more self-contained
573    * Removed redundant serv_ from variable names in CtdlServInfo struct
574    * Send SIGHUP to process group when connection_died().  Kills self and
575      children (e.g. external editor).
576
577  Revision 614.50  2004/02/25 01:35:34  error
578  Missing parameter to a printf() function.  No idea where it went, but I
579  put it back.
580
581  Revision 614.49  2004/02/24 05:09:06  ajc
582  * Better validation of incoming network messages.
583
584  Revision 614.48  2004/02/23 16:10:47  nbryant
585  --disable-pie by default.
586
587  Revision 614.47  2004/02/22 04:55:15  ajc
588  * CSR code more or less in its final form for now.
589
590  Revision 614.46  2004/02/22 04:42:05  ajc
591  * Initial version of function to automatically generate a Certificate
592    Signing Request if one is not present
593
594  Revision 614.45  2004/02/20 19:29:05  error
595  * Fix bug 112: .Goto allowed partial room match on forgotten rooms
596
597  Revision 614.44  2004/02/20 02:55:18  ajc
598  * Fixed one of the prompts (bugzilla #118)
599
600  Revision 614.43  2004/02/19 04:12:56  ajc
601  * Instead of doing the silly "Kolab reserved folder names" thing, instead
602    implemented the Cyrus-compatible style of forcing all personal mailbox
603    folders to be subfolders of INBOX.  But only for IMAP.
604
605  Revision 614.42  2004/02/18 14:46:05  ajc
606  * smtp: EHLO response now includes both "AUTH " and "AUTH=" output, due to
607    the requirement to interoperate with brain-dead Microsoft shitware that
608    doesn't follow the RFC.
609
610  Revision 614.41  2004/02/17 16:56:51  ajc
611  * During SSL initialization, create the "keys" directory if it does not
612    exist ... generate a private key if that does not exist ... more code
613    coming soon to generate CSR and self-signed cert.  Hard-coded pathnames
614    have been moved to sysconfig.h.
615
616  Revision 614.40  2004/02/17 04:47:22  ajc
617  * Support PLAIN auth method in SMTP
618
619  Revision 614.39  2004/02/17 03:53:11  ajc
620  * New ICAL subcommand "sgi" to enable or disable automatic server
621    generated invitations.  (WebCit wants sgi's but Kontaqt doesn't.)
622
623  Revision 614.38  2004/02/16 21:54:22  ajc
624  * Support POP3 over TLS
625
626  Revision 614.37  2004/02/16 21:45:43  ajc
627  * Implement RFC 2487 - SMTP Service Extension for Secure SMTP over TLS
628
629  Revision 614.36  2004/02/16 21:02:28  ajc
630  * IMAP and Citadel protocols now use the same code path for TLS negotiation
631
632  Revision 614.35  2004/02/16 20:55:47  ajc
633  * Genericized the Citadel API for TLS-enabling protocols
634
635  Revision 614.34  2004/02/16 18:16:39  error
636  * Remove some unnecessary and possibly hazardous debugging code leftover
637    from debugging IMAP STARTTLS
638
639  Revision 614.33  2004/02/16 18:14:00  error
640  * Fixed IMAP STARTTLS; trouble was in client_read_ssl the whole time.
641    It should now be possible to implement SSL/TLS for any protocol.
642
643  Revision 614.32  2004/02/16 18:13:10  error
644  * Log session IDs in syslog as well as stderr
645
646  Revision 614.31  2004/02/16 15:06:44  error
647  * Add specific error codes for every command on the wire protocol, so that
648    clients can more easily determine what went wrong.  Partially updated
649    session.txt (will finish it later).  This lets clients more easily
650    determine what, if anything, went wrong with a particular command.
651
652  Revision 614.30  2004/02/15 06:06:49  ajc
653  * More work on IMAP TLS.  Still not working correctly.  :(  Added in
654    support for server-side certificates.  Now instead of failing it hangs.
655
656  Revision 614.29  2004/02/14 04:41:55  ajc
657  * STARTTLS attempt #2.  Still disabled because it's broken.
658
659  Revision 614.28  2004/02/13 20:51:13  error
660  * Reset screen attributes before fork() so that external programs do the
661    right thing
662
663  Revision 614.27  2004/02/12 04:16:38  ajc
664  * Support for PLAIN logins in IMAP (need to test!)
665
666  Revision 614.26  2004/02/11 03:50:49  ajc
667  * The groupware folders "Calendar", "Contacts", "Notes", and "Tasks" are
668    now presented as subfolders of INBOX when using IMAP.  This is for the
669    purpose of Kolab compatibility.
670
671  Revision 614.25  2004/02/09 22:40:57  error
672  * oops...also close the client on EOF/error on tty OUTPUT
673
674  Revision 614.24  2004/02/09 22:26:17  error
675  * Exit the citadel client when EOF reached on input - should prevent
676    a process from hanging around when a telnet connection dies unexpectedly
677
678  Revision 614.23  2004/02/08 05:29:34  ajc
679  * Corrected various small syntax conversion problems that were keeping
680    some vCards out of the LDAP directory.
681
682  Revision 614.22  2004/02/07 05:28:10  ajc
683  * Automatically purge files from ./network/spoolout which were intended
684    for nodes which no longer exist
685
686  Revision 614.21  2004/02/07 04:59:21  ajc
687  * Cache the IGnet config in memory, avoiding a db fetch for every single
688    operation which references it.  Invalidate the cache when a new config
689    is uploaded.
690  * When doing network spool for a room, automatically remove shares for
691    Citadel nodes which no longer exist.
692
693  Revision 614.20  2004/02/07 04:22:12  ajc
694  * serv_network.c: fixed a problem with an uninitialized data structure
695
696  Revision 614.19  2004/02/06 04:40:50  ajc
697  * Suppress posting of messages to Aide> when the loopzapper catches dupes.
698  * New command NSYN to sync the entire contents of a room to a specified
699    network node.  This will be used to bring new nodes in sync with existing
700    nodes.
701
702  Revision 614.18  2004/02/06 03:58:10  ajc
703  * Added some comments to the sample citadel-slapd.conf
704
705  Revision 614.17  2004/02/06 03:52:46  ajc
706  * Changed the domain name and password in the sample slapd.conf
707
708  Revision 614.16  2004/02/05 05:20:20  ajc
709  * Delete a user's LDAP entry when deleting the vCard.  NOT TESTED.
710
711  Revision 614.15  2004/02/05 03:54:14  ajc
712  * Completed the per-user initialization of LDAP entries.
713
714  Revision 614.14  2004/02/04 18:27:25  error
715  * Don't delete temp file when composing message until after server writes
716    it successfully (or an error occurs in the client itself).
717
718  Revision 614.13  2004/02/04 04:07:56  ajc
719  * More work on LDAP connector
720
721  Revision 614.12  2004/02/01 06:19:22  ajc
722  * policy.c: fix bug in GetExpirePolicy() that was causing the default
723    mailbox purge policy to be misinterpreted if it was set to "use
724    system default"
725  * serv_vcard.c: always set the Global Address Book room's expire policy
726    to "never expire" and its default view to "address book"
727
728  Revision 614.11  2004/01/31 05:44:29  ajc
729  *** empty log message ***
730
731  Revision 614.10  2004/01/27 19:56:29  ajc
732  * serv_smtp.c: HELO and EHLO responses now reply with the detected
733    IP address and reverse DNS lookup of the connecting host
734
735  Revision 614.9  2004/01/24 05:47:50  ajc
736  * Got Citadel talking to LDAP.  Still requires manual creation of schema
737    and container entries, which I don't like; we'll have to fix that.  It
738    also does not yet populate all fields.
739
740  Revision 614.8  2004/01/19 21:01:15  error
741  * Clear out the autom4te.cache when bootstrapping to avoid autoheader problems
742
743  Revision 614.7  2004/01/19 04:44:11  ajc
744  * Further work on creating LDAP entries.
745
746  Revision 614.6  2004/01/18 21:04:40  ajc
747  * Reworked vCard etc. functions for addition of new vCard data to LDAP
748
749  Revision 614.5  2004/01/17 22:57:54  ajc
750  * Added "Base DN" "Bind DN" and "Bind DN password" config options
751  * serv_ldap.c: added.  (New module implementing the LDAP Connector)
752  * Upon startup, connect to LDAP directory and bind to it.  Unbind at exit.
753
754  Revision 614.4  2004/01/17 04:23:28  ajc
755  * Sysconfig commands for specifying where the LDAP server lives
756
757  Revision 614.3  2004/01/17 03:26:17  ajc
758  * Changed a diagnostic in msgbase.c to a higher logging level so it doesn't
759    make as much noise.
760  * Setup now adds "-x3 -llocal4" to the default inittab line.
761
762  Revision 614.2  2004/01/17 03:17:34  ajc
763  * New server command-line option "-l" to send log output to the host
764    computer's syslog facility instead of to a trace file.
765
766  Revision 614.1  2004/01/02 22:13:59  ajc
767  * Link to OpenLDAP client library (-lldap) and set HAVE_LDAP if present.
768
769  Revision 614.0  2003/12/30 04:13:40  ajc
770  * THIS IS 6.14
771
772  Revision 613.12  2003/12/30 04:13:31  ajc
773  * Commented out one of the supplied .RU commands in citadel.rc
774
775  Revision 613.11  2003/12/24 05:02:49  ajc
776  * Allow a separate default message expire policy for mailbox rooms.  The
777    floor default setting is now ignored for mailboxes.  Updated client and
778    documentation to match.
779
780  Revision 613.10  2003/12/23 03:53:49  ajc
781  * Expanded the size of all string fields in "struct CtdlIPCMessage" to
782    the standard SIZ length, in order to accomodate "weird" messages
783    without crashing.  Also converted many strcpy()'s to safestrncpy()'s
784    while populating this data structure, to avoid overruns.
785
786  Revision 613.9  2003/12/22 16:49:36  error
787  * Add Preview for Mac OS X as an image viewer option in citadel.rc
788
789  Revision 613.8  2003/12/22 15:30:53  error
790  * Fork image viewer process in background (works now); suppress
791    stdout/stderr from the image viewer
792
793  Revision 613.7  2003/12/21 20:02:28  error
794  * When viewing images, append the image filename to the temp filename so
795    that less-intelligent viewers can deal with the images
796
797  Revision 613.6  2003/12/21 19:07:28  error
798  * Start a new thread and fork() for image viewer (broken/disabled; for
799    refernce only)
800
801  Revision 613.5  2003/12/21 01:23:12  nbryant
802  added some additional comments to citadel.rc concerning possible image viewers
803
804  Revision 613.4  2003/12/21 00:44:19  error
805  * Fix for idle_threshold being ignored when reading citadel.rc
806
807  Revision 613.3  2003/12/21 00:37:54  error
808  * Fix for crash when downloading multiple attachments
809
810  Revision 613.2  2003/12/21 00:19:41  error
811  * Image viewer code for the text client.  Hit 'I' to view an image
812    attached to a file.  Hey aahz, this code actually works!
813
814  Revision 613.1  2003/12/19 04:33:52  ajc
815  * Changes to auto-expunge algorithm to support correct behavior in
816    some IMAP clients while moving messages.
817
818  Revision 613.0  2003/12/15 16:37:01  ajc
819  * THIS IS 6.13
820
821  Revision 612.14  2003/12/15 16:33:47  ajc
822  * Added support for "Cc" and "Bcc" IMAP SEARCHes
823  * Bumped the version number to 6.13
824
825  Revision 612.13  2003/12/11 04:21:23  ajc
826  * Removed a "FIXME this needs blah blah" comment because blah blah has
827    since been completed
828
829  Revision 612.12  2003/12/11 04:06:55  nbryant
830  configure.ac: add support for position-independent executables. can be disabled
831  with --disable-pie
832
833  Revision 612.11  2003/12/11 03:44:18  nbryant
834  domain.c: include <arpa/nameser_compat.h> if present
835  configure.ac: check for <arpa/nameser_compat.h>
836
837  Revision 612.10  2003/12/10 03:58:26  ajc
838  * Completed a more accurate implementation of the ENVELOPE fetch in IMAP.
839
840  Revision 612.9  2003/12/09 06:39:19  nbryant
841  did a minimal amount of ANSIfication without changing anything that would
842  affect the compiler output in any way. I was just trying to get enough warnings
843  enabled to be able to tell if there are any nested functions lurking about...
844
845  If we get rid of nested functions we can get some big security gains under
846  Fedora.
847
848  Revision 612.8  2003/12/09 05:12:49  ajc
849  * Don't give away anonymous poster information in IMAP or RFC822
850
851  Revision 612.7  2003/12/09 04:50:16  ajc
852  * Painstakingly combed through IMAP headers and responses for two hours in
853    an attempt to figure out why the horrendous pile of crap called Microsoft
854    Outlook counts the correct number of messages but wasn't displaying any
855    of them.  Eventually determined that it was ONE EXTRA SPACE after the
856    closing paren of the ENVELOPE output that caused Outlook to totally ignore
857    all the messages.  This only reinforces my belief that anything designed
858    in the state of Washington is utter and complete CRAP.
859  * Corrected the above glitch.  Outbreak works properly now.
860
861  Revision 612.6  2003/12/09 03:56:29  ajc
862  * user_ops.c: missing string declaration or something?
863
864  Revision 612.5  2003/12/08 17:41:01  ajc
865  * serv_smtp.c: validated and documented compliance with a big pile of RFC's
866    which are in one way or another related to SMTP.
867
868  Revision 612.4  2003/12/07 19:59:13  error
869  * Minor enhancements to a few of the trace file entries
870
871  Revision 612.3  2003/12/07 19:57:48  error
872  * Added some useless comments to some of the techdocs/ files
873
874  Revision 612.2  2003/12/07 19:56:24  error
875  * CREU command now allows specification of an initial password
876
877  Revision 612.1  2003/12/04 04:20:08  ajc
878  * Incoming RFC822 messages get the To: field translated directly to
879    a Citadel <R> field.
880
881  Revision 612.0  2003/12/01 04:11:48  ajc
882  * THIS IS 6.12
883
884  Revision 611.10  2003/11/30 03:43:34  ajc
885  * Support IMAP \Answered flag
886
887  Revision 611.9  2003/11/22 03:30:14  ajc
888  * Commented out the call to the 'high speed download' function and
889    uncommented the call to the original 'chatty' download function.  Some
890    users were reporting lockups.
891
892  Revision 611.8  2003/11/14 20:15:44  ajc
893  * Reversed the previous change because it made things b0rken
894
895  Revision 611.7  2003/11/14 20:04:28  ajc
896  * IMAP FETCH ENVELOPE now outputs more fields correctly.
897
898  Revision 611.6  2003/11/14 03:49:54  ajc
899  * MUCH faster implementation of rfc822_fetch_field()
900
901  Revision 611.5  2003/11/13 04:25:38  ajc
902  * mime_parser.c: handle multipart *much* more efficiently now.  Instead
903    of scanning line by line, we snag the boundaries using the Boyer-Moore
904    algorithm.
905
906  Revision 611.4  2003/11/12 04:28:22  ajc
907  * Replaced bmstrcasestr() with a more generic function, bmstrstr(), which
908    can be supplied with *any* strncmp()-compatible compare function.
909
910  Revision 611.3  2003/11/08 06:46:08  ajc
911  * IMAP FETCH BODY<xxx.yyy> was outputting the offset and length in the
912    wrong order.  Fixed.
913
914  Revision 611.2  2003/11/08 06:29:47  ajc
915  * IMAP FETCH FLAGS ... removed extra trailing space after last flag
916
917  Revision 611.1  2003/11/06 04:25:30  ajc
918  * For certain IMAP outputs (such as BODYSTRUCTURE), buffer all output until
919    we've got the whole thing, then spew it all at once to avoid lots of
920    tiny TCP packets.
921  * New API calls buffer_output() (to start buffering) and unbuffer_output()
922    (to dump the buffer and stop buffering) are available to do this.
923
924  Revision 611.0  2003/10/21 04:20:41  ajc
925  * THIS IS 6.11
926
927  Revision 610.22  2003/10/17 02:18:40  ajc
928  * Replaced the DEFAULT_ENTRY definition in sysconfig.h with a new option
929    "reply_with_external_editor" in citadel.rc.
930
931  Revision 610.21  2003/10/14 03:09:47  ajc
932  * routines2.c: fixed an off-by-one error in filename sanitization for
933    client file uploads
934
935  Revision 610.20  2003/10/10 05:43:57  ajc
936  * citadel.c:  Reworded one of the prompts
937
938  Revision 610.19  2003/10/07 15:56:17  ajc
939  * Better handling of incoming Internet addresses consisting of an address
940    in angle brackets with no name outside the brackets.
941
942  Revision 610.18  2003/09/21 04:10:56  ajc
943  * messages.c: don't crash when a message contains more than MAXURLS of
944    embedded URL's.  Omit them instead.
945  * citadel.rc: updated the sample browser remoting command for Macintosh
946    based on a Mr.T suggestion
947  * techdoc/session.txt: redid the writeup for the MOVE command (fixed a
948    mistake and made the writeup clearer)
949
950  Revision 610.17  2003/09/17 21:40:13  ajc
951  * html.c: don't truncate messages when wacky characters are
952    encountered.  Substitute '?' characters instead.  Now the Citadel
953    community can complain about b0rken MS ASCII.
954
955  Revision 610.16  2003/09/13 02:53:04  ajc
956  * More intelligent selection of directory to save attachments
957
958  Revision 610.15  2003/09/12 15:48:55  ajc
959  * serv_smtp.c: remember whether we're SMTP or LMTP across a RSET command.
960
961  Revision 610.14  2003/09/09 02:42:28  ajc
962  * Documentation update for LMTP
963
964  Revision 610.13  2003/09/09 01:47:02  ajc
965  * Suppress domain forgery check when using LMTP
966
967  Revision 610.12  2003/09/08 18:48:14  ajc
968  * The unix domain socket used for citmail to talk to citserver now
969    implements LMTP (RFC2033).  Other LMTP client implementations (such as
970    Postfix) can also use the socket, eliminating the need for citmail.
971
972  Revision 610.11  2003/09/07 03:29:25  ajc
973  * serv_network.c: aggressively poll any node for which we have data
974
975  Revision 610.10  2003/09/06 02:04:54  ajc
976  * Don't reset "last poll" time when not doing the "full" net processing
977
978  Revision 610.9  2003/09/03 03:29:01  ajc
979  * syslog messages now say session started/ended instead of ended/ended
980
981  Revision 610.8  2003/09/03 03:24:40  ajc
982  * client: remove rooms from the march list when zapping them (or the floors
983    they're on)
984
985  Revision 610.7  2003/09/02 15:05:34  ajc
986  * Repaired an incorrect adjustment of floor reference counts when a room was
987    moved to a different floor.  (Thanks to Winzlo for reporting this.)
988
989  Revision 610.6  2003/09/02 14:49:05  ajc
990  * Improve client chat mode reliability and performance by assuming that all
991    server output will be in complete lines.  (This is a safe assumption.)
992
993  Revision 610.5  2003/09/02 04:04:39  ajc
994  * Don't try to directly spool to non-neighbor nodes
995
996  Revision 610.4  2003/08/29 08:21:57  ajc
997  * Do network runs more proactively.  The inbound queue is now scanned
998    every minute instead of every poll frequency.
999
1000  Revision 610.3  2003/08/21 23:26:06  ajc
1001  * setup.c: offer to disable "exim" if found
1002
1003  Revision 610.2  2003/08/20 03:51:08  ajc
1004  * Bumped the internal version number to 6.11
1005
1006  Revision 610.1  2003/08/20 03:36:13  ajc
1007  * Create a "Contacts" room for personal address book use
1008
1009  Revision 610.0  2003/08/17 03:00:37  ajc
1010  * THIS IS 6.10
1011
1012  Revision 609.2  2003/08/17 02:58:46  ajc
1013  * Changed internal version number to 6.10
1014
1015  Revision 609.1  2003/08/17 02:46:37  ajc
1016  * Don't fail on "data files too old to be upgraded" for NEW installations
1017
1018  Revision 609.0  2003/08/14 03:40:55  ajc
1019  * THIS IS 6.09
1020
1021  Revision 608.21  2003/08/13 18:08:24  ajc
1022  * Removed the last vestiges of the now-obsolete global networking password
1023
1024  Revision 608.20  2003/08/13 14:36:04  ajc
1025  * "make install" now installs the contents of docs/ as well as README.txt
1026
1027  Revision 608.19  2003/08/13 14:30:47  ajc
1028  * Temporarily disabled IMAP TLS support due to the discovery of some
1029    compatibility problems.  It will be re-enabled when they are fixed.
1030
1031  Revision 608.18  2003/08/12 00:39:35  ajc
1032  * setup now knows about lots of other mail programs it can disable (various
1033    flavors of Cyrus and Courier, for example)
1034  * setup now ensures that it really did startup/shutdown the Citadel service,
1035    and displays an error message when that fails.
1036  * "make install" now instructs the user run "setup"
1037  * Removed an old GDBM reference from the documentation
1038
1039  Revision 608.17  2003/08/05 03:06:58  ajc
1040  * Added a README.txt file because some Joker kept bugging me about it
1041  * Reloaded the code that extracts embedded URL's to a place where it'll
1042    get picked up on *every* message, not just the old variformat stuff
1043
1044  Revision 608.16  2003/08/03 17:51:52  ajc
1045  * Clear out all masqueraded wholist fields when logging out, in case another
1046    user logs in without reconnecting.
1047
1048  Revision 608.15  2003/07/30 20:36:18  ajc
1049  * Allow users to authenticate with either their display name or any valid
1050    e-mail address which belongs to them.  Applies to all protocols.
1051
1052  Revision 608.14  2003/07/30 03:54:34  ajc
1053  * Fixed a small client bug in the purge hour setting
1054
1055  Revision 608.13  2003/07/30 03:47:53  ajc
1056  * Eliminated the EXPI command
1057  * Completed the configuration item of "purge hour"
1058  * Auto-purger now runs as a scheduled job
1059
1060  Revision 608.12  2003/07/30 00:26:50  ajc
1061  * Removed the "weekly" script and began installing a facility to allow
1062    database maintenance to happen automatically.  (One Step Install can't
1063    require the sysadmin to know cron)
1064
1065  Revision 608.11  2003/07/28 04:17:24  ajc
1066  * migratenet.c: removed.  Adjusted Makefile.in accordingly.
1067
1068  Revision 608.10  2003/07/27 21:15:23  ajc
1069  * Implemented all IMAP date-based search criteria.  Note that Citadel does
1070    not record an "internal date" of a message, so the "sent date" and "internal
1071    date" searches perform identically.
1072  * Date search comparisons available: "before," "on," or "on or after."  Yet
1073    another example of why Mark Crispin needs to be taken outside and shot.
1074
1075  Revision 608.9  2003/07/26 04:49:40  ajc
1076  * Implemented a bunch of the IMAP SEARCH keywords
1077
1078  Revision 608.8  2003/07/26 04:28:44  ajc
1079  * tools.c: added bmstrcasestr(), a Boyer-Moore, case-insensitive string search
1080  * imap_search.c: implement BODY criterion in search command
1081
1082  Revision 608.7  2003/07/24 04:57:53  ajc
1083  * Began implementation of the IMAP SEARCH command.  Basically just got the
1084    parser working and stubbed all the search criteria.  Next step is to
1085    implement the functionality of each criterion keyword.
1086  * Implemented the functionality for the ALL (wow!) and UID criteria.
1087  * Mark Crispin is an idiot.
1088
1089  Revision 608.6  2003/07/23 03:57:05  ajc
1090  * Optimized the updating of visit records in several places by checking to
1091    see if they've changed and aborting the db update if they haven't.
1092  * Functions which read/write user records are now slightly faster due to
1093    an improvement of the algorithm used to generate the database keys.
1094
1095  Revision 608.5  2003/07/22 03:07:50  nbryant
1096  fix build for Solaris
1097
1098  Revision 608.4  2003/07/20 20:46:06  ajc
1099  * build system: link Berkeley DB only to the server, not to the client & utils
1100
1101  Revision 608.3  2003/07/20 03:51:46  ajc
1102  * setup.c: offer to disable sendmail, postfix, and qmail if found (only if
1103    using the /etc/init.d type of startup scripts)
1104
1105  Revision 608.2  2003/07/20 03:08:22  ajc
1106  * setup.c: offer to hack /etc/xinetd.d/telnet
1107
1108  Revision 608.1  2003/07/15 14:54:09  ajc
1109  * Killed off CtdlGetDynamicSymbol() and just put all the symbols in server.h
1110
1111  Revision 608.0  2003/07/15 04:12:52  ajc
1112  * THIS IS 6.08
1113
1114  Revision 607.23  2003/07/14 17:26:42  ajc
1115  * strcpy() --> safestrncpy() in a few other random places
1116
1117  Revision 607.22  2003/07/14 17:12:28  ajc
1118  * Replaced strcpy() with safestrcpy() in cmd_setp()
1119
1120  Revision 607.21  2003/07/14 03:07:05  ajc
1121  * ipgm_secret is no longer set during setup.  Now it is set at server startup
1122    and automatically changes whenever an IPGM command is executed.
1123  * Upon an IPGM authentication failure, wait 5 seconds before displaying an
1124    error, then disconnect the session.
1125
1126  Revision 607.20  2003/07/13 04:58:35  ajc
1127  * Allow connect on unix domain sockets to Citadels in other directories
1128  * sendcommand now uses unix domain sockets instead of the network
1129  * Do not allow IPGM command to run on the network -- unix domain sockets only
1130
1131  Revision 607.19  2003/07/11 22:33:02  ajc
1132  * Ignore comments in public_clients file
1133
1134  Revision 607.18  2003/07/11 22:30:19  ajc
1135  * Automatically add 127.0.0.1 and config.c_fqdn to public_clients
1136
1137  Revision 607.17  2003/07/11 22:19:49  ajc
1138  * is_public_client() now caches the IP addresses of all hosts in
1139    the public_clients file, at server startup and whenever the file is
1140    modified.  This eliminates the need to make lots of calls to the
1141    resolver library every time.
1142
1143  Revision 607.16  2003/07/10 05:51:46  ajc
1144  * Added cs_addr field to struct CitContext -- holds a dotted quad string
1145    of the user's source IP (if applicable).  It's big enough to hold other
1146    types of address strings in the future (such as IPv6).
1147  * locate_host() populates cs_addr when on a network connection.
1148  * serv_smtp.c now saves the IP address in the proper place in
1149    the Received: header.
1150  * is_public_client() no longer accepts a hostname.  It just looks at
1151    CC->cs_host instead.
1152
1153  Revision 607.15  2003/06/29 19:54:39  ajc
1154  * Renamed "struct user" to "struct ctdluser"
1155  * Renamed "struct room" to "struct ctdlroom"
1156
1157  Revision 607.14  2003/06/29 04:13:32  ajc
1158  * Renamed:
1159    S_QUICKROOM to S_ROOMS
1160    S_USERSUPP to S_USERS
1161    CDB_QUICKROOM to CDB_ROOMS
1162    CDB_USERSUPP to CDB_USERS
1163
1164  Revision 607.13  2003/06/29 04:07:11  ajc
1165  * Globally renamed "struct quickroom" and "struct usersupp" to
1166    "struct room" and "struct user".
1167
1168  Revision 607.12  2003/06/29 04:06:41  ajc
1169  *** empty log message ***
1170
1171  Revision 607.11  2003/06/29 03:58:41  ajc
1172  * Renamed fields in 'struct config' which are no longer relevant (but kept
1173    them in place to avoid corrupting everyone's data files).  Removed them
1174    entirely from serv_vandelay.c.
1175
1176  Revision 607.10  2003/06/28 05:12:56  ajc
1177  * Bump internal version number to 6.08
1178  * Use (-1) instead of BBSUID as the uid of user records which exist only
1179    in Citadel and not in the system password database.  serv_upgrade also
1180    changes this setting for ALL such users, the first time the server is run
1181    after upgrading to 6.08
1182
1183  Revision 607.9  2003/06/27 22:19:31  error
1184  * routines2.c: Quick and dirty fix for Mail> becoming new after entering a
1185    mail message
1186
1187  Revision 607.8  2003/06/26 01:50:14  ajc
1188  * Compiler warning fix for building setup without newt
1189
1190  Revision 607.7  2003/06/25 15:40:57  ajc
1191  * setup now uses "newt" instead of "curses" to draw its pretty screens.
1192    Changes were made to setup.c as well as all the autoconf stuff.
1193
1194  Revision 607.6  2003/06/25 02:40:05  ajc
1195  * Per-user and global flags calling for validation need to be set in the
1196    vCard upload thingie, not in the wrapper function that emulates the
1197    deprecated REGI server command.  Moved it to the correct place.
1198
1199  Revision 607.5  2003/06/22 20:49:31  error
1200  * citadel.c: display idle times in wholist up to 999 days
1201
1202  Revision 607.4  2003/06/19 04:12:30  ajc
1203  * domain.c: use qsort() to sort MX records by preference.  Why have a
1204    custom function when the operating system provides one for free?
1205  * serv_smtp.c: accept mail from "<>" (empty sender).  RFC1123 5.2.9 demands it.
1206
1207  Revision 607.3  2003/06/19 03:55:22  ajc
1208  * Fixed a subtle but ugly bug in the SMTP sender that was causing it to
1209    ignore all successful connections except the last one.  Now when it gets
1210    a connection it uses it.
1211
1212  Revision 607.2  2003/06/17 22:05:11  ajc
1213  * New format for wholist.
1214
1215  Revision 607.1  2003/06/16 04:39:45  ajc
1216  * support.c: removed an unused variable
1217  * citadel.c: sort wholist by idle time (most recently active users first)
1218
1219  Revision 607.0  2003/06/10 04:15:39  ajc
1220  * THIS IS 6.07
1221
1222  Revision 606.10  2003/06/04 21:46:13  error
1223  * citadel.c: Added a missing #ifdef __CYGWIN__
1224
1225  Revision 606.9  2003/06/04 21:39:27  error
1226  * Numerous fixups needed for Windows port:
1227    * cmd_mesg() rewritten to use the stat() syscall to find files
1228    * really_do_keepalive() does not try to send if we are not connected
1229    * Misc. fixups; added Windows readme file
1230
1231  Revision 606.8  2003/06/04 21:30:39  error
1232  * messages.c: When file attachment has no name, use message subject as name
1233
1234  Revision 606.7  2003/06/02 23:11:00  error
1235  * Checkin installer script citadel.nsi for NSIS Windows installer
1236
1237  Revision 606.6  2003/06/02 03:01:22  ajc
1238  * citserver.c: added another trace message to is_public_client().  Uncensored
1239    has crashed twice in this function, for no apparent reason.
1240  * internet_addressing.c: don't attempt to look up the specified Internet
1241    address in a Citadel directory, if the supplied address has no hostname
1242    portion.  (Fixes a crash in the calendar service when alias() attempts to
1243    look up potentially nonexistent attendees during event validation)
1244
1245  Revision 606.5  2003/05/28 03:08:38  ajc
1246  * msgbase.c: validate_recipients() now rejects Internet addresses in
1247    domains belonging to the local system or an attached Citadel network,
1248    when it fails to translate to a Citadel address.
1249
1250  Revision 606.4  2003/05/26 05:36:25  ajc
1251  * citadel.h: changed internal version number to 6.07
1252  * file_ops.c: #include <ctype.h>
1253  * migratenet.c: #include <ctype.h>
1254
1255  Revision 606.3  2003/05/26 05:30:18  ajc
1256  * serv_calendar.c: fixed a bug in the "ICAL freebusy" subcommand which
1257    caused it to always fetch the logged in user's freebusy times instead
1258    of the user specified.
1259
1260  Revision 606.2  2003/05/22 13:34:30  ajc
1261  * database_sleepycat.c: added a couple of diagnostic messages to help
1262    troubleshoot problems with db-4.1.25 on Red Hat Linux 9
1263  * room_ops.c: call mkdir() instead of system() to create a directory
1264
1265  Revision 606.1  2003/05/20 01:28:50  error
1266  * citadel.c: don't truncate roomname when user is idle, in long who list;
1267    display idle time in short who list
1268
1269  Revision 606.0  2003/05/16 15:17:11  ajc
1270  * THIS IS 6.06
1271
1272  Revision 605.50  2003/05/16 14:59:08  ajc
1273  * Removed the old rec_log() facility because the utilities which read its
1274    data are crufty, disused, and produce incorrect output.
1275  * Updated the documentation for the forthcoming 6.06 release.
1276  * public_clients: removed hostnames which crept in from development servers
1277
1278  Revision 605.49  2003/05/16 04:07:37  nbryant
1279  make configure.ac automagically do the right thing on redhat 9
1280  remove crappy tolower() hack that was breaking the build on redhat 9
1281  (because the kerberized openssl includes ctype.h)
1282
1283  before anyone yells at me, i did a little cvs archaeology on the tolower
1284  thing, and it appears to have been in the Citadel source base since,
1285  roughly, the Epoch. I doubt that the hack is needed any longer, and using
1286  the OS's tolower() will handle extended charsets.
1287
1288  Anyone who is stupid enough to be using an OS with such a horribly broken
1289  tolower() can just scratch their head and figure things out for
1290  themselves. Citadel needs higher barriers to entry, there are too many
1291  weirdos on the IGnet lately. :-)
1292
1293  Revision 605.48  2003/05/13 03:22:04  ajc
1294  * Implemented the IMAP STARTTLS command as specified in RFC 2595.
1295
1296  Revision 605.47  2003/05/06 03:38:59  ajc
1297  * IMAP folder create and rename commands -- don't allow backslashes in
1298    folder names.
1299
1300  Revision 605.46  2003/05/03 16:50:52  ajc
1301  * Change folder delimiter in room names from / to \
1302
1303  Revision 605.45  2003/05/02 04:02:47  ajc
1304  * setup.c: allow specification of the Citadel system account by either
1305             username or uid
1306  * setup.c: tell init to re-read /etc/inittab by sending a SIGHUP to pid 1
1307             instead of hunting around for the correct init or telinit command
1308  * docs/citadel.html: documented the above change, and also rewrote some
1309                       other stuff to be less BBS-specific
1310
1311  Revision 605.44  2003/04/30 16:16:13  ajc
1312  * Minor fix to ESMTP greeting (missing '-' screwed up pipelining)
1313
1314  Revision 605.43  2003/04/30 15:46:27  ajc
1315  * Added the ENHANCEDSTATUSCODES extention to ESMTP.
1316
1317  Revision 605.42  2003/04/29 04:41:22  ajc
1318  * Fix an off-by-one error in the mime parser
1319
1320  Revision 605.41  2003/04/29 04:13:58  ajc
1321  * mime parser: look for the "name=" subfield tacked onto either
1322    Content-type or Content-disposition, wherever it finds it.
1323
1324  Revision 605.40  2003/04/28 16:56:51  ajc
1325  * Added a site-configurable setting to suppress the automatic correction of
1326    forged From: lines from authenticated SMTP users, for those who prefer
1327    strict RFC compliance instead of common sense.
1328
1329  Revision 605.39  2003/04/26 21:55:15  ajc
1330  * Anytime a socket connect() fails, CLOSE THE SOCKET before erroring out.
1331    Not doing so causes a file descriptor leak.
1332
1333  Revision 605.38  2003/04/26 04:22:51  ajc
1334  * Removal of individual "remote" lines from message delivery instruction sets
1335    was corrupting the end of the set, rendering the "bounceto" line unusable
1336    and preventing bounces from being delivered.  Fixed this by explicitly
1337    adding a trailing newline when remove_token() strips it.
1338
1339  Revision 605.37  2003/04/25 18:28:47  ajc
1340  * When rejecting spam, use SMTP error code 550, not 552
1341
1342  Revision 605.36  2003/04/23 03:18:44  ajc
1343  * Allow IMAP STORE of more than one flag at a time (Mail.app from MacOS
1344    does this).
1345
1346  Revision 605.35  2003/04/15 02:44:02  ajc
1347  * Do not allow incoming network polls while an outbound network processing
1348    session is in progress.
1349  * tools.c: removed collapsed_strcmp() as it is no longer used anywhere
1350
1351  Revision 605.34  2003/04/08 04:03:37  ajc
1352  * Implemented the ".SILENT" protocol option in IMAP STORE.  Certain apps seem
1353    to want to use it.
1354  * Optimized the IMAP operations which scan for expunged and added messages.
1355    These loops no longer make multiple traversals through the message list.
1356
1357  Revision 605.33  2003/04/07 05:02:23  ajc
1358  * Reworked all the "list rooms" operations so that they only require one
1359    pass through the database.
1360  * Repaired the "create floor" operation which was broken by the switch
1361    to the new IPC libray
1362
1363  Revision 605.32  2003/04/02 13:33:28  ajc
1364  * Fixed output of "-0500" vs. "+0500" type of timezone stamps in RFC822.
1365    (I think they were reversed.)
1366
1367  Revision 605.31  2003/04/01 05:01:08  ajc
1368  * sysdep.c: optimized MyContext() a bit, and inlined it.  A little profiling
1369    revealed that this function was getting used super heavily.
1370  * tools.c: removed the older, slower string tokenizer functions that
1371    weren't getting used anymore.
1372
1373  Revision 605.30  2003/03/31 04:55:58  ajc
1374  * Repaired the formatting of text/plain messages with blank lines.
1375
1376  Revision 605.29  2003/03/30 06:16:52  ajc
1377  * Optimized CtdlReadMessageBody() and also gave it an option to store
1378    messages with CRLF newlines instead of LF.  This option is used when
1379    reading SMTP in order to keep Pine from barfing on LF-terminated newlines
1380    while decoding quoted-printable.  Once again, Mark Crispin is an idiot.
1381
1382  Revision 605.28  2003/03/26 05:17:12  ajc
1383  * Downloading of attachments was completely broken by the change to the new
1384    protocol library.  Located and fixed bugs.
1385  * html.c: increased the conversion buffer size
1386
1387  Revision 605.27  2003/03/24 03:42:14  ajc
1388  * Add the ability to quit out while validating users.  Also added a help
1389    option listing available access levels.  This closes Bugzilla #37.
1390
1391  Revision 605.26  2003/03/22 05:38:23  ajc
1392  * During startup, display the version string from the Berkeley DB library.
1393  * When deleting a mailbox, don't reveal the namespace prefix to the user.
1394
1395  Revision 605.25  2003/03/20 08:37:04  error
1396  * connection_died(): Don't crash before printing message, crash afterward.
1397    (Bugzilla id 111)
1398
1399  Revision 605.24  2003/03/19 11:48:06  error
1400  * entmsg(): Don't corrupt the msg_arr[] when replying to a message in a room
1401
1402  Revision 605.23  2003/03/19 04:04:56  ajc
1403  * Dropped support for GDBM and for versions of Berkeley DB prior to 4.1
1404
1405  Revision 605.22  2003/03/18 05:15:05  ajc
1406  * Applied a patch sent in by Clint Adams <schizo@debian.org> to handle
1407    building on Debian's unstable with Berkeley DB 4.1, compiled with
1408    the --with-db-uniquename when errno is a macro (as in glibc 2.3.1).
1409
1410  Revision 605.21  2003/03/17 11:56:35  error
1411  * Fix <G>oto in alternate_semantics - it actually marks messages read now.
1412
1413  Revision 605.20  2003/03/17 04:03:14  ajc
1414  * Supply a NULL argument as the second argument to accept() instead of an
1415    empty buffer whose contents we never even look at.
1416
1417  Revision 605.19  2003/03/16 05:07:12  ajc
1418  * Fixed the bug that caused freebusy publishes to crash.
1419
1420  Revision 605.18  2003/03/15 23:05:08  ajc
1421  * Rewrite of calendar-to-freebusy conversion functions.  This one creates
1422    freebusy in the correct format, instead of what I mistakenly assumed it
1423    was supposed to look like.  :(
1424
1425  Revision 605.17  2003/03/15 22:31:06  ajc
1426  * When scanning a user's Calendar> room for calendar events, search for
1427    MIME parts of type text/calendar instead of assuming that the event will
1428    always appear as part "1"
1429
1430  Revision 605.16  2003/03/14 05:08:25  ajc
1431  * Clone calendar subcomponents before encapsulating in case they already
1432    happen to have a parent.
1433
1434  Revision 605.15  2003/03/13 05:48:33  ajc
1435  * Move towards storing calendar objects as fully encapsulated VCALENDAR
1436    components instead of just VEVENT subcomponents.
1437
1438  Revision 605.14  2003/03/12 03:33:54  ajc
1439  * More changes to the handling of RFC822 headers with regard to
1440    splitting up the headers and body.  (Blank lines and such.)
1441
1442  Revision 605.13  2003/03/11 06:23:50  ajc
1443  * More accurate handling of IMAP FETCH xx BODYSTRUCTURE command.  This should
1444    make Pine happier with multipart messages.
1445
1446  Revision 605.12  2003/03/10 05:38:21  ajc
1447  * Tweaks to msgbase.c and imap_fetch.c to fix slightly incorrect byte counts
1448    reported in the numerous variations of IMAP FETCH.  This silences a number of
1449    error messages reported by Pine.
1450
1451  Revision 605.11  2003/03/10 03:40:08  ajc
1452  * Fixed bug that caused segv when <R>eplying to certain messages
1453
1454  Revision 605.10  2003/03/07 17:39:45  ajc
1455  * Remove the "modules" directory
1456
1457  Revision 605.9  2003/03/06 04:58:11  ajc
1458  * When entering a message into Citadel with authenticated SMTP, stamp the
1459    room name as MAILROOM (Mail>) so it doesn't end up with an ugly moniker
1460    like "0000058008.Sent Items"
1461
1462  Revision 605.8  2003/03/05 04:55:32  ajc
1463  * serv_smtp.c: when authenticated, do not log out when a RSET command is
1464    issued.  This breaks clients which carelessly issue RSET before each
1465    message, such as Pine.
1466  * serv_smtp.c: when authenticated, ignore envelope FROM:<xxx> sender name
1467    and replace with address of user who authenticated.  Also fixes Pine.
1468  * serv_smtp.c: when authenticated, not only do we continue our glorious
1469    RFC-violating condition of replacing the From: header with the user who
1470    is logged in, but we also stamp it with their preferred Internet address
1471    for outbound mail (which is kept in CC->cs_inet_email).
1472
1473  Revision 605.7  2003/03/03 04:09:21  ajc
1474  * When creating a user, hide the "My Citadel Config>" room of the user being
1475    created, not the user currently logged in.
1476
1477  Revision 605.6  2003/03/01 18:18:03  ajc
1478  * commands.c: alternate_semantics might have been getting set where it
1479    should not.  Fixed.
1480
1481  Revision 605.5  2003/03/01 17:25:33  ajc
1482  * citadel.rc default for alternate_semantics = no
1483
1484  Revision 605.4  2003/02/23 05:34:45  ajc
1485  * When the <N>ew command is used to read new messages, the next "lazy"
1486    command (space bar) now always does <G>oto, regardless of the last one.
1487
1488  Revision 605.3  2003/02/21 04:24:51  ajc
1489  * Completed the "ICAL freebusy" subcommand, which fetches free/busy times
1490    for any requested user (output in stripped-down VCALENDAR format)
1491
1492  Revision 605.2  2003/02/20 04:51:17  ajc
1493  * Began framing up a command to view other users' free/busy times
1494
1495  Revision 605.1  2003/02/19 22:38:43  ajc
1496  * Changed socklen_t to int (to allow compile on Macintosh)
1497
1498  Revision 605.0  2003/02/19 03:46:01  ajc
1499  * THIS IS 6.05
1500
1501  Revision 601.134  2003/02/17 05:23:20  ajc
1502  * Fixed a small bug in the GDBM backend (deprecated, but the bug was very
1503    obvious and a kind user pointed it out)
1504  * Removed vestiges of setjmp/longjmp from the client
1505  * When doing .TS, don't get caught in a constant-logout loop
1506
1507  Revision 601.133  2003/02/14 16:12:04  ajc
1508  * Added support for any standard RBL
1509
1510  Revision 601.132  2003/02/13 22:33:41  ajc
1511  * Fixed algorithm for reporting "last login"
1512
1513  Revision 601.131  2003/02/13 21:52:13  ajc
1514  * IMAP service: fixed bug that was causing the wrong messages (usually *all*
1515    messages) to be flagged when a STORE or COPY operation was performed.
1516
1517  Revision 601.130  2003/02/13 20:13:51  ajc
1518  * Applied "multi editor" patch supplied by georbit
1519
1520  Revision 601.129  2003/02/12 04:51:44  ajc
1521  * More docs update
1522
1523  Revision 601.128  2003/02/10 04:50:33  ajc
1524  * More documentation updates
1525
1526  Revision 601.127  2003/02/09 03:38:28  ajc
1527  * Updated the documentation some more
1528
1529  Revision 601.126  2003/01/25 07:37:15  error
1530  * whobbs.c: Print error message if we can't connect to server
1531
1532  Revision 601.125  2003/01/23 05:50:59  ajc
1533  * citadel.c: hitting enter without entering a room name in the <.G>oto and
1534    <.S>kip commands now does nothing instead of exhibiting undefined behavior
1535
1536  Revision 601.124  2003/01/23 04:42:33  ajc
1537  * Began reviewing, updating, and HTML-izing the documentation
1538
1539  Revision 601.123  2003/01/22 03:53:24  ajc
1540  * More reliablility hacks for autologin mode, and better quarantine of
1541    autologin code when it's disabled.
1542
1543  Revision 601.122  2003/01/21 04:42:12  ajc
1544  * Moved login-to-screenname code ... no longer part of CtdlTryExistingUser(),
1545    it's now part of getuser() so it always gets called, even when looking up
1546    addresses for mail and stuff.
1547
1548  Revision 601.121  2003/01/19 08:59:02  error
1549  * Remove irrelevant file hpsux.h (was part of dynloader)
1550
1551  Revision 601.120  2003/01/19 05:55:59  ajc
1552  * serv_calendar.c: allocate dynamic symbol at module startup, not during
1553    each session startup.  This error was causing crashes (of course).
1554
1555  Revision 601.119  2003/01/18 06:18:20  ajc
1556  * whobbs.c: line up the columns better
1557  * routines2.c: when doing <.ASI> command, entering a blank hostname causes
1558    it to abort instead of adding a new host.  Also strip l/t whitespace.
1559
1560  Revision 601.118  2003/01/17 22:36:56  ajc
1561  * This commit is a figment of your imagination.
1562
1563  Revision 601.117  2003/01/17 21:50:27  ajc
1564  * Began making some build changes for Cygwin compatibility
1565
1566  Revision 601.116  2003/01/17 10:06:54  error
1567  * fmout():  Ignore \r (carriage return) characters in messages
1568
1569  Revision 601.115  2003/01/17 04:36:04  ajc
1570  * whobbs.c: fix bad call to CtdlGetServInfo() so we can get our session ID
1571    and the name of the BBS
1572
1573  Revision 601.114  2003/01/16 21:16:23  error
1574  * CtdlIPCGetMessages(): Fix message read failing on first attempt to read
1575    messages
1576
1577  Revision 601.113  2003/01/16 10:04:03  error
1578  * ENT0 command: changed post-as username from arg 4 to arg 5; 4 was already
1579    used as the message subject
1580  * Convert message entry and reading to new IPC code
1581  * Minor bugfixes throughout IPC code
1582
1583  Revision 601.112  2003/01/16 04:17:02  ajc
1584  * citadel_ipc.c: when issuing a SPEX command, send the string value for
1585    room/floor/site instead of the number.  citserver wants a string.
1586  * ipc_c_tcp.c: don't call SSL_shutdown() from connection_died().  This just
1587    causes it to segfault because there's no valid socket.
1588
1589  Revision 601.111  2003/01/16 03:41:45  ajc
1590  * Renamed "dynloader" to "serv_extensions" globally.  We don't want people
1591    to think we have a dynamic loader, do we?  :)
1592  * serv_*_init() is now declared in serv_extensions.h.  This is definitely the
1593    wrong place for it.  It's there temporarily until we decide on a new
1594    convention for server extensions.
1595  * bootstrap: more reliable detection of Red Hat Linux 7.3 -- more specifically,
1596    fewer fireworks when the host system is *not* Red Hat Linux.
1597
1598  Revision 601.110  2003/01/15 16:34:53  ajc
1599  * bootstrap: don't check /etc/redhat-release if it doesn't exist (which is
1600    the case on all non Red Hat Linux systems)
1601
1602  Revision 601.109  2003/01/15 05:57:09  ajc
1603  * First cut at static-linking the citserver.  Ripped out libtool and
1604    replaced the dynloader paradigm with "server extensions" paradigm (static
1605    linked, but still very loosely coupled by way of using the API's to
1606    register callbacks and commands etc.)   Needs more testing.
1607
1608  Revision 601.108  2003/01/14 04:12:26  ajc
1609  * Set default view for new user Calendar> rooms to 3 (calendar)
1610  * Set default view for new user Tasks> rooms to 4 (tasks)
1611
1612  Revision 601.107  2003/01/13 17:04:19  ajc
1613  * Add a sample URL view command for Macintosh in the included citadel.rc
1614
1615  Revision 601.106  2003/01/13 02:55:07  ajc
1616  * Do calendar support only if libical header *and* library are present
1617
1618  Revision 601.105  2003/01/12 23:07:40  ajc
1619  * configure.ac: Attempt to check for libical 0.24 or newer
1620
1621  Revision 601.104  2003/01/12 05:01:58  ajc
1622  * Start marking things for 6.05 release
1623
1624  Revision 601.103  2003/01/12 04:48:23  ajc
1625  * Display message subjects in magenta instead of white
1626
1627  Revision 601.102  2003/01/06 09:17:10  error
1628  * Remove non (yet) existent sstring.c dependency from Makefile.in
1629
1630  Revision 601.101  2003/01/05 07:35:03  error
1631  * Add an AllFloors parameter to the citadel IPC API
1632
1633  Revision 601.100  2003/01/01 08:07:46  error
1634  * commands.c: bugfix for reading from FILE pointers; affected quote, print
1635    and external editor.
1636
1637  Revision 601.99  2002/12/28 05:33:29  ajc
1638  * ical_dezonify: set is_utc=1 even if we didn't convert from some arbitrary
1639    timezone.  Presumably this means the time was already UTC, and we really
1640    need that "Z" to get slapped on it.
1641
1642  Revision 601.98  2002/12/28 05:12:06  ajc
1643  * Yet another attempt at making ical_dezonify() send outgoing calendar items
1644    in UTC format.  (This one will probably work -- the timestamps have the
1645    "Z" after them which signifies UTC instead of local time.)
1646
1647  Revision 601.97  2002/12/27 04:40:40  ajc
1648  * Another attempt at fixing timezones :(
1649
1650  Revision 601.96  2002/12/25 23:17:07  ajc
1651  * ical_dezonify.c: shuffle around #includes and #ifdef's
1652
1653  Revision 601.95  2002/12/25 21:46:19  ajc
1654  * Another shot at timezone handling (ugggghh)
1655
1656  Revision 601.94  2002/12/25 07:05:26  ajc
1657  * set up ical_dezonify() to be called at appropriate times
1658    (but it doesn't seem to work correctly yet)
1659
1660  Revision 601.93  2002/12/25 06:41:44  ajc
1661  * ical_dezonify.c: added (function to strip localized timestamps out of
1662    a component and replace them with UTC timestamps)
1663
1664  Revision 601.92  2002/12/19 04:51:49  ajc
1665  * database_cleanup.sh: added
1666
1667  Revision 601.91  2002/12/18 04:08:16  ajc
1668  * Don't attempt to send out invitations when there are no attendees.
1669
1670  Revision 601.90  2002/12/15 10:53:51  error
1671  * Final touches on the new message formatter.
1672
1673  Revision 601.89  2002/12/15 09:42:37  error
1674  * Converted more routines to new IPC code.
1675
1676  Revision 601.88  2002/12/14 23:21:29  ajc
1677  * When saving a calendar event, set the message Subject to the event
1678    summary string, and the message Date/time to the event start time.
1679
1680  Revision 601.87  2002/12/10 23:36:20  ajc
1681  * Fixed a bug in the allocation of per-session dynamic data for calendar module
1682
1683  Revision 601.86  2002/12/09 06:07:29  ajc
1684  * Finished the code to accept incoming calendar REPLY messages and
1685    merge/save the updated event in the user's calendar.
1686
1687  Revision 601.85  2002/12/08 06:01:48  ajc
1688  * More work on the reply handler.  Wrote functions to locate the message
1689    containing the invitation being replied to.  Just need to write the
1690    merge and resave functions now.
1691
1692  Revision 601.84  2002/12/08 00:23:08  ajc
1693  * Began adding a calendaring subcommand to accept a reply to a meeting
1694    invitation and update the event in the user's calendar.  (Not finished.)
1695
1696  Revision 601.83  2002/12/04 05:01:18  ajc
1697  * When sending out invitations, encapsulate the VEVENT component inside a
1698    VCALENDAR component, along with proper metadata such as product ID and
1699    vcalendar version.  Move the METHOD:REQUEST property to the encapsulating
1700    component rather than the event itself.  (Still need to add a VTIMEZONE).
1701
1702  Revision 601.82  2002/12/03 04:49:15  ajc
1703  * Send out meeting requests!  (Need to test with various clients.)
1704
1705  Revision 601.81  2002/12/02 08:09:00  error
1706  * Improvements to the new message formatter, including URL support and
1707    doing the Right Thing for text/plain messages.
1708
1709  Revision 601.80  2002/12/01 11:02:57  error
1710  * New experimental message formatter - try it, you'll like it!
1711
1712  Revision 601.79  2002/12/01 04:48:24  ajc
1713  * The code to check for sending invitations needs to happen *after* save
1714
1715  Revision 601.78  2002/12/01 00:59:54  ajc
1716  * Reliably detect when the user saving an event is listed as the meeting
1717    organizer.  (Currently calls a stub function.  Still need to write the
1718    function to generate and send invitations.)
1719
1720  Revision 601.77  2002/11/30 21:35:30  ajc
1721  * just some trace messages
1722
1723  Revision 601.76  2002/11/30 05:39:28  ajc
1724  * Started banging out some code to determine when a saved vEvent needs to
1725    send out meeting invites.
1726
1727  Revision 601.75  2002/11/29 16:24:59  ajc
1728  * When calling ical*_remove_*() routines, the caller then owns the object
1729    which is removed.  Added ical*_free() calls to free the memory.
1730
1731  Revision 601.74  2002/11/29 15:44:41  ajc
1732  * CC->cs_inet_email is now a string buffer, not a pointer
1733  * Initialize CC->cs_inet_email with a default address, so it always
1734    contains something even when the directory doesn't
1735  * Augment CHEK command to return the user's preferred Internet e-mail addr.
1736
1737  Revision 601.73  2002/11/27 21:05:31  nixo
1738  added dot ungoto functionality.
1739  It allows you to enter a room to ungoto, it will look
1740  through the ungoto list and goto there at the room position
1741  you last goto-ed it from.
1742  Don't blame me, this was Gary's idea.
1743
1744  Revision 601.72  2002/11/25 05:10:07  ajc
1745  * Post a notification to Aide> when a user is manually deleted
1746    (resolves Bugzilla enhancement request #73)
1747
1748  Revision 601.71  2002/11/25 04:57:43  ajc
1749  * Allow set/clear of per-user Internet mail privilege
1750  * Honor that flag
1751
1752  Revision 601.70  2002/11/23 13:35:47  error
1753  * Makefile.in: Alphabetized all the source files
1754
1755  Revision 601.69  2002/11/21 05:38:13  ajc
1756  * Added support for a "New User Greetings" room.  See docs/install.txt
1757
1758  Revision 601.68  2002/11/15 11:24:40  error
1759  * serv_rwho.c: cmd_rwho(): move logged_in from param 8 to param 11
1760    (see RWHO in techdoc/session.txt)
1761
1762  Revision 601.67  2002/11/13 17:20:57  ajc
1763  * When in curses mode, call beep() instead of putc(7, stdout) to make it beep.
1764
1765  Revision 601.66  2002/11/12 04:30:16  ajc
1766  * Completed the invitation accept/decline code.  It now sends back a
1767    correctly formated reply!  (Tested with Evolution)
1768
1769  Revision 601.65  2002/11/11 06:21:55  error
1770  * Fixed minor bugs with color handling; added explicit support for handling
1771    the background color e.g. for transparent terminals
1772
1773  Revision 601.64  2002/11/11 04:17:24  ajc
1774  * More work on reply to meeting invitation
1775
1776  Revision 601.63  2002/11/10 09:21:57  error
1777  * messages.c: fixed <H>eader command
1778
1779  Revision 601.62  2002/11/10 09:19:38  error
1780  * Convert some more routines to new IPC code
1781
1782  Revision 601.61  2002/11/10 09:14:16  error
1783  * citadel.spec: updated for post-6.01
1784
1785  Revision 601.60  2002/11/10 09:12:06  error
1786  * citadel.c: When terminating, don't mark messages new when using new
1787    message semantics
1788
1789  Revision 601.59  2002/11/08 05:28:54  ajc
1790  * Reply to VEVENT invitations: generate reply by cloning the request,
1791    stripping out non-me attendees, setting the partstat to accept/decline,
1792    and extracting the address of the organizer.   (Still not finished: right
1793    now it does everything except actually sending the reply.)
1794
1795  Revision 601.58  2002/11/07 04:40:07  ajc
1796  * Repaired the "remember username/password" functionality of the client
1797    (it was broken during the transition to the new client protocol library)
1798
1799  Revision 601.57  2002/11/06 05:03:01  ajc
1800  * No changes; just testing CVS permissions
1801
1802  Revision 601.56  2002/11/04 21:49:53  ajc
1803  * Don't run the wait indicator when in an external editor
1804
1805  Revision 601.55  2002/11/01 04:57:56  ajc
1806  * Fixed .AM and .AE commands
1807
1808  Revision 601.54  2002/10/29 20:14:56  error
1809  * rooms.c: don't allow a blank floor name when creating a floor (in client)
1810
1811  Revision 601.53  2002/10/26 06:15:09  ajc
1812  * cmd_cflr() - don't allow zero length floor names
1813
1814  Revision 601.52  2002/10/26 06:01:19  ajc
1815  * Increase size of temp file name buffer in struct CitContext
1816
1817  Revision 601.51  2002/10/25 09:38:38  error
1818  * Fixed broken .Goto by partial match
1819
1820  Revision 601.50  2002/10/25 09:26:26  error
1821  * Fix the status line not updating with the new wait indicator; rearrange
1822    the code so network_status_cb is a member function of ipc.
1823
1824  Revision 601.49  2002/10/25 04:39:38  ajc
1825  * When in fullscreen mode, display an "X" icon in the lower right corner of
1826    the screen while waiting for the server.
1827
1828  Revision 601.48  2002/10/24 09:04:53  error
1829  * acconfig.h: add DISABLE_CURSES template
1830
1831  Revision 601.47  2002/10/23 04:06:41  ajc
1832  * "conflicts" check now also tells the client whether a conflicting event
1833    is really just an older version of the same object.
1834
1835  Revision 601.46  2002/10/23 03:55:21  ajc
1836  * Finished: when saving an object of type text/calendar to the Calendar> room,
1837    set the Citadel "extended message ID" to the UID of the VEVENT object.  This
1838    causes the message base to automatically delete any existing instance(s) of
1839    that object: automatic replacement.
1840
1841  Revision 601.45  2002/10/23 03:07:43  ajc
1842  * First hack at UID-to-EMSGID mapping (for auto replacement)
1843
1844  Revision 601.44  2002/10/21 20:00:41  ajc
1845  * List UID and SUMMARY properties of conflicting events
1846
1847  Revision 601.43  2002/10/21 17:14:42  ajc
1848  * More work on conflict detects
1849
1850  Revision 601.42  2002/10/20 21:42:54  ajc
1851  * More conflict checking stuff
1852
1853  Revision 601.41  2002/10/20 20:21:27  ajc
1854  * Put in a skeleton "hunt for conflicts" code
1855
1856  Revision 601.40  2002/10/20 08:01:03  error
1857  * docs/install.txt: add Mac OS X build instructions
1858
1859  Revision 601.39  2002/10/19 21:35:34  ajc
1860  * Moved some of the calendar logic over from WebCit
1861
1862  Revision 601.38  2002/10/19 08:30:03  error
1863  * dynloader.c:  Darwin places underscores in front of symbol names, just
1864    like OpenBSD.
1865
1866  Revision 601.37  2002/10/19 08:18:06  error
1867  * Disable any use of curses on Darwin (this is temporary until I beat
1868    Apple's bizarre linker into submission)
1869
1870  Revision 601.36  2002/10/18 10:33:09  error
1871  * More signed/unsigned fixes (for the new progress gauge)
1872
1873  Revision 601.35  2002/10/18 07:56:30  error
1874  * fix self-service account creation at login prompt (accidentally called
1875    CREU instead of NEWU).
1876
1877  Revision 601.34  2002/10/18 03:44:13  ajc
1878  * Fixed a bug in CtdlRenameRoom() that caused the old room record not to be
1879    deleted when there was a mailbox namespace attached.
1880  * Reworked imap_rename() and imap_rename_backend() to not use nested functions
1881
1882  Revision 601.33  2002/10/17 12:56:44  error
1883  * Bug fixes:  Fix numerous char array size mismatches, signed/unsigned
1884    mismatches, and const correctness problems (though not nearly all)
1885
1886  Revision 601.32  2002/10/17 11:13:27  error
1887  * Convert room listings and some aide functions to new IPC code
1888
1889  Revision 601.31  2002/10/16 13:46:19  ajc
1890  * Remove some trace messages
1891
1892  Revision 601.30  2002/10/16 08:59:41  error
1893  * Don't assume pointer to time_t is compatible with pointer to
1894    struct timeval.tv_sec (it isn't on darwin)
1895
1896  Revision 601.29  2002/10/16 02:49:55  ajc
1897  * CtdlWriteObject() encode in memory instead of on disk (not tested)
1898
1899  Revision 601.28  2002/10/15 17:41:20  ajc
1900  * Numerous warning fixes and cleanups for compile on Linux for IBM S/390
1901  * Name temp files with source code location of who created them
1902
1903  Revision 601.27  2002/10/15 06:47:11  error
1904  * IPC support for resumable downloads
1905
1906  Revision 601.26  2002/10/15 06:44:55  error
1907  * configure.ac check for malloc.h header file (Mac OS X needs this)
1908
1909  Revision 601.25  2002/10/15 03:56:33  ajc
1910  * Run without crashing on Berkeley DB 4.1  :)
1911
1912  Revision 601.24  2002/10/15 03:30:52  ajc
1913  * Build ok on Berkeley DB 4.1
1914
1915  Revision 601.23  2002/10/14 08:27:40  error
1916  * Mac OS X build fixes (everything but serv_imap now builds)
1917
1918  Revision 601.22  2002/10/08 09:44:52  error
1919  * Build environment:  cvs ignore .diff/.patch files
1920
1921  Revision 601.21  2002/10/07 18:59:37  ajc
1922  * Build fixes for Solaris box without OpenSSL installed
1923
1924  Revision 601.20  2002/10/07 09:40:49  error
1925  * Don't try to compile non-existent client_crypto.c (oops!)
1926
1927  Revision 601.19  2002/10/06 18:46:30  error
1928  * Move (nearly) all IPC-related code to citadel_ipc.[ch].
1929
1930  Revision 601.18  2002/10/05 04:48:29  ajc
1931  * Change MAXSETUP from 4 to 3 (bug reported by mavherzog, fix suggested by IO)
1932
1933  Revision 601.17  2002/10/04 07:11:56  error
1934  * Fix bootstrap for Red Hat 7.3
1935
1936  Revision 601.16  2002/10/02 04:07:27  error
1937  * status_line() now shows "new mail" only when there is new mail
1938
1939  Revision 601.15  2002/10/01 04:00:13  ajc
1940  * html.c: speed improvement in html-to-ascii converter
1941  * messages.c: MASSIVE speed improvement in message output
1942
1943  Revision 601.14  2002/09/30 08:07:11  error
1944  * ipcdef.h: add extern "C" for linking to C++ programs
1945
1946  Revision 601.13  2002/09/30 07:32:09  error
1947  * ipcdef.h: remove prototype for connection_died(), it doesn't belong there
1948
1949  Revision 601.12  2002/09/30 07:20:35  error
1950  * Fix configure mis-detecting libical and zlib and a missing semicolon in
1951    tools.h
1952
1953  Revision 601.11  2002/09/29 04:55:13  error
1954  * File and attachment downloads now use the new IPC code.
1955  * Implemented high-speed pipelined file download in IPC code.
1956
1957  Revision 601.10  2002/09/29 04:41:43  error
1958  * file_ops.c: cmd_read() now returns a short read at end-of-file instead of
1959    4096, this prevents trailing garbage on the downloaded file; also it now
1960    succeeds if the requested number of bytes is > 4096; it simply returns
1961    only 4096 bytes.
1962
1963  Revision 601.9  2002/09/27 06:53:20  error
1964  * Allow multiple simultaneous IPC connections.  All changes necessary for
1965    the client to use the new code are necessarily included.
1966
1967  Revision 601.8  2002/09/22 02:48:04  ajc
1968  * axdefs.h: add "Notes" view
1969
1970  Revision 601.7  2002/09/17 03:18:15  ajc
1971  * Create the Calendar> and Tasks> rooms at login time, and set their default
1972    views to calendar and tasklist views.  Renamed "My Calendar>" to "Calendar>"
1973    to be in sync with the KDE groupware project.
1974
1975  Revision 601.6  2002/09/15 03:24:28  ajc
1976  * Renamed decode_base64() to CtdlDecodeBase64()
1977  * Renamed decode_quoted_printable() to CtdlDecodeQuotedPrintable()
1978  * These changes are to avoid namespace conflict with libical
1979
1980  Revision 601.5  2002/09/13 15:41:39  ajc
1981  * serv_calendar.c: #include "serv_calendar.h", not "serv_ical.h"
1982
1983  Revision 601.4  2002/09/11 03:17:18  ajc
1984  * [EXPERIMENTAL] Link in the "libical" calendar library if present
1985  * Rename serv_ical to serv_calendar (because the resulting module would be
1986    named "libical" which conflicts with the external library by that name)
1987
1988  Revision 601.3  2002/09/10 08:07:38  error
1989  * update citadel.spec for 6.00* update citadel.spec for 6.00* update citadel.spec for 6.00* update citadel.spec for 6.00* update citadel.spec for 6.00* update citadel.spec for 6.00* update citadel.spec for 6.00* update citadel.spec for 6.00
1990
1991  Revision 601.2  2002/09/09 03:03:18  ajc
1992  * When a user logs in, create the Mail> room if it doesn't exist.  (Should
1993    never happen, but one site had a situation where this patch came in handy.)
1994
1995  Revision 601.1  2002/09/08 04:15:28  ajc
1996  * Also fixed a bug in <.T>erminate <S>tay which caused the terminal to
1997    become wacky on second and subsequent sessions.
1998
1999  Revision 601.0  2002/09/08 03:51:30  ajc
2000  * Let's call this 6.01, shall we?
2001
2002  Revision 600.2  2002/09/08 03:48:48  ajc
2003  * Fixed a crashy crashy bug in the AGUP protocol function in the client
2004
2005  Revision 600.1  2002/09/07 03:24:23  ajc
2006  * When displaying messages using MSG4, enumerate the attachments on the
2007    client side, because the server won't add their descriptions to the
2008    message text.
2009
2010  Revision 600.0  2002/09/04 03:06:58  ajc
2011  * Committing the current code base as version 6.00
2012
2013  Revision 591.109  2002/09/03 14:09:04  ajc
2014  * setup.c: automatically stop/start services
2015
2016  Revision 591.108  2002/09/03 04:42:15  ajc
2017  * Added MSG4 support to client-side IPC
2018  * Moved HTML-to-text conversion to the client side
2019
2020  Revision 591.107  2002/09/02 20:40:34  ajc
2021  * Automation work for setup
2022
2023  Revision 591.106  2002/08/31 04:36:26  ajc
2024  * IMAP APPEND no longer forces messages to appear as from the logged-in user
2025    when appending to a mailbox room.  (Allows migration to Citadel from some
2026    other type of server without losing all the sender names.)
2027
2028  Revision 591.105  2002/08/31 04:12:39  ajc
2029  * Set version number to 6.00 in documentation and header files.
2030  * Convert RFC822 newlines (CRLF) to Unix/Citadel newlines (LF) when
2031    performing an IMAP APPEND command.
2032
2033  Revision 591.104  2002/08/28 03:18:06  ajc
2034  * Make reply_to and reply_subject global (otherwise they don't work!)
2035
2036  Revision 591.103  2002/08/27 04:01:03  ajc
2037  * Added the ability to run an external command from the client when new mail
2038    arrives.  (Ok, I admit it: I just discovered http://www.dailywav.com and I
2039    just *had* to have Bear in the Big Blue House tell me I've got mail)
2040
2041  Revision 591.102  2002/08/26 02:55:09  ajc
2042  * Small bugfix for memory bounds checking in the MIME parser
2043
2044  Revision 591.101  2002/08/25 21:23:49  ajc
2045  * Hide the SMTP queue and the sysconfig rooms.
2046
2047  Revision 591.100  2002/08/24 05:58:53  ajc
2048  * Bugfixes and cosmetic changes to listsub system
2049
2050  Revision 591.99  2002/08/23 03:36:52  ajc
2051  * Finished all of the subscribe/unsubscribe/confirm stuff!
2052
2053  Revision 591.98  2002/08/23 02:30:02  ajc
2054  * Delete unconfirmed pending subscribe/unsubscribe requests after three days
2055  * Don't allow multiple subscriptions of the same address to a list
2056
2057  Revision 591.97  2002/08/22 03:55:11  ajc
2058  * Fixed bug in above
2059
2060  Revision 591.96  2002/08/22 03:40:00  ajc
2061  * Add "unsubscribe" command (but not yet "confirm unsubscribe")
2062
2063  Revision 591.95  2002/08/21 21:58:00  ajc
2064  * Completed self-service list subscription via web.
2065    (Still need to implement unsubscribe.)
2066
2067  Revision 591.94  2002/08/16 21:04:56  ajc
2068  * Add LPRM command
2069
2070  Revision 591.93  2002/08/14 20:21:52  ajc
2071  * Extend GETR/SETR to allow twiddling of bits in the QRflags2 bucket
2072  * New flag and config options to allow/disallow self-service list subscription
2073    and unsubscription to a room
2074
2075  Revision 591.92  2002/08/14 02:36:05  ajc
2076  * WebCit list subscription integration
2077
2078  Revision 591.91  2002/08/13 18:48:46  ajc
2079  * Generate and send subscription confirmation requests.
2080    (Still need to finalize the URL format)
2081
2082  Revision 591.90  2002/08/13 17:19:11  ajc
2083  * Added email capability to quickie_message()
2084
2085  Revision 591.89  2002/08/13 04:02:06  ajc
2086  * <R>eplace string is now case sensitive
2087
2088  Revision 591.88  2002/08/13 03:46:31  ajc
2089  * More work on the self-service subscribe/unsubscribe infrastructure
2090
2091  Revision 591.87  2002/08/12 03:00:20  ajc
2092  * Fixed bug in <R>eplacestring which caused it to lock up in certain conditions
2093
2094  Revision 591.86  2002/08/12 00:09:05  ajc
2095  * Compress VISIT records using zlib if available.  This reduces the object
2096    size from over 4k to about 70 bytes.  Experimental.
2097  * Automatically uncompress database records found to be compressed (duh)
2098
2099  Revision 591.85  2002/08/08 22:01:35  ajc
2100  * autoconf to look for zlib (for an upcoming experiment)
2101
2102  Revision 591.84  2002/08/08 03:25:56  ajc
2103  * Bugfix for above
2104  * Started writing some infrastructure for sub/unsub
2105
2106  Revision 591.83  2002/08/08 02:49:12  ajc
2107  * serv_network.c: retain unknown commands in netconfigs and write them back
2108  * techdoc/netconfigs.txt: specify commands for subscribe/unsubscribe pending
2109  * serv_listsub.c: added (currently a stub)
2110
2111  Revision 591.82  2002/08/06 03:12:14  ajc
2112  * Fixed and clarified "new mail has arrived" messages.
2113
2114  Revision 591.81  2002/08/06 03:02:29  ajc
2115  * ;AE command -- Make it clearer which floor the user is editing
2116
2117  Revision 591.80  2002/08/06 02:58:01  ajc
2118  * Cleaned up the output of digest mode.  It's usable now, but the self-service
2119    subscribe/unsubscribe functions are not there yet.
2120
2121  Revision 591.79  2002/08/05 14:38:11  ajc
2122  * rooms.c: corrected a typo reported by Campagnolo (Mike Poulin)
2123
2124  Revision 591.78  2002/08/03 19:48:40  ajc
2125  * NULLify 'roomrec' before attempting partial match in <G>oto
2126    (fixes heap corruption when this command is executed)
2127
2128  Revision 591.77  2002/08/03 04:13:46  ajc
2129  * citadel_ipc.c: Attempted to clean up memory allocation
2130
2131  Revision 591.76  2002/08/01 05:41:53  ajc
2132  * Completion of (most of) digest mode.  Still needs some polish.
2133
2134  Revision 591.75  2002/07/31 04:01:57  ajc
2135  * Began implementing "digest mode" for listserving.  (Not complete)
2136
2137  Revision 591.74  2002/07/28 20:33:13  ajc
2138  * Augmented the "headers only" functionality of the message reading API (as
2139    well as the options of the server commands which expose it) to allow
2140    headers+body, headers only, or body only.
2141  * Adjusted message output of IMAP command FETCH BODY[1] when message is in
2142    legacy Citadel format.  This fixes a bug exposed by SquirrelMail.
2143
2144  Revision 591.73  2002/07/23 04:00:06  ajc
2145  * Completed the MSGP and MSG4 commands to set the client's preferred MIME
2146    content types, and fetch messages with MIME content types.
2147
2148  Revision 591.72  2002/07/21 22:29:46  ajc
2149  * Added in some infrastructure to switch the client's message reading from
2150    conventional MSG0 to a MIME-download type thing, like WebCit does.
2151
2152  Revision 591.71  2002/07/21 15:45:07  error
2153  * Remove duplicate call for server time in who_is_online(); IPC does this now
2154
2155  Revision 591.70  2002/07/21 15:43:57  error
2156  * citadel_ipc.c: Fix for segfault on empty messages
2157
2158  Revision 591.69  2002/07/20 04:05:10  ajc
2159  * Updated hack.txt with some fresh new information
2160
2161  Revision 591.68  2002/07/19 02:28:11  ajc
2162  * citadel_ipc.c: changed various buffer lengths from 256 to SIZ in order to
2163    accomodate long lines which often spew out (usually from spam unfortunately)
2164
2165  Revision 591.67  2002/07/18 21:29:37  nbryant
2166  added a note about GNU make to the configure script output
2167
2168  Revision 591.66  2002/07/18 20:21:18  ajc
2169  * Eliminated the 512-message limit in the client for reading messages.
2170
2171  Revision 591.65  2002/07/13 04:12:40  ajc
2172  * Don't lie about format types in MSG0 anymore.  We no longer need to.
2173
2174  Revision 591.64  2002/07/13 03:24:32  ajc
2175  * CtdlOutputMsg() caches the most recently fetched message in memory.  This
2176    eliminates the need to do multiple database fetches when we go back for
2177    additional MIME parts, etc.
2178
2179  Revision 591.63  2002/07/11 03:40:51  ajc
2180  * When outputting a multipart MIME message, supply the client with "pref="
2181    and "suff=" lines in addition to the "part=" lines.
2182
2183  Revision 591.62  2002/07/02 16:27:06  error
2184  * prototypes in citadel_ipc.h updated
2185
2186  Revision 591.61  2002/06/29 23:26:55  error
2187  * fixed some memory leaks
2188
2189  Revision 591.60  2002/06/29 18:36:31  error
2190  * tools.c: Massively faster versions of extract_token() and remove_token().
2191    These functions can now handle multi-kilobyte sized strings with hundreds
2192    of tokens (or more?).
2193
2194  Revision 591.59  2002/06/29 15:55:07  error
2195  * Convert whobbs, serv_info, misc. functions to new IPC code
2196
2197  Revision 591.58  2002/06/27 03:10:04  error
2198  * rooms.c: converted most functions to new IPC code
2199
2200  Revision 591.57  2002/06/25 15:38:52  error
2201  * fixed bug in dotgoto() causing free() to segfault
2202
2203  Revision 591.56  2002/06/25 15:13:27  error
2204  * gotonext() now uses new IPC code to retrieve room listing
2205
2206  Revision 591.55  2002/06/25 14:21:35  error
2207  * remove a debugging trap I accidentally left in the code
2208
2209  Revision 591.54  2002/06/24 20:17:43  error
2210  * Fixed code for client segfault at login
2211
2212  Revision 591.53  2002/06/24 20:11:00  error
2213  * Buffer overflow fixes and minor cleanup in IPC code
2214
2215  Revision 591.52  2002/06/24 16:07:42  error
2216  * Message reading and other functions which use the fmout() screen
2217    formatter now use the new IPC code.
2218
2219  Revision 591.51  2002/06/22 20:09:16  error
2220  * Use a new IPC API (in citadel_ipc.c).  Partially converted citadel.c to
2221    use the new API.
2222
2223  Revision 591.50  2002/06/21 12:32:48  ajc
2224  * Minor documentation update
2225
2226  Revision 591.49  2002/06/19 21:52:13  ajc
2227  * Support a transient room create as well
2228
2229  Revision 591.48  2002/06/19 21:42:57  ajc
2230  * Added support for "transient goto" which allows entry into a private and/or
2231    zapped room without putting the room [back] on your known rooms list.  This
2232    is useful for the new administrative functions in WebCit (updating a user's
2233    vCard without the Aide suddenly having that user's config room on their
2234    list).
2235
2236  Revision 591.47  2002/06/18 16:34:06  error
2237  * room_ops.c: Fix for old room record not being deleted when renaming
2238    baseroom or aideroom
2239
2240  Revision 591.46  2002/06/16 21:01:11  ajc
2241  * Allow Aides to create rooms in other users' namespaces (if global access
2242    controls allow)
2243
2244  Revision 591.45  2002/06/15 20:48:50  ajc
2245  * Fixed small bug in the e<X>pert mode toggle
2246
2247  Revision 591.44  2002/06/15 20:14:55  ajc
2248  * Fixed a memory allocation bug in the vCard parser
2249
2250  Revision 591.43  2002/06/15 17:53:59  error
2251  * citserver.c: MESG command can now send a different system message based
2252    on the developer and client ID of the connected client
2253
2254  Revision 591.42  2002/06/15 04:52:26  ajc
2255  * SpamAssassin connector is now configurable in <.A>ide <S>ysconfig <I>nternet.
2256  * Allow more than one SA server (it'll try 'em all)
2257  * Don't run SA for logged in users
2258
2259  Revision 591.41  2002/06/14 20:42:56  ajc
2260  * Discovered that spamd works even without the Content-length: command, so I
2261    was able to redo the spam checker to work without a temp file.
2262
2263  Revision 591.40  2002/06/14 20:37:03  ajc
2264  * Disabled the spam strings checker I wrote a few days ago.
2265  * When receiving SMTP, check to see if spamd (the SpamAssassin daemon) is
2266    running on the local machine.  If yes, run the message through it and
2267    reject if spam.
2268
2269  Revision 591.39  2002/06/12 03:42:21  ajc
2270  * "Suppress message prompts" has been changed to "Prompt after each message"
2271    and of course the effect has been reversed.
2272  * "Be unlisted in userlog" has been moved to the end of the list of
2273    configuration prompts, so it doesn't interrupt the flow of thought regarding
2274    the prompting questions.
2275
2276  Revision 591.38  2002/06/10 22:25:25  ajc
2277  * Configuration for spam filter
2278
2279  Revision 591.37  2002/06/09 23:59:38  ajc
2280  * Started working on the spam filter
2281
2282  Revision 591.36  2002/06/07 22:10:51  ajc
2283  * Added a new message function hook type EVT_SMTPSCAN which permits modules to
2284    register hooks that can scan incoming SMTP messages and elect to reject them
2285    (due to virus or spam content, for example).
2286
2287  Revision 591.35  2002/06/07 03:22:13  ajc
2288  * Added a module "serv_mrtg" which allows activity reporting to MRTG
2289    (http://www.mrtg.org) -- this will replace our stats program.
2290
2291  Revision 591.34  2002/06/02 16:42:17  error
2292  * Support for Ctrl-W to erase a word when editing or at a prompt
2293
2294  Revision 591.33  2002/05/31 18:34:04  nbryant
2295  better curses compatibility, and a couple makefile/configure tweaks
2296
2297  Revision 591.32  2002/05/28 13:59:02  ajc
2298  * Removed the 'netsetup' and 'dnetsetup' utilities (obsolete)
2299
2300  Revision 591.31  2002/05/24 19:58:13  ajc
2301  * Fixed the "idle timeout during paginator prompt" bug by reintroducting the
2302    concept of a "half keepalive" and sending them during paginator prompts.
2303
2304  Revision 591.30  2002/05/23 03:33:21  ajc
2305  * Added a GTSN (GeT list of SeeN messages) command
2306
2307  Revision 591.29  2002/05/20 14:29:59  ajc
2308  * commands.c: fixed bug in the scan for idle_threshold= which didn't include
2309    the = sign and ended up always setting this value to 0
2310
2311  Revision 591.28  2002/05/17 03:57:30  ajc
2312  * When doing fixed_output() of converted HTML, output the whole block of
2313    data at once instead of one character at a time
2314
2315  Revision 591.27  2002/05/16 04:44:58  ajc
2316  * Reduce the number of socket writes when doing fixed_output() to avoid
2317    getting killed by overhead.  (Thanks to IO for the insight)
2318
2319  Revision 591.26  2002/05/14 15:25:34  error
2320  * room_ops.c: clarified aide message when room aide is removed
2321
2322  Revision 591.25  2002/05/14 15:18:43  error
2323  * rooms.c: Print name of room aide if any when doing <i>nfo
2324
2325  Revision 591.24  2002/05/14 01:33:18  error
2326  * Fixed some incredibly silly typos
2327
2328  Revision 591.23  2002/05/14 01:27:18  error
2329  * Minor cosmetic changes, extraneous double spaces etc.
2330
2331  Revision 591.22  2002/05/14 01:15:54  error
2332  * Idle threshold on the who list is now customizable in the citadel.rc
2333
2334  Revision 591.21  2002/05/14 01:09:57  error
2335  * citadel.c: spacebar won't read New if there are no new messages
2336
2337  Revision 591.20  2002/05/12 23:00:11  ajc
2338  * Removed an unused variable
2339
2340  Revision 591.19  2002/05/12 22:57:04  ajc
2341  * Removed the unfinished moderation system.
2342  * CtdlForEachMessage() - only fetch metadata when hunting for messages with
2343    a specified Content-type.  Serious performance boost.
2344
2345  Revision 591.18  2002/05/05 17:33:09  error
2346  * screen.c: fix lack of beeps in curses mode
2347
2348  Revision 591.17  2002/05/04 02:58:16  ajc
2349  * Documented a small protocol change for the STEL command
2350
2351  Revision 591.16  2002/04/30 03:13:59  ajc
2352  * When sending a page that results in the receiver's Sent/Received Pages>
2353    room to be created, don't automatically grant the sender access to that room.
2354  * Added a parameter to create_room() to implement the above
2355
2356  Revision 591.15  2002/04/23 13:38:08  ajc
2357  * Minor docs update
2358
2359  Revision 591.14  2002/04/21 21:28:06  ajc
2360  * Create the My Citadel Config> room along with the user account
2361
2362  Revision 591.13  2002/04/20 03:00:01  ajc
2363  * One more fix for the RENAME command wrt namespaces.
2364
2365  Revision 591.12  2002/04/18 18:44:36  nbryant
2366  don't use libtool -avoid-version for libcitserver - this might help for
2367  OpenBSD
2368
2369  Revision 591.11  2002/04/17 04:35:06  ajc
2370  * Finished the IMAP RENAME command.  (I ended up using nested functions
2371    because it made the task much, much easier.  We can fix it later or convert
2372    it to C++ if we find this becomes a problem.)
2373
2374  Revision 591.10  2002/04/15 13:25:47  ajc
2375  * Add error responses to imap_rename() and set up subfolder framework
2376
2377  Revision 591.9  2002/04/14 22:42:49  ajc
2378  * Began implementing RENAME command in IMAP.
2379
2380  Revision 591.8  2002/04/14 22:27:05  ajc
2381  * Added access control checking to CtdlRenameRoom()
2382
2383  Revision 591.7  2002/04/14 22:11:22  ajc
2384  * New back end function CtdlRenameRoom() which is used to rename a room and/or
2385    move it to a different floor.
2386  * cmd_setr() now uses CtdlRenameRoom() to do part of its work
2387
2388  Revision 591.6  2002/04/10 03:58:40  ajc
2389  * Began work on IMAP RENAME
2390
2391  Revision 591.5  2002/04/09 14:26:43  ajc
2392  * Allow INBOX to have subfolders.  There's no longer any reason not to.
2393
2394  Revision 591.4  2002/04/05 22:31:59  error
2395  * Send time-of-day with pages sent via IMAP
2396
2397  Revision 591.3  2002/04/05 14:34:02  ajc
2398  * Minor tweak to nested folder algorithm to handle nesting in mail root
2399
2400  Revision 591.2  2002/04/05 04:25:56  ajc
2401  * Support nested folders in IMAP.  We might want to change the delimiter.
2402
2403  Revision 591.1  2002/04/04 23:25:30  ajc
2404  * Experimental hacking to handle subfolderization in IMAP.  Seems to work ok
2405    but it makes Mozilla mail hang.  Will investigate more later...
2406
2407  Revision 591.0  2002/04/01 05:13:20  ajc
2408  * Tagged everything for 5.91 release
2409
2410  Revision 590.168  2002/04/01 05:12:57  ajc
2411  * Prep for 5.91 release
2412
2413  Revision 590.167  2002/03/29 04:43:15  ajc
2414  * Removed the BMBX command.  Mailbox security update now runs automatically when the
2415    server starts and it sees data files version <5.91.
2416
2417  Revision 590.166  2002/03/26 05:58:35  nbryant
2418  don't check for a database driver until after the openssl check is
2419  complete. if the ld paths aren't set up for the db installation this
2420  can interfere with the openssl check because it tries to run a program
2421  linked against the libraries we've been finding.
2422
2423  Revision 590.165  2002/03/26 05:20:46  nbryant
2424  removed last vestiges of "#ifdef CIT_CLIENT" conditional compilation,
2425  which has been rendered unusable by the build system simplifications
2426
2427  Revision 590.164  2002/03/26 05:13:32  nbryant
2428  fix monstrous shell script syntax in configure.ac
2429
2430  Revision 590.163  2002/03/26 04:38:31  nbryant
2431   * support autoconf 2.53
2432   * make a note that people should be using libtool 1.4d
2433   * cut some of the more pointless bells and whistles out of the configure
2434     script in an effort to make it more maintainable
2435   * modularized ipc_c_tcp.c and client_crypto.o so that they're not tied
2436     to the curses stuff.
2437   * timezone/daylight and other FreeBSD fixes
2438   * more effort in the configure script to detect the common
2439     bastardizations (ahem, ports) of Berkeley DB without falling down
2440
2441  Revision 590.162  2002/03/25 03:09:39  nbryant
2442  fix warning on platforms where pthread_t may be a pointer
2443
2444  Revision 590.161  2002/03/25 00:01:50  nbryant
2445   * compatibility with Berkeley DB < 3.3
2446   * squished symbol clashes with the OK symbol from curses in certain *n[iu]x
2447  distributions. this is kind of a pain in the ass, but I had to rename our
2448  OK to CIT_OK :-(
2449
2450  Revision 590.160  2002/03/22 04:35:38  ajc
2451  * Handle vCard registration updates for users other than the one currently
2452    logged in.  (Allows administrative editing of contact information.)
2453
2454  Revision 590.159  2002/03/20 19:03:27  ajc
2455  * Don't re-declare timezone variables ('cuz FreeBSD chokes on that)
2456
2457  Revision 590.158  2002/03/19 04:34:42  ajc
2458  * mime_parser.c: minor changes for easier porting between Citadel and WebCit
2459
2460  Revision 590.157  2002/03/19 04:19:33  ajc
2461  * Saw what IO did with strchr() and did the same in a few more places
2462
2463  Revision 590.156  2002/03/17 00:08:02  error
2464  * mime_parser.c: more robust parsing of Content-Type header
2465
2466  Revision 590.155  2002/03/16 05:22:59  ajc
2467  * Post an error message to Aide> when unlink() is unable to delete old
2468    database log files.
2469
2470  Revision 590.154  2002/03/14 04:35:26  nbryant
2471  avoid symbol clash with curses' "timeout" function (which may be a macro
2472  in some versions)
2473
2474  Revision 590.153  2002/03/14 04:24:20  nbryant
2475  support window resizing in curses mode
2476
2477  Revision 590.152  2002/03/13 04:11:11  nbryant
2478  fix up minor gotcha introduced by fgets change
2479
2480  Revision 590.151  2002/03/13 03:58:29  ajc
2481  * Site-configurable option "Allow system Aides to gain access to mailboxes"
2482
2483  Revision 590.150  2002/03/13 03:34:38  nbryant
2484  /* when running in curses mode, the scroll bar in most
2485     xterm-style programs becomes useless, so it makes sense to
2486     pause after a screenful of pages if the user has been idle
2487     for a while. However, this is annoying to some of the users
2488     who aren't in curses mode and tend to leave their clients
2489     idle. keepalives become disabled, resulting in getting booted
2490     when coming back to the idle session. but they probably have
2491     a working scrollback in their terminal, so disable it in this
2492     case:
2493   */
2494  if (!is_curses_enabled())
2495         lines_printed = 0;
2496
2497  Revision 590.149  2002/03/12 23:34:37  nbryant
2498  use ncurses in preference to curses if it's installed; it handles
2499  background colors properly on dtterm, has a larger color pair palette,
2500  and has a bigger terminal database than solaris curses
2501
2502  Revision 590.148  2002/03/12 22:47:17  nbryant
2503  curses fix: map our normal color pairs into the 0-7 range instead of 1-8,
2504  in order to make our pairs fit on terminals such as dtterm where COLOR_PAIRS=8.
2505  map the white/blue color pair onto 8 instead of 9, but only if that slot
2506  is available; fall back on white/black otherwise.
2507
2508  it seems there may be an off-by-one error in the color pair manpages for
2509  the various curses packages (?) if not, our 0 entry is unusable, but that's
2510  the DIM_BLACK color and we don't use it anyway.
2511
2512  Revision 590.147  2002/03/12 22:17:20  ajc
2513  * Give mailbox owners access to "who knows room" command
2514
2515  Revision 590.146  2002/03/12 21:08:03  nbryant
2516  support color under Solaris curses
2517
2518  Revision 590.145  2002/03/12 19:59:40  ajc
2519  * Access control change: do not treat mailboxes as guessname rooms for Aides.
2520    Open up INVT/KICK commands to non-Aides for their mailboxes.
2521
2522  Revision 590.144  2002/03/12 04:30:52  nbryant
2523  if a filesystem node exists at /var/run/egd-pool, try to connect to it as
2524  the EGD (Entropy Gathering Daemon) or PRNGD (pseudorandom number
2525  generator daemon) socket and seed OpenSSL's RNG.
2526
2527  this is necessary on solaris and other systems which lack /dev/urandom.
2528
2529  Revision 590.143  2002/03/12 03:43:26  nbryant
2530  squished the last remaining calls to sprintf
2531
2532  Revision 590.142  2002/03/12 03:36:55  nbryant
2533  replace calls to gets with fgets
2534
2535  Revision 590.141  2002/03/12 03:19:09  nbryant
2536  more sprintf bashing. now the only ones left are in mime_parser
2537
2538  Revision 590.140  2002/03/12 01:33:42  nbryant
2539   - pass -Wcast-qual to gcc
2540   - more sprintf bashing
2541
2542  Revision 590.139  2002/03/12 00:03:43  nbryant
2543  more sprintf removals
2544
2545  Revision 590.138  2002/03/11 06:00:21  nbryant
2546  use <db.h> before <db3/db.h> or <db4/db.h>
2547  this is the only way i can think of to make it work everywhere; people on
2548  systems like FreeBSD where the ports work the other way around will have to
2549  specify an extra -I flag in their CPPFLAGS variable.
2550
2551  Revision 590.137  2002/03/11 05:42:46  nbryant
2552  removed all references to sprintf from several files (not all files yet)
2553  and replace with snprintf
2554
2555  Revision 590.136  2002/03/11 04:16:20  nbryant
2556  warning fixes on sparc-sun-solaris2.8 with gcc 3.0.4, mostly for *printf
2557  format strings
2558
2559  Revision 590.135  2002/03/11 03:55:24  nbryant
2560   - fixes for building without OpenSSL
2561   - setenv doesn't exist on all systems, use putenv instead
2562   - support Solaris' curses implementation
2563
2564  Revision 590.134  2002/03/09 22:52:04  ajc
2565  * Applied a patch submitted by <xperc@hotmail.com> to fix a potential buffer
2566    overflow problem in lprintf().  I also did the same fix to cprintf().
2567
2568  Revision 590.133  2002/03/09 16:47:57  ajc
2569  * Added BMBX to fix a problem
2570
2571  Revision 590.132  2002/03/09 06:18:37  ajc
2572  * one more tweak
2573
2574  Revision 590.131  2002/03/09 05:22:29  ajc
2575  * this should do it.
2576
2577  Revision 590.130  2002/03/09 05:02:20  ajc
2578  * Attempts to fix the access control crap
2579
2580  Revision 590.129  2002/03/08 05:42:02  ajc
2581  * Patch to allow invitations and admin access to mailbox rooms.  NEEDS TESTING!
2582
2583  Revision 590.128  2002/03/07 04:30:37  ajc
2584  * Force recipient only in Mail>, not in all mailbox rooms
2585
2586  Revision 590.127  2002/03/05 22:45:40  error
2587  * Autoconf fixes for DB4 support
2588
2589  Revision 590.126  2002/03/05 04:47:49  ajc
2590  * vcard.c: another API update
2591
2592  Revision 590.125  2002/03/04 05:29:39  ajc
2593  * Made a small API change to vcard.c for WebCit, brought the change over here too
2594    in order to keep vcard.c identical everywhere.
2595
2596  Revision 590.124  2002/03/03 06:48:25  ajc
2597  * Client and server options to disable self-service user account creation
2598
2599  Revision 590.123  2002/03/03 06:31:58  ajc
2600  * Added password starred-out entry to newprompt() and strprompt()
2601  * Applied the above setting to password set/change in <.A>ide <U>seredit
2602
2603  Revision 590.122  2002/03/03 06:18:45  ajc
2604  * Implemented the CREU server command to administratively create user accounts
2605  * Added the ability to create new user accounts to <.A>ide <U>seredit
2606
2607  Revision 590.121  2002/03/03 06:05:16  ajc
2608  * Split up some of the code in order to prepare for user accounts to be
2609    administratively created without logging in to them.
2610
2611  Revision 590.120  2002/03/02 05:56:48  ajc
2612  * Properly implemented the network filter list.  Finished the server module and
2613    did a client-side <.A>ide <S>ysconfig <F>ilterlist command.
2614
2615  Revision 590.119  2002/03/01 04:24:20  ajc
2616  * Cosmetic change to Received: line
2617
2618  Revision 590.118  2002/03/01 04:16:22  ajc
2619  * CtdlReadMessageBody() -- fixed bug that caused the prepend buffer to be
2620    discarded instead of prepended.  "Received:" lines now work.
2621
2622  Revision 590.117  2002/02/23 19:20:51  ajc
2623  * Do the use table purge in two phases to avoid crashy crashy
2624
2625  Revision 590.116  2002/02/20 22:42:19  ajc
2626  * Started adding better management of source IP addressses in SMTP service
2627
2628  Revision 590.115  2002/02/15 04:28:57  ajc
2629  * Wrote the expire/purge routine for the new use table
2630
2631  Revision 590.114  2002/02/15 04:05:08  ajc
2632  * Began implementation of a networker use table that doesn't chew up oodles
2633    of CPU time.  (It uses a cdb instead.)
2634
2635  Revision 590.113  2002/02/15 03:40:06  ajc
2636  * Stu's changes (which he checked in without making any ChangeLog comments,
2637    bad Stu!) didn't build properly without curses.  Added #ifdef's.
2638
2639  Revision 590.112  2002/02/13 22:15:10  ajc
2640  * That was stupid.
2641
2642  Revision 590.111  2002/02/13 22:04:11  ajc
2643  * added vcard_to_html() function
2644
2645  Revision 590.110  2002/02/13 15:48:55  ajc
2646  * Allow the READ command to return packets bigger than 1 byte.  (ooops!)
2647
2648  Revision 590.109  2002/02/12 20:15:25  ajc
2649  * Threw in a few more #ifdef's so the client build doesn't barf on
2650    non-curses systems
2651  * Added rc_prompt_control (<N>ext/<S>top active at paginator: on/off/user)
2652
2653  Revision 590.108  2002/02/11 15:52:10  ajc
2654  * Don't crash when deleting "purge this vCard" messages
2655
2656  Revision 590.107  2002/02/10 22:36:41  nbryant
2657   - replace cdb_trunc with a complete version of the code i had been
2658     working on; fallback code for db < 3.3.x needed
2659   - change 'can't connect to host.port' to 'can't connect to host:port'
2660
2661  Revision 590.106  2002/02/08 22:39:08  ajc
2662  * If there's already a Subject line in memory, display it below the usual
2663    headers when the user hits <E>
2664
2665  Revision 590.105  2002/02/08 22:36:23  ajc
2666  * Changed the logic for printing RFC822 addresses (again)
2667  * Implemented cdb_trunc() in database_sleepycat.c, using db_truncate()
2668    (We need to either provide an alternative implementation or require DB >=3.3)
2669  * Automatically Re: subject line in the client where appropriate
2670
2671  Revision 590.104  2002/02/08 19:02:25  ajc
2672  * Added client and server side support for entering Subject lines in
2673    messages when not using RFC822.
2674
2675  Revision 590.103  2002/02/08 18:10:07  ajc
2676  * When outputting a message in non-RFC822 format, don't display an Internet
2677    address if the user is local.
2678
2679  Revision 590.102  2002/02/07 04:42:49  ajc
2680  * Silently refuse to add directory entries for Internet addresses already
2681    belonging to other users.
2682  * cdb_trunc() for CtdlDirectoryInit: implemented for GDBM, stubbed for DB
2683
2684  Revision 590.101  2002/02/05 05:05:53  ajc
2685  * Don't crash when posting if the user doesn't have an Internet directory address
2686
2687  Revision 590.100  2002/02/03 15:29:03  error
2688  * fixed a silly oversight in serv_crypto.c when removing the ETLS command
2689
2690  Revision 590.99  2002/02/03 15:21:48  error
2691  * Remove the ETLS command, it is no longer needed
2692
2693  Revision 590.98  2002/02/02 21:44:04  ajc
2694  * If a user has at least one valid Internet directory address, stamp it onto
2695    any outgoing messages.
2696
2697  Revision 590.97  2002/02/01 05:11:26  ajc
2698  * Added a QDIR protocol command to do quick-and-dirty queries of the directory
2699  * In the client, check the directory for conflicts when selecting email addr.
2700
2701  Revision 590.96  2002/01/31 05:13:44  ajc
2702  * When deleting a vCard from the Global Address Book room, remove the
2703    corresponding address in the directory.  (Not tested.)
2704
2705  Revision 590.95  2002/01/30 19:03:41  ajc
2706  * Added a new DeleteFunctionHook type of thing.  These get called when a
2707    message is being deleted from a room.
2708  * When deleting messages from a room, do the AdjRefCount() calls (and now,
2709    the PerformDeleteHooks() calls) in a second pass.  This keeps that stuff
2710    outside of the S_QUICKROOM critical section.
2711
2712  Revision 590.94  2002/01/27 06:39:45  error
2713  * file_ops.c: fixed bug in cmd_read() which could cause server to report
2714    the wrong number of bytes for the client to download
2715
2716  Revision 590.93  2002/01/26 21:33:38  ajc
2717  * More internet addressing and global directory stuff.  I think it's all working now
2718    except for the purging of old entries.
2719
2720  Revision 590.92  2002/01/26 11:02:37  error
2721  * citadel.spec cleaned up
2722
2723  Revision 590.91  2002/01/26 09:23:40  error
2724  * setup now has a silent running mode (-q option) where it silently sets
2725    defaults for everything.  This is intended for use in scripts such as
2726    the RPM packages, eliminating a step from the installation process.
2727
2728  Revision 590.90  2002/01/26 09:19:16  error
2729  * citadel.spec has been completely overhauled, we can make RPMs now!
2730
2731  Revision 590.89  2002/01/26 04:59:57  ajc
2732  * smtp FROM command now validates sender using the validate_recipients() loop
2733    (yeah, it's good for that too) making it directory-aware
2734
2735  Revision 590.88  2002/01/26 04:01:10  error
2736  * Formatter now uses more of the available screen width
2737
2738  Revision 590.87  2002/01/26 03:57:30  error
2739  * Revised status_line() display, it's much more compact now
2740
2741  Revision 590.86  2002/01/26 03:50:26  error
2742  * Better error reporting in connection_died(), kills curses before printing
2743    error message, prints last errno.
2744
2745  Revision 590.85  2002/01/25 05:19:03  ajc
2746  * Greatly simplified the logic for validating recipient addresses for incoming
2747    SMTP.  This logic destroys the whitespace mangling for local names; I will
2748    fix this tomorrow.
2749
2750  Revision 590.84  2002/01/25 04:36:35  ajc
2751  * fixz to allow incoming vCards in the address book to actually get processed
2752
2753  Revision 590.83  2002/01/24 06:52:54  error
2754  * citadel_decls.h: fix unresolved extern errors
2755
2756  Revision 590.82  2002/01/23 05:04:05  ajc
2757  * Add vCards from incoming network messages in the GAB to the directory.
2758
2759  Revision 590.81  2002/01/23 03:39:32  ajc
2760  * Added a new hook type for handling incoming network messages
2761  * Wrote a skeleton module for net filtering
2762
2763  Revision 590.80  2002/01/22 10:46:25  error
2764  * read_message() and fmout() now accept a FILE to which to send their
2765    output; this fixes quoting in the fullscreen client
2766
2767  Revision 590.79  2002/01/20 08:03:43  error
2768  * curses client: use the status line as "input" line in chat mode
2769
2770  Revision 590.78  2002/01/20 07:43:07  error
2771  * serv_chat.c: Server no longer crashes when CHATLOG can't be opened
2772
2773  Revision 590.77  2002/01/20 05:22:07  error
2774  * curses client:  allow goodbye message to be seen on some terminals
2775
2776  Revision 590.76  2002/01/19 16:56:31  error
2777  * Fixed color support, now works when rc_ansi_color is on or auto
2778
2779  Revision 590.75  2002/01/19 15:10:25  error
2780  * Cosmetics for the client status line
2781
2782  Revision 590.74  2002/01/19 11:59:33  error
2783  * A real status line for the text client
2784
2785  Revision 590.73  2002/01/19 10:08:43  error
2786  * fix link for libcitserver.so to tools.o which I broke (oops!)
2787
2788  Revision 590.72  2002/01/19 09:59:08  error
2789  * Full-screen curses support for Citadel text client
2790
2791  Revision 590.71  2002/01/17 20:11:05  nbryant
2792  remove lock.c/lock.h; don't need them for what i was planning after all
2793
2794  Revision 590.70  2002/01/17 10:48:36  error
2795  * cosmetic fixes in the new trace file functionality
2796
2797  Revision 590.69  2002/01/17 10:32:14  error
2798  * lprintf() now logs the session ID for each log entry within a session.
2799    Also SMTP, IMAP, POP3 and Citadel protocol commands are differentiated.
2800
2801  Revision 590.68  2002/01/17 10:16:09  error
2802  * migratenet.c: cygwin fix: include limits.h
2803
2804  Revision 590.67  2002/01/17 10:13:31  error
2805  * serv_ical.c: set expire policy for My Calendar> to manual
2806
2807  Revision 590.66  2002/01/17 07:18:11  ajc
2808  * Changed all "free software" references to "open source" in order
2809    to piss off Richard Stallman
2810
2811  Revision 590.65  2002/01/17 00:22:35  nbryant
2812  added lock.[ch]: recursive read/write locking support. (not actually used yet)
2813
2814  Revision 590.64  2002/01/15 12:41:53  error
2815  * Implement alternate_semantics (see comments in citadel.rc file)
2816
2817  Revision 590.63  2002/01/15 11:07:51  ajc
2818  * vcard.c: updated vCard "object methods" to handle multiple instances of
2819    the same key name when necessary.
2820
2821  Revision 590.62  2002/01/15 06:38:39  error
2822  * Update citadelapi.txt with CtdlUnregister* calls, LogHook calls
2823
2824  Revision 590.61  2002/01/15 06:20:18  error
2825  * Modules can now unregister any of their hooks (though none yet take
2826    advantage of this).
2827
2828  Revision 590.60  2002/01/14 08:49:13  error
2829  * Fixed bug in cmd_cre8() causing protocol to get out of sync when creating
2830    a new room
2831
2832  Revision 590.59  2002/01/13 04:46:31  ajc
2833  * Allow incoming SMTP to relay to other Citadel nodes for whom we are
2834    providing directory service.
2835
2836  Revision 590.58  2002/01/13 04:06:33  ajc
2837  * Repaired the problems I created when moving the_mime_parser()'s variables
2838    from the stack to the heap.  (Hint: sizeof(char *) is 4, not 4096)
2839
2840  Revision 590.57  2002/01/11 15:46:57  error
2841  * Allow users to move/copy messages between personal rooms
2842
2843  Revision 590.56  2002/01/11 04:59:00  ajc
2844  * Finished most of the work for the Global Address Book.
2845
2846  Revision 590.55  2002/01/11 04:37:03  ajc
2847  * More code for the Global Address Book
2848
2849  Revision 590.54  2002/01/11 02:57:35  error
2850  * Don't print **** when sending a page or mail from an anonymous-only room
2851
2852  Revision 590.53  2002/01/10 21:22:37  ajc
2853  * Minor changes for global directory service
2854
2855  Revision 590.52  2002/01/10 04:29:28  ajc
2856  * Minor updates for directory service
2857
2858  Revision 590.51  2002/01/09 23:12:40  ajc
2859  * Allow users to zap mailbox rooms
2860
2861  Revision 590.50  2002/01/09 04:37:32  ajc
2862  * Finished the callback stuff for vCard address extraction
2863
2864  Revision 590.49  2002/01/09 04:05:53  ajc
2865  * Began writing code to harvest Internet e-mail addresses from vCards, and
2866    hacked together a temporary version (and writeup) of the IGAB command.
2867
2868  Revision 590.48  2002/01/08 16:34:22  ajc
2869  * serv_vcard.c: cosmetic cleanup
2870
2871  Revision 590.47  2002/01/06 22:44:21  error
2872  * Enable/disable encryption in client from command line and/or citadel.rc
2873
2874  Revision 590.46  2002/01/06 21:25:26  ajc
2875  * sysdep.c: in client_write(), handle redirect_fp and redirect_sock *before*
2876    handling redirect_ssl, because these need to be done the same way regardless
2877    of client session crypto
2878  * serv_crypto.c: pasted a bunch of Nathan's #ifdef blocks from sysdep.c in
2879    order to gain greater portability (or even to get it to compile on splorph)
2880
2881  Revision 590.45  2002/01/06 11:13:33  error
2882  * Enable SSL/TLS support in the client (again)
2883
2884  Revision 590.44  2002/01/06 11:11:31  error
2885  * Enable SSL/TLS in the client
2886
2887  Revision 590.43  2002/01/06 10:49:55  error
2888  * Add some #includes I apparently somehow missed
2889
2890  Revision 590.42  2002/01/06 10:33:10  error
2891  * SSL/TLS support for the Citadel wire protocol
2892
2893  Revision 590.41  2002/01/06 08:54:58  error
2894  * user_ops.c: fixed become_session() when calling EVT_LOGOUT session hooks
2895
2896  Revision 590.40  2002/01/05 22:31:22  ajc
2897  * Removed some protocol commands and writeups that are no longer necessary
2898  * Began some of the framework for the Global Address Book
2899
2900  Revision 590.39  2002/01/05 12:44:43  error
2901  * serv_chat.c: allow a session to be killed while in chat
2902
2903  Revision 590.38  2002/01/05 12:31:04  error
2904  * user_ops.c: become_session() when calling EVT_LOGOUT session hooks
2905
2906  Revision 590.37  2002/01/05 04:51:36  error
2907  * stats now sorts its top 20 lists properly
2908
2909  Revision 590.36  2002/01/04 20:57:36  nbryant
2910  cygwin fix
2911
2912  Revision 590.35  2002/01/04 20:46:26  nbryant
2913  Makefile fix for cygwin (fix migratenet linkage)
2914
2915  Revision 590.34  2002/01/04 20:43:26  nbryant
2916  configure/genstamp: check for struct tm.tm_gmtoff
2917
2918  Revision 590.33  2002/01/03 22:01:17  ajc
2919  * Fixed mail to "sysop"
2920
2921  Revision 590.32  2002/01/03 21:35:07  ajc
2922  * I think this is the last of the fixes for the new submit queue.
2923
2924  Revision 590.31  2002/01/03 12:27:35  error
2925  * Fixed my name in docs/copyright.txt, why didn't I notice that before?
2926
2927  Revision 590.30  2002/01/03 12:21:02  error
2928  * Autoconf support for recognizing OpenSSL
2929
2930  Revision 590.29  2002/01/03 04:52:28  ajc
2931  * serv_network.c: migrated deliveries and bounces to the new message
2932    submission subsystem.  NOT TESTED.
2933
2934  Revision 590.28  2002/01/01 21:32:10  ajc
2935  * Finished the updates to serv_smtp.c, although I think there may be a
2936    problem with one-too-many reference counts when a message is submitted
2937    via SMTP.
2938
2939  Revision 590.27  2001/12/31 20:15:13  ajc
2940  * Almost finished converting serv_smtp.c to the new message submission
2941    framework.  Still not done yet; don't use this.
2942
2943  Revision 590.26  2001/12/30 06:20:46  error
2944  * More keys while reading messages:  Q or S same as Ctrl-C, N same as Ctrl-O.
2945
2946  Revision 590.25  2001/12/30 05:50:46  error
2947  * Security:  Citadel now drops privileges when called from telnetd, also
2948    checks to make sure you didn't set the setuid/setgid bits.  No more
2949    loginwrapper.sh!
2950
2951  Revision 590.24  2001/12/29 05:19:32  ajc
2952  * Minor cosmetic hack
2953
2954  Revision 590.23  2001/12/29 04:21:22  nixo
2955  stupid me. I didn't realize that asking for the header did what I wanted
2956  so I changed my little 'y' hack to not bother reading the text of the
2957  message. a little saving on the bandwidth.
2958
2959  Revision 590.22  2001/12/28 22:32:38  nixo
2960  Added a "read m<y> next" function in read mode. It will skip to the next
2961  message by the user in the current message list (whatever mode you're in
2962  be it read forward, last 50, whatever.)
2963
2964  Revision 590.21  2001/12/28 11:06:53  error
2965  * More server support for hostnames up to 63 characters (oops I missed a spot)
2966
2967  Revision 590.20  2001/12/28 09:39:10  error
2968  * Client support for hostnames up to 63 characters: truncated at 24 in
2969    short who list, full display in long who list.
2970
2971  Revision 590.19  2001/12/28 09:28:04  error
2972  * Server support for hostnames up to 63 characters
2973
2974  Revision 590.18  2001/12/26 05:01:30  ajc
2975  * Added a new developer ID for Anticlimactic Teleservices
2976
2977  Revision 590.17  2001/12/23 10:00:43  error
2978  * Pages are once again formatted to the caller's screen width.
2979
2980  Revision 590.16  2001/12/23 09:57:47  error
2981  * tools.c: added parameter to fmt_date() to allow for printing the seconds
2982    along with the time, e.g. 12:34 pm or 12:34:56 pm
2983
2984  Revision 590.15  2001/12/20 04:54:26  ajc
2985  * If you paid for this software, someone is ripping you off.
2986
2987  Revision 590.14  2001/12/18 08:24:56  nbryant
2988  more lovely configure tweaks (include paths for db)
2989
2990  Revision 590.13  2001/12/18 06:04:08  ajc
2991  * Moved the buffers in the_mime_parser() from the stack to the heap, because
2992    it was crashing boxen with small stack sizes.
2993
2994  Revision 590.12  2001/12/18 05:54:16  ajc
2995  * Added more load_floorlist() commands to the beginning and end of functions
2996    in the client that manipulate the floor list.  This fixes a bug in which
2997    new floors don't show up right away after being created.
2998
2999  Revision 590.11  2001/12/17 08:14:26  nbryant
3000  restored the checks for /usr/include/db3 and /usr/local/include/db3
3001  in configure.  there are too many variations on db installation; this is
3002  getting messy :-(
3003
3004  Revision 590.10  2001/12/17 08:00:45  nbryant
3005  set the pthreads stack size to 128K because FreeBSD's default of 64K
3006  seems too small. fixes crashes under FreeBSD.
3007
3008  Revision 590.9  2001/12/16 00:50:14  error
3009  * Added usersupp.lastcall to the parameters returned from the PASS/PAS2
3010    commands in logged_in_response().
3011
3012  Revision 590.8  2001/12/14 21:33:18  nbryant
3013  finally changed configure to complain if there's no database driver ;)
3014
3015  Revision 590.7  2001/12/14 08:29:30  error
3016  * Security: trace file is now only readable by owner, since it contains
3017    plain text passwords.
3018
3019  Revision 590.6  2001/12/14 07:04:24  ajc
3020  * Now you can send mail to yourself.  Hi from Stu.
3021
3022  Revision 590.5  2001/12/14 06:58:12  ajc
3023  * Hi from Stu
3024
3025  Revision 590.4  2001/12/13 22:36:30  nbryant
3026  make configure search for /usr/local/BerkeleyDB.4.0
3027
3028  Revision 590.3  2001/12/13 22:29:57  nbryant
3029  make it compile with Berkeley DB 4.0.x
3030
3031  Revision 590.2  2001/12/11 21:31:07  nbryant
3032   - test for -ldb3 before -ldb
3033
3034  Revision 590.1  2001/12/11 20:04:41  nbryant
3035   - fix library flags, includes for portability
3036   - malloc.h is deprecated
3037   - fix genstamp, hopefully
3038   - fix size_t *printf handling for portability
3039
3040  Revision 590.0  2001/12/08 03:31:41  ajc
3041  * THIS IS 5.90
3042
3043  Revision 580.95  2001/12/08 03:30:37  ajc
3044  * Final changes to networking docs for 5.90
3045
3046  Revision 580.94  2001/12/06 05:13:34  ajc
3047  * Added the documentation for room sharing and listserv
3048
3049  Revision 580.93  2001/12/04 05:24:15  ajc
3050  * Added two more bytes to the possible length of shared secrets in networking
3051    due to some legacy support requirements.
3052
3053  Revision 580.92  2001/12/04 05:16:19  ajc
3054  * mime_parser.c: change to memory allocation algorithm ... some badly done
3055    messages were crashing the server
3056
3057  Revision 580.91  2001/12/03 22:48:16  ajc
3058  * ooops.  Look for the QR2_SYSTEM flag in QRflags2, not QRflags.
3059
3060  Revision 580.90  2001/12/03 17:02:50  ajc
3061  * dynloader.c: fixed improperly done declaration and mallok()
3062
3063  Revision 580.89  2001/12/03 04:28:02  ajc
3064  * mime_parser.c: now uses built-in functions to decode base64 and
3065    quoted-printable attachments, instead of piping data to outboard programs.
3066
3067  Revision 580.88  2001/12/03 02:45:46  ajc
3068  * Began implementing some code to handle multiple recipients (but #define'd
3069    it all out because we're approaching a release)
3070
3071  Revision 580.87  2001/12/03 01:50:17  ajc
3072  * When sending mail, copy to the sender's "Sent Items>" room instead of to
3073    the sender's "Mail>" room.
3074
3075  Revision 580.86  2001/12/02 23:36:24  ajc
3076  * On a new system, set the default new user level to 4 instead of 1.
3077
3078  Revision 580.85  2001/12/02 23:27:01  ajc
3079  * Removed references to the old networker from the documentation.  Did not
3080    write any new documentation, so what's there now is kind of sparse.
3081
3082  Revision 580.84  2001/12/02 02:42:55  ajc
3083  * Implemented new room flag QR2_SYSTEM which supresses the room from all
3084    room listings, even for Aides (but it's still gotoable).  This will be used
3085    for rooms which hold system configuration and message queues.
3086
3087  Revision 580.83  2001/12/01 19:23:26  ajc
3088  * clientsocket.c: implement socket timeouts for read operations
3089
3090  Revision 580.82  2001/12/01 17:00:23  ajc
3091  * serv_smtp.c: when multiple MX's are the same preference, randomize them
3092
3093  Revision 580.81  2001/12/01 07:18:28  ajc
3094  * Fixed an SMTP delivery problem that was causing certain classes of
3095    transient errors to cause a message to never be delivered.
3096
3097  Revision 580.80  2001/12/01 05:26:01  ajc
3098  * Added a command "SMTP" to the Citadel protocol, to do some unimportant
3099    utility/diagnostic functions.
3100
3101  Revision 580.79  2001/11/27 17:08:29  ajc
3102  * When calling an external editor, set the environment variable
3103    WINDOW_TITLE to an appropriate value.
3104
3105  Revision 580.78  2001/11/26 03:27:08  ajc
3106  * new algorithm to load the use table
3107
3108  Revision 580.77  2001/11/17 19:55:08  ajc
3109  * Updated some of the documentation
3110
3111  Revision 580.76  2001/11/16 04:43:12  ajc
3112  * Eliminated the sock_puts_crlf() function and ensured that all SMTP client
3113    commands are sent out using a single sock_write() call.  There are broken
3114    SMTP server implementations that can't handle SMTP commands split across
3115    multiple writes.  (Thanks to Andru Luvisi and Ben Mehlman for the idea.)
3116
3117  Revision 580.75  2001/11/15 04:11:30  ajc
3118  * hack.doc: updated to reflect Cit86Net compatibility fields removed from the
3119    file format (since we dumbed down the gateway software)
3120  * ipc_c_tcp.c: removed SOCKS4 support.  Nobody uses it anymore.
3121  * ipc_c_tcp.c: fixed a bug which caused the client to fall back to defaultPort
3122    if a numeric port number was specified instead of a service name
3123
3124  Revision 580.74  2001/11/14 02:59:01  ajc
3125  * Network run frequency is now a site-definable setting
3126
3127  Revision 580.73  2001/11/13 22:05:23  ajc
3128  * Re-introduced the ability to enter IGnet mail into the system.
3129
3130  Revision 580.72  2001/10/29 22:59:22  ajc
3131  * Renamed "SuppMsgInfo" to "MetaData" because that's what it is
3132
3133  Revision 580.71  2001/10/29 16:39:54  ajc
3134  * Finished the migratenet utility (finally).
3135
3136  Revision 580.70  2001/10/28 05:18:51  ajc
3137  * migratenet almost finished
3138
3139  Revision 580.69  2001/10/26 04:26:45  ajc
3140  * more work on the net migrator
3141
3142  Revision 580.68  2001/10/23 03:37:33  ajc
3143  * Threw a few more lines of code into migratenet.c
3144
3145  Revision 580.67  2001/10/20 18:10:50  ajc
3146  * migratenet.c: added (not even close to being finished)
3147
3148  Revision 580.66  2001/10/17 21:07:20  nbryant
3149  further format string cleanups (for i686-linux type sizes)
3150
3151  Revision 580.65  2001/10/17 20:41:07  nbryant
3152   - declare *printf format specifiers if gcc detected
3153   - format string fixes (compiles w/o warnings on alpha osf/1)
3154
3155  Revision 580.64  2001/10/17 19:40:38  nbryant
3156  warning fixes and cleanups for 64-bit machines
3157
3158  Revision 580.63  2001/10/16 20:47:37  nbryant
3159  - backed out -export-dynamic, it doesn't do anything and i've found the real
3160  problem
3161  - remove declaration for make_message
3162
3163  Revision 580.62  2001/10/16 19:18:49  nbryant
3164  backed out that compiler detection change for Tru64. it's not incredibly
3165  important and results in broken autoconf macro expansions.
3166
3167  Revision 580.61  2001/10/16 18:36:33  nbryant
3168  reinstate -export-dynamic for citserver in case libtool decides to build
3169  static libraries (why?)
3170
3171  Revision 580.60  2001/10/16 18:21:53  nbryant
3172  add some explanatory text to bootstrap
3173
3174  Revision 580.59  2001/10/16 17:43:53  nbryant
3175   - further configure tweaks for FreeBSD and Tru64 Unix
3176   - updated to latest libtool configure fragment
3177   - there are two functions named make_message. (?) so declare them both
3178     static.
3179
3180  Revision 580.58  2001/10/16 01:48:55  nbryant
3181  - configury tweaks for a /usr/include/db3 goof and Digital/Tru64 Unix
3182  - #ifdef out inline on non-GCC compilers
3183
3184  Revision 580.57  2001/10/15 19:50:50  ajc
3185  * Fixed a bug in the loopzapper that was corrupting the use table saved copy.
3186  * Post notification in Aide> when the loopzapper catches a message.
3187
3188  Revision 580.56  2001/10/12 22:41:11  ajc
3189  * Wrote the rest of the use table code.  Finished except for a bug.
3190
3191  Revision 580.55  2001/10/10 18:35:12  ajc
3192  * Comments & cosmetics for previous update
3193
3194  Revision 580.54  2001/10/10 17:12:54  ajc
3195  * Bugfix for MSG0 command to properly handle multipart/alternative
3196
3197  Revision 580.53  2001/10/06 21:32:29  ajc
3198  * Finished the concurrency check for network polling.  (Now works both for
3199    polling and being polled.  Severe UUCP deja vu.)
3200
3201  Revision 580.52  2001/10/06 20:28:06  ajc
3202  * Began implementing some concurrency stuff for the networker
3203
3204  Revision 580.51  2001/10/06 19:51:47  ajc
3205  * Stripped the build of obsolete parts of the old networker no longer in use.
3206
3207  Revision 580.50  2001/10/03 20:05:50  ajc
3208  * serv_smtp.c: implement RFC2920 ESMTP "pipelining" extension on the server
3209    side.  (No changes required other than advertising the extension.)
3210
3211  Revision 580.49  2001/10/03 03:15:16  ajc
3212  * Implemented BOUNCE BOUNCE BOUNCE
3213
3214  Revision 580.48  2001/10/02 03:04:30  ajc
3215  * Allow non-Aides to terminate sessions belonging to them
3216
3217  Revision 580.47  2001/09/24 18:55:13  ajc
3218  * Completed migrating the "netpoll" utility into the serv_network module.
3219    Removed this utility.
3220
3221  Revision 580.46  2001/09/21 20:58:25  nbryant
3222  support different log_archive prototype in DB versions prior to 3.3
3223
3224  Revision 580.45  2001/09/20 04:17:10  ajc
3225  * Inbound network authentication working.  Fixed a bug in the split-horizon
3226    algorithm.  Still need to move the 'netpoll' command into the server.
3227
3228  Revision 580.44  2001/09/18 04:05:04  ajc
3229  * Added host/IP and port to node config (client side only)
3230
3231  Revision 580.43  2001/09/17 23:55:45  ajc
3232  * Support for IGnet routing (not tested)
3233
3234  Revision 580.42  2001/09/16 05:44:51  ajc
3235  * serv_smtp.c: instead of doubling delivery retry times unbounded, set a
3236    maximum retry time of SMTP_RETRY_MAX (currently set to 12 hours)
3237
3238  Revision 580.41  2001/09/09 16:19:29  error
3239  * Updated PAM configuration file citadel.pam for Red Hat 7.x.
3240
3241  Revision 580.40  2001/09/09 03:19:38  ajc
3242  * cdb_cull_logs() now removes log files as soon as the log_archive() function
3243    says it's ok to do so.
3244
3245  Revision 580.39  2001/09/08 18:58:38  ajc
3246  * More changes to the new networker.  Added client command for room sharing.
3247
3248  Revision 580.38  2001/09/07 04:05:27  ajc
3249  * You guessed it: still more code for the new networker.
3250
3251  Revision 580.37  2001/09/06 05:47:29  nbryant
3252  check for /usr/include/db3 (for RedHat 6.2; others?)
3253
3254  Revision 580.36  2001/09/06 05:23:14  nbryant
3255  #include fix for glibc 2.1.3
3256
3257  Revision 580.35  2001/09/06 04:02:34  ajc
3258  * A few more updates to the networker
3259
3260  Revision 580.34  2001/09/06 03:32:41  nbryant
3261  build fix for sparc-sun-solaris2.8; i think the dependencies should be
3262  set up properly for all platforms now.
3263
3264  Revision 580.33  2001/09/06 02:55:27  nbryant
3265  build fix for Linux
3266
3267  Revision 580.32  2001/09/06 02:49:22  ajc
3268  * Fixed paste-post mode (<.E>nter <A>scii) to append instead of replace when
3269    the user hits <C>ontinue (bug reported by Stu Mark)
3270
3271  Revision 580.31  2001/09/06 01:26:39  nbryant
3272   - port to Cygwin (DLL support, etc.)
3273   - don't build SMTP module if there's no resolver library (eg on Windows)
3274
3275  Revision 580.30  2001/09/06 00:54:01  nbryant
3276  updated to libtool 1.4.1 and automake 1.5
3277
3278  Revision 580.29  2001/08/29 02:51:25  ajc
3279  * More work on the new networker.
3280
3281  Revision 580.28  2001/08/25 05:04:57  ajc
3282  * Worked a little more on the in-server replacement for netproc
3283
3284  Revision 580.27  2001/08/22 04:18:17  ajc
3285  * Realized that there was lots of similarly broken code in
3286    process_rfc822_addr().  Wrote two new utility functions in tools.c
3287    stripout() and stripallbut() and used them where appropriate.  This should
3288    take care of all possible infinite loops.
3289
3290  Revision 580.26  2001/08/22 03:43:11  ajc
3291  * internet_addressing.c: fixed a bug in process_rfc822_addr() that caused the
3292    server to jump into an endless loop when an e-mail address contained
3293    unbalanced angle brackets.
3294
3295  Revision 580.25  2001/08/15 04:26:02  ajc
3296  * Added split horizon and delete-after-spool to the new networker
3297
3298  Revision 580.24  2001/08/14 02:41:57  ajc
3299  * Began the migration of netproc into part of the serv_network.c module instead
3300    of a standalone program.
3301
3302  Revision 580.23  2001/08/11 22:35:40  nbryant
3303  updated citadel-with-berkeley-db.txt.
3304   - updated build instructions
3305   - improved backup procedures to be safer and more space-efficient.
3306
3307  Revision 580.22  2001/08/11 19:18:41  ajc
3308  * Realized that I am stupid and started implementing server commands to load
3309    and save network configurations, when I had already lovingly implemented the
3310    CONF GETSYS and CONF PUTSYS commands to store arbitrary configuration sets
3311    in the Local System Configuration> room.  Ripped the newer crap out.
3312  * Implemented a skeleton of <.A>ide <S>ysconfig <N>etwork on the client side.
3313
3314  Revision 580.21  2001/08/11 03:51:56  ajc
3315  * Removed the idle timer from the client.  Dialup is dead.
3316
3317  Revision 580.20  2001/08/06 21:33:29  nbryant
3318  made the client fall back on port 504 if there's no /etc/services entry
3319
3320  Revision 580.19  2001/08/05 23:54:14  ajc
3321  * prep for new network node infrastructure
3322
3323  Revision 580.18  2001/08/03 16:53:21  ajc
3324  * Added some more "break" statements to the main switch..case loop in
3325    citadel.c where they were needed.
3326
3327  Revision 580.17  2001/08/03 16:43:53  ajc
3328  * database_sleepycat.c: when running txn_checkpoint(), handle DB_INCOMPLETE
3329    return code as a warning instead of an error worthy of aborting the server.
3330    See http://www.sleepycat.com/docs/api_c/txn_checkpoint.html for explanation.
3331
3332  Revision 580.16  2001/07/30 03:46:14  nbryant
3333  made ForEachUser use a read-only cursor, too. there is now only one piece of
3334  code in Citadel proper (not the database driver) that needs transactions.
3335  that's check_ref_counts; in other words it's the only thing standing in the way
3336  of a clean implementation of retryable transactions.
3337
3338  Revision 580.15  2001/07/29 22:24:04  nbryant
3339   - added a new function to the database interface, cdb_close_cursor().  always
3340  call this when you're finished with a traversal but didn't bother reading all
3341  the way to the end.
3342
3343   - removed several cdb_begin_transaction()/cdb_end_transaction() calls that are
3344  no longer needed because of the read-only cursor support.
3345
3346  Revision 580.14  2001/07/29 20:56:09  nbryant
3347  change ForEachRoom to use read-only cursors by default. it can be overridden to
3348  still use read/write cursors by doing:
3349
3350   cdb_begin_transaction();
3351   ForEachRoom(...);
3352   cdb_end_transaction();
3353
3354  the only place I found where it appears necessary to do so is check_ref_counts,
3355  so this checkin affects that function too.
3356
3357  Revision 580.13  2001/07/29 20:06:33  nbryant
3358  generate symlinks to .libs in modules directory
3359
3360  Revision 580.12  2001/07/28 00:02:50  nbryant
3361  implemented read-only cursors. one of the advantages to these is that
3362  transactions can be avoided; a cursor operation that occurs within a
3363  transaction will often acquire a read lock on every single database page.  in
3364  general, the Sleepycat documentation recommends avoiding transaction-protected
3365  read-only operations where practical. read/modify/write operations can still
3366  be transaction protected, of course.
3367
3368  to use a read-only cursor, call cdb_rewind without a previous call to
3369  cdb_begin_transaction. the DB driver will notice this and prevent the current
3370  thread from modifying data or starting a transaction until the cursor is
3371  closed.
3372
3373  Revision 580.11  2001/07/27 20:45:44  nbryant
3374  libtool has matured a lot since the last time i looked at it (years ago)
3375  so we now use it to handle the details of building shared libraries and
3376  the linker flags for the main executable.
3377
3378  in theory this should bring a lot more portability to the dynloader
3379  subsystem and enable us to do things like transparently detect GNU vs Sun
3380  linkers on solaris, for example
3381
3382  Revision 580.10  2001/07/27 03:29:04  nbryant
3383  missed one thing in the autoconf move
3384
3385  Revision 580.9  2001/07/27 02:57:43  nbryant
3386  support one cursor per database rather than one global cursor
3387
3388  Revision 580.8  2001/07/27 01:32:07  nbryant
3389  remove the automatic transaction demarcation on singleton read operations
3390
3391  Revision 580.7  2001/07/26 21:43:46  nbryant
3392   - move to autoconf 2.52
3393   - random warning fix
3394   - check for db 3.3
3395
3396  Revision 580.6  2001/07/24 13:17:54  ajc
3397  * New UI for mailing list setup
3398  * rooms.c: code cleanup
3399  * docs update
3400
3401  Revision 580.5  2001/07/20 23:48:23  nbryant
3402  fix build on solaris, check default install location for db 3.2, and silence
3403  gcc 3.0
3404
3405  Revision 580.4  2001/07/16 14:24:30  ajc
3406  * Silly cosmetic change to keep the wholist ordered by ascending session number
3407
3408  Revision 580.3  2001/07/13 00:01:36  ajc
3409  * Shuffled around some of the housekeeping loop code
3410
3411  Revision 580.2  2001/07/11 17:01:10  ajc
3412  * database_sleepycat.c: small changes to log messages
3413
3414  Revision 580.1  2001/07/11 04:35:40  nbryant
3415  moved dret initialization in cdb_fetch, just in case
3416
3417  Revision 580.0  2001/07/03 03:07:06  ajc
3418  * THIS IS 5.80
3419
3420  Revision 573.143  2001/07/03 03:06:50  ajc
3421  * Last minute doco update for 5.80
3422
3423  Revision 573.142  2001/07/01 15:44:32  nbryant
3424  configure.in: check for Berkeley DB first.
3425
3426  Revision 573.141  2001/06/27 23:34:30  ajc
3427  * Added some verbage to messages/roomaccess to placate a user who keeps
3428    bitching about privacy policy.
3429
3430  Revision 573.140  2001/06/19 03:41:04  ajc
3431  * Ooops... last_cull needs to be declared static
3432
3433  Revision 573.139  2001/06/19 03:33:19  ajc
3434  * imap_fetch.c: download MIME parts without decoding first.  We like that.
3435  * database_sleepycat.c: added automatic culling of log files which have not
3436    been written to in five days.
3437
3438  Revision 573.138  2001/06/17 19:42:23  nbryant
3439  fix all the <time.h> vs. <sys/time.h> issues, hopefully
3440
3441  Revision 573.137  2001/06/07 03:28:37  ajc
3442  * More tweaks to the MIME parser
3443
3444  Revision 573.136  2001/06/06 15:44:37  ajc
3445  * msgbase.c: output extra newline at end of RFC822 message if necessary to
3446    ensure that 000 termination string appears on a line by itself.
3447
3448  Revision 573.135  2001/06/06 04:22:25  ajc
3449  * Moved memreadline() to tools.c
3450  * internet_addressing.c: fixed conversion of fields to (hopefully) never get
3451    into an active loop when encountering badly formed headers
3452
3453  Revision 573.134  2001/05/27 05:23:03  ajc
3454  * Added a "no new messages" response in the client, displayed when a read
3455    command turns up a zero message count.
3456
3457  Revision 573.133  2001/05/18 20:12:09  ajc
3458  * Fixed bug in mime_parser.c that caused parts to be dropped when the last
3459    boundary was the very last line of the message.
3460  * serv_smtp.c: toned down some of the command response verbage.
3461
3462  Revision 573.132  2001/04/28 04:42:55  ajc
3463  * Updated some of the docs.  Bumped version number to 5.80 in anticipation
3464    of going into a release cycle soon.
3465
3466  Revision 573.130  2001/04/26 03:31:00  ajc
3467  * Finished the implementation of per-message seen/unseen logic, both in the
3468    server proper and in IMAP.  Citadel protocol uses new "seen" command.
3469
3470  Revision 573.129  2001/04/21 04:55:51  ajc
3471  * Began implementation of per-message seen/unseen attribute
3472
3473  Revision 573.128  2001/04/20 03:39:54  ajc
3474  * IMAP LIST/LSUB: made it case insensitive.  Also minor IMAP code cleanup.
3475
3476  Revision 573.127  2001/04/17 00:35:19  cough
3477  * Modified rooms.c in the client so that it would allow inviting into
3478    public rooms.  This is important since there is now a V_LOCKOUT
3479    flag which prevents users who have been kicked from rejoining
3480    a room unless/until you invite them back in.
3481
3482  Revision 573.126  2001/04/16 19:21:14  cough
3483  * Fixed bug in room_ops.c that wasn't allowing aides to goto passworded
3484    rooms without knowing the password.
3485
3486  Revision 573.125  2001/04/14 04:26:44  ajc
3487  * Fixed an unterminated string bug in IMAP APPEND.  Storing messages should
3488    work now.
3489
3490  Revision 573.124  2001/04/10 01:04:10  ajc
3491  * Finished coding IMAP APPEND.  It works, but there's a bug in it somewhere
3492    that is corrupting the memory.
3493
3494  Revision 573.123  2001/04/03 00:47:23  ajc
3495  * Began implementing IMAP APPEND
3496
3497  Revision 573.122  2001/04/01 22:05:44  cough
3498  * *Actually* fixed a botched ChangeLog entry.
3499
3500  Revision 573.121  2001/04/01 22:04:28  cough
3501  * Fixed a botched ChangeLog entry.
3502
3503  Revision 573.120  2001/04/01 22:03:10  cough
3504  * Changed two fclose()s to pclose()s.
3505
3506  Revision 573.119  2001/03/25 11:52:36  error
3507  * serv_pop3.c: Fixed APOP. Now logs in properly. Also cleaned up some non-
3508    RFC-compliant error messages.
3509
3510  Revision 573.118  2001/03/21 05:47:49  ajc
3511  * Added the new IMAP mailbox string compare submitted by Daniel Malament.
3512
3513  Revision 573.117  2001/03/20 01:33:55  ajc
3514  * Added the (\NoInferiors) tag to all rooms listed in IMAP.  This made Mozilla
3515    behave very nicely.
3516
3517  Revision 573.116  2001/03/13 17:19:33  ajc
3518  * support (BODY[HEADER.FIELDS(BLAH BLAH BLAH)]) and HEADER.FIELDS.NOT
3519
3520  Revision 573.115  2001/03/12 01:27:42  ajc
3521  * Implemented SUBSCRIBE and UNSUBSCRIBE commands
3522
3523  Revision 573.114  2001/03/11 23:00:29  ajc
3524  * Mega sexy hack to deliver express messages THROUGH IMAP!  uber coolness!!
3525
3526  Revision 573.113  2001/03/11 22:09:20  ajc
3527  * Replaced the "citlogin" binary wrapper with the "loginwrapper.sh" script.
3528
3529  Revision 573.112  2001/03/11 20:06:53  ajc
3530  * Fixed bug that created incorrect roomnames when sending pages
3531
3532  Revision 573.111  2001/03/11 19:23:32  ajc
3533  * IMAP DELETE command ... also split up access control for room delete cmds
3534
3535  Revision 573.110  2001/03/10 17:29:07  ajc
3536  * Implement proper access control for deleting messages from IMAP
3537
3538  Revision 573.109  2001/03/07 04:02:27  ajc
3539  * Fixed some small IMAP bugs
3540
3541  Revision 573.108  2001/03/06 04:44:00  ajc
3542  * Probable completion of STATUS, COPY, STORE, and EXPUNGE commands in IMAP
3543
3544  Revision 573.107  2001/03/06 03:31:58  nbryant
3545  database-related cleanups and paranoia tests;
3546  fixed a transaction-leak/deadlock problem in cdb_delete;
3547  solved the SIGPIPE mystery (GDB stops on SIGPIPE is all it was)
3548
3549  Revision 573.106  2001/03/05 04:59:31  ajc
3550  * IMAP COPY
3551
3552  Revision 573.105  2001/03/04 23:49:41  ajc
3553  * IMAP EXPUNGE responses -should- be correct now
3554
3555  Revision 573.94  2001/02/20 00:02:56  ajc
3556  * IMAP: implemented the STATUS command (sort of).
3557
3558  Revision 573.93  2001/02/19 22:24:41  ajc
3559  * IMAP server: added untagged, unsolicited server messages for newly arrived
3560    messages, and messages expunged by another session.
3561
3562  Revision 573.92  2001/02/17 05:53:35  ajc
3563  * Repaired the creation of page log rooms in the wrong namespace when the
3564    recipient does not yet have his/her log room created.
3565  * Rewrite "EXPI messages" to run in two passes: one to gather messages to
3566    purge and the next to delete them.  Works better in transactionland.
3567
3568  Revision 573.91  2001/02/14 08:11:27  error
3569  * citadel.rc: added RCS ID (it's about time!)
3570
3571  Revision 573.90  2001/02/14 04:23:54  ajc
3572  * Fixed POP3 server responses ending in \n instead of \r\n as they should be.
3573    This was causing some clients (such as Pine) to lock up.
3574
3575  Revision 573.89  2001/02/13 04:06:14  ajc
3576  * Worked out the remaining bugs in IMAP FETCH for the BODYSTRUCTURE and
3577    BODY[n] data items.  I think.  So much protocol crud, so little time...
3578
3579  Revision 573.88  2001/02/13 01:18:44  ajc
3580  * imap fetch
3581
3582  Revision 573.87  2001/02/12 04:31:34  ajc
3583  * sysdep.c ig_tcp_server() - use IPPROTO_TCP instead of getprotobyname()
3584
3585  Revision 573.86  2001/02/08 04:45:58  ajc
3586  * Fixed namespace problems resulting from the automatic namespece prefixing
3587    added to create_room().  Also added the ability to specify "create a mailbox
3588    but I've already supplied the namespace prefix" for situations where the
3589    namespace isn't that of the logged in user.
3590  * Made the POP3 server response messages slightly less humorous
3591
3592  Revision 573.85  2001/02/06 04:44:12  ajc
3593  * Added a floor listing (complete with \NoSelect flag) to LIST and LSUB
3594
3595  Revision 573.84  2001/02/06 02:09:38  ajc
3596  * citadel.rc: changed the default for local_screen_dimensions to 1, since
3597    Internet users now outnumber dialup users 100 to 0.
3598  * room_ops.c: added a really_create option to create_room().  Also moved the
3599    generation of personal namespace into that function.  MODULE OWNERS PLEASE
3600    CHECK YOUR CALLS TO AVOID MULTIPLE NAMESPACING!!
3601  * room_ops.c: fixed a bug in cgetfloor() that left bad pointers around
3602  * serv_imap.c: finished the CREATE command (finally)
3603
3604  Revision 573.83  2001/02/05 05:20:22  ajc
3605  * Made some changes to functions which translate between Citadel room names
3606    and IMAP folder names.  They're still buggy.
3607
3608  Revision 573.82  2001/02/04 23:17:28  ajc
3609  * Implemented the IMAP CREATE command
3610
3611  Revision 573.81  2001/02/04 02:40:07  ajc
3612  * more imap.  imap sucks.  die crispin die.
3613
3614  Revision 573.80  2001/02/03 10:02:12  error
3615  * serv_ical.c: Verify that objects posted to My Calendar> are of type
3616    text/x-calendar or text/calendar; abort saving if not
3617
3618  Revision 573.79  2001/02/03 09:30:46  error
3619  * serv_ical.c: now creates a My Calendar> personal room, sets attributes
3620
3621  Revision 573.78  2001/02/03 08:21:00  error
3622  * serv_ical.c and serv_ical.h added; skeleton code for now
3623
3624  Revision 573.77  2001/02/02 20:18:18  ajc
3625  * Changed the error message in cdb_delete() to actually *say* cdb_delete
3626    instead of cdb_store.  Useful to know which function failed...
3627
3628  Revision 573.76  2001/02/01 04:08:03  ajc
3629  * IMAP minor change to mailbox name output
3630  * Increased size of buffer in lprintf()
3631
3632  Revision 573.75  2001/01/28 09:50:02  error
3633  * sysdep.c: lprintf() now generates timestamps
3634
3635  Revision 573.74  2001/01/28 07:35:04  error
3636   * serv_bio.c: RBIO now also returns stats about a user, see session.txt
3637
3638  Revision 573.73  2001/01/16 04:03:13  ajc
3639  * yeesh ... more on the IMAP BODYSTRUCTURE
3640
3641  Revision 573.72  2001/01/16 01:51:12  ajc
3642  * imap bodystructure
3643
3644  Revision 573.71  2001/01/16 00:46:40  ajc
3645  * Changed the MIME parser API *again* because we now need the ability to
3646    supply callback functions to be executed before and/or after parsing a
3647    multipart.  (Need this for IMAP BODYSTRUCTURE output.  Crispin sucks.)
3648
3649  Revision 573.70  2001/01/15 23:59:26  ajc
3650  * user_ops.c: reject NULL password in CtdlTryPassword() instead of crashing
3651
3652  Revision 573.68  2001/01/15 20:34:04  ajc
3653  * "Path:" removed for now because it confuses brain-dead Microsoft shitware
3654    into thinking that mail messages are newsgroup messages instead.  When we
3655    add NNTP support back into Citadel we'll have to add code to only output
3656    this field when appropriate.
3657
3658  Revision 573.67  2001/01/15 16:30:31  ajc
3659  * temporary implementation of 901 asynchronous express messages
3660
3661  Revision 573.66  2001/01/14 14:55:39  ajc
3662  * Changed the format of <.W>holist <L>ong
3663
3664  Revision 573.65  2001/01/13 06:40:26  nbryant
3665  merged remaining changes from TRANSACTIONS (using cvs update -j TRANSACTIONS)
3666  which should now be considered closed.
3667
3668  Revision 573.64  2001/01/13 06:12:15  ajc
3669  * Added the ASYN command
3670
3671  Revision 573.63  2001/01/12 22:05:46  ajc
3672  * Fixed a bug that caused bogus wholist lines to be displayed when a non-aide
3673    reads a list containing stealth mode sessions.
3674
3675  Revision 573.62  2001/01/09 05:39:45  ajc
3676  * Merged in code from the TRANSACTIONS branch for testing.
3677
3678  Revision 573.61  2000/12/30 06:17:17  ajc
3679  * Still more work on IMAP.  Damn this is tedious.
3680
3681  Revision 573.60  2000/12/30 04:55:05  ajc
3682  * more buffer size stuff
3683
3684  Revision 573.59  2000/12/27 20:19:51  ajc
3685  * The size constant "256" which shows up everywhere as a buffer size has now
3686    been changed to SIZ.  And, SIZ has been defined now as 1024, not 256, because
3687    we need 1024 byte buffers for most Internet protocols.
3688
3689  Revision 573.58  2000/12/27 05:09:58  ajc
3690  * Added a skeleton IMAP "SEARCH" command (based on the FETCH logic)
3691
3692  Revision 573.57  2000/12/26 03:46:50  ajc
3693  * More IMAP tweaks
3694
3695  Revision 573.56  2000/12/25 22:50:43  ajc
3696  * Added an API function to extract and unfold specific RFC822 fields.
3697  * imap-->fetch-->envelope-->in-reply-to now works
3698  * More robust checking and reporting of temp file errors in the client
3699
3700  Revision 573.55  2000/12/25 20:43:24  ajc
3701  * imap_fetch.c: added support for fetch-->envelope-->from
3702
3703  Revision 573.54  2000/12/20 04:09:24  ajc
3704  * A few memory handling fixes to netproc.
3705
3706  Revision 573.53  2000/12/20 01:57:37  ajc
3707  * netproc.c: added bounds check to fpgetfield()
3708
3709  Revision 573.52  2000/12/19 20:41:55  ajc
3710  * Fixed generation of unique file names for network uploads etc.
3711
3712  Revision 573.51.2.11  2000/12/26 05:30:55  nbryant
3713  remove extraneous transaction around dynamic module initializations. this will
3714  fix the crash on database creation.
3715
3716  Revision 573.51.2.10  2000/12/24 23:00:58  nbryant
3717  clean: also remove parsedate.c
3718
3719  Revision 573.51.2.9  2000/12/20 01:38:42  nbryant
3720  require transactional cursors
3721
3722  Revision 573.51.2.8  2000/12/20 00:30:01  nbryant
3723  release any stale db handles at the end of a server command
3724  (unfinished transactions will be aborted to annoy lazy programmers)
3725
3726  Revision 573.51.2.7  2000/12/19 06:18:27  nbryant
3727  set sched_yield as sleepycat's yield function. this should improve locking
3728  performance.
3729
3730  Revision 573.51.2.6  2000/12/19 02:22:29  nbryant
3731  added automatic transaction start/end on cdb_fetch, cdb_delete, and cdb_store
3732
3733  Revision 573.51.2.5  2000/12/18 03:51:13  nbryant
3734  ditto S_USER_TRANS, S_CALLLOG, and S_HOUSEKEEPING, which are no longer used at
3735  all
3736
3737  Revision 573.51.2.4  2000/12/18 02:49:17  nbryant
3738  removed all references to S_MSGMAIN critical section; it wasn't really needed.
3739  this should make things significantly more scaleable.
3740
3741  Revision 573.51.2.3  2000/12/17 22:12:48  nbryant
3742  reworked shutdown sequence to wait for worker threads to terminate before
3743  checkpointing and closing databases. it is no longer safe to call
3744  master_cleanup() directly to force a shutdown; instead, just set
3745  time_to_die to a nonzero value
3746
3747  Revision 573.51.2.2  2000/12/17 05:06:09  nbryant
3748  added deadlock detection and cleaned up messages
3749
3750  Revision 573.51.2.1  2000/12/16 21:06:59  nbryant
3751  created TRANSACTIONS branch
3752  track cursor and transaction id's in thread-specific data
3753
3754  Revision 573.51  2000/12/14 18:36:34  ajc
3755  * Fixed the "users not in chat" wholist display
3756
3757  Revision 573.50  2000/12/12 18:06:46  ajc
3758  * Removed the transaction stuff (but left the log in).  It wasn't working.
3759
3760  Revision 573.49  2000/12/12 06:19:55  ajc
3761  * Stabilize, dammit!!
3762
3763  Revision 573.48  2000/12/12 04:20:03  ajc
3764  * Made the transaction open/close a global thing, in a frantic attempt to get
3765    Uncensored to stop crashing.  More fixes on the way...
3766
3767  Revision 573.47  2000/12/11 06:08:41  ajc
3768  * Removed the housekeeper thread, moved terminate_idle_sessions() out to a
3769    timer event, and check_sched_shutdown() to the end of the worker thread
3770    loop.  Seems to have improved reliability (but why?)
3771
3772  Revision 573.46  2000/12/11 03:22:11  ajc
3773  * Added server-side REQT command to issue client termination requests
3774
3775  Revision 573.45  2000/12/11 02:19:26  ajc
3776  * Client now honors EM_GO_AWAY flag, used by the server to request that a
3777    client log off.  (The server doesn't support sending that flag yet, though)
3778
3779  Revision 573.44  2000/12/09 06:20:06  ajc
3780  * A few final touches to the Sleepycat DB back-end
3781
3782  Revision 573.43  2000/12/08 17:06:33  ajc
3783  * Wrap txn_begin and txn_end in S_DATABASE mutex
3784
3785  Revision 573.42  2000/12/07 20:21:39  ajc
3786  * begin/end transaction in master_startup()
3787
3788  Revision 573.41  2000/12/07 16:59:02  nbryant
3789  added --with-db and --with-gdbm options to configure
3790
3791  Revision 573.40  2000/12/07 04:50:33  ajc
3792  * Wrap housekeeper and timer events in transaction open/close functions
3793  * Checkpoint the DB as an EVT_TIMER event instead of after each session
3794    (runs each minute, but actually limited by the parameters of the function)
3795
3796  Revision 573.39  2000/12/06 04:44:36  ajc
3797  * Changed netproc to keep the use table in a flat file instead of a database
3798
3799  Revision 573.38  2000/12/05 05:32:58  ajc
3800  * Added support for non-USA country identities in vCard and registration
3801  * User edit now asks whether it should prompt to change the password
3802
3803  Revision 573.37  2000/12/03 04:12:21  ajc
3804  * Finished (mostly) the Sleepycat DB backend ... added transaction logging
3805
3806  Revision 573.36  2000/11/30 03:23:17  ajc
3807  * Got the Sleepycat DB back end working, by opening the databases in a non
3808    shared, non threaded mode, and using Citadel's locking to serialize access.
3809
3810  Revision 573.35  2000/11/29 05:00:02  ajc
3811  * I think the db stuff is ok, but my db library is fux0red...
3812
3813  Revision 573.34  2000/11/27 14:12:09  error
3814  * commands.c: fixups to print_express() to make external command not print
3815    extraneous stuff to the terminal and make the displayed message consistent
3816
3817  Revision 573.33  2000/11/27 10:41:14  error
3818  * print_express(): now uses GEXP instead of old PEXP; displays timestamps
3819
3820  Revision 573.32  2000/11/27 10:29:59  error
3821  * serv_chat.c: fix send_express_message() to include timestamps
3822
3823  Revision 573.31  2000/11/27 03:44:27  ajc
3824  * Initial checkin of database_sleepycat.c (doesn't work yet)
3825
3826  Revision 573.30  2000/11/26 05:24:22  ajc
3827  * msgbase.c: Added new API function CtdlOutputPreLoadedMsg(), and
3828    re-implemented the existing CtdlOutputMsg() as a wrapper around it.
3829  * imap_fetch.c: used the above function to do all output pre-loaded
3830
3831  Revision 573.29  2000/11/25 09:36:18  error
3832  * Added a bit of detail to syslog entries; now shows session id attached to
3833    client, hostname, and username, and time the session ended.
3834
3835  Revision 573.28  2000/11/25 06:17:06  ajc
3836  * Minor IMAP tweaks.  It still doesn't work.  :(
3837
3838  Revision 573.27  2000/11/23 07:22:21  error
3839  * citadel.spec: update version number
3840
3841  Revision 573.26  2000/11/21 11:12:56  error
3842   * domain.h: changed the HP/UX compatibility code to use defines from
3843     typesize.h for integers of specific bit widths (needed for Solaris, etc)
3844
3845  Revision 573.25  2000/11/12 04:20:49  ajc
3846  * Optimized server side input of message text
3847
3848  Revision 573.24  2000/11/10 03:55:06  ajc
3849  * Ford's Fix for Faster Functionality (save position during reply)
3850
3851  Revision 573.23  2000/11/09 04:48:50  ajc
3852  * tools.c: striplt() strips all whitespace, not just spaces
3853
3854  Revision 573.22  2000/11/07 20:47:21  ajc
3855  * imap_fetch.c: added a skeleton "ENVELOPE" fetch.  Currently sends NIL's.
3856
3857  Revision 573.21  2000/11/07 15:54:53  ajc
3858  * xx FETCH n:n BODY[pn.MIME] now works
3859
3860  Revision 573.20  2000/11/06 05:10:01  ajc
3861  * Changed the mime_parser() API (again) to allow "don't decode" mode
3862
3863  Revision 573.19  2000/10/29 18:11:07  ajc
3864  * Start numbering top-level MIME parts as 1, 2... not 1.1, 1.2...
3865
3866  Revision 573.18  2000/10/28 14:14:19  error
3867  * msgbase.c: eliminated most gotos; a single goto in alias() remains because
3868    it actually makes sense to do it that way...
3869
3870  Revision 573.17  2000/10/25 21:37:09  ajc
3871  * Implemented the AUTHENTICATE LOGIN command in IMAP
3872
3873  Revision 573.16  2000/10/25 19:20:37  ajc
3874  * FETCH now works for ranges *and* sets, and with sequence numbers *and* UID's
3875
3876  Revision 573.15  2000/10/24 20:39:59  ajc
3877  * Added RFC822, RFC822.HEADER, RFC822.SIZE, RFC822.TEXT fetch keys to IMAP
3878
3879  Revision 573.14  2000/10/23 20:26:51  error
3880  * War on goto:  rewrote a few easy functions to eliminate unnecessary gotos
3881
3882  Revision 573.13  2000/10/11 23:03:44  error
3883  * utilsmenu: obey $PAGER environment var, if any.  Default to more if neither
3884    $PAGER nor less is available.
3885
3886  Revision 573.12  2000/10/11 22:55:25  error
3887  * citadel.c: when ansi_color=user, enable color at login, so Lobby> posts
3888    displayed at login are in color
3889
3890  Revision 573.11  2000/10/11 22:47:51  error
3891  * domain.c: getmx() returns hostname as MX if no MX records found a la RFC 974
3892
3893  Revision 573.10  2000/10/10 19:18:12  ajc
3894  * Added support of macros ALL, BODY, FAST, and FULL to the IMAP FETCH command
3895
3896  Revision 573.9  2000/10/06 03:31:55  ajc
3897  * Mark Crispin is a fscking idiot.  IMAP is a convoluted mess.
3898
3899  Revision 573.8  2000/10/05 22:23:16  ajc
3900  * Slowly and painfully writing IMAP support
3901
3902  Revision 573.7  2000/10/04 22:39:06  ajc
3903  * Added skeleton versions of the LIST and LSUB commands to the imap server
3904
3905  Revision 573.6  2000/10/04 17:48:21  ajc
3906  * Allow Aides to zap rooms (site configurable setting)
3907
3908  Revision 573.5  2000/10/03 01:45:00  ajc
3909  * Changed the <.A>ide <S>ysconfig <G>eneral command to explicitly allow the
3910    global page log room to be disabled (answer "no" to set the log room to a
3911    null string)
3912
3913  Revision 573.4  2000/09/28 10:27:38  error
3914  * commands.c: changed sttybbs() to support HP/UX termios VMIN and VTIME
3915
3916  Revision 573.3  2000/09/24 22:01:45  ajc
3917  * ipc_c_tcp.c: don't hardcode BBSDIR path for unix domain sockets
3918
3919  Revision 573.2  2000/09/21 04:16:44  ajc
3920  * Fixed logged_in_response() so it only displays responses during Citadel
3921    protocol sessions.  (This was affecting POP etc.)
3922
3923  Revision 573.1  2000/09/11 22:05:04  ajc
3924  * citadel.c: accept -h <host> and -p arguments, so citadel can be called
3925    directly by telnetd, bypassing /bin/login.  It works, but not recommended at
3926    this time because it has to run as root.
3927
3928  Revision 573.0  2000/09/05 18:35:22  ajc
3929  * Tagged everything for version 5.73 release
3930
3931  Revision 572.39  2000/09/04 03:59:15  ajc
3932  IO's changes:
3933  ----------------------------
3934  revision 572.4
3935  date: 2000/09/03 06:36:01;  author: error;  state: Exp;  lines: +5 -1
3936  Added HP/UX linker flag for dynamic modules to work
3937  ----------------------------
3938  revision 572.3
3939  date: 2000/09/01 06:50:00;  author: error;  state: Exp;  lines: +8 -1
3940  Changed to use integer macros from typesize.h for specific bit widths
3941  ----------------------------
3942
3943  Revision 572.38  2000/09/01 20:17:08  ajc
3944  * msgbase.c: cmd_opna() - increase desired_section buffer from 64 to 256 bytes
3945
3946  Revision 572.37  2000/09/01 17:31:47  ajc
3947  * Fixed oopseth in control.c that might call fileno(NULL)
3948
3949  Revision 572.36  2000/09/01 13:37:16  ajc
3950  * control.c: chown citadel.control to bbsuid when opening/creating as root
3951
3952  Revision 572.35  2000/09/01 03:55:44  ajc
3953  * Fixed a few more references to the deprecated uncnsrd.mt-kisco.ny.us name
3954
3955  Revision 572.34  2000/09/01 03:43:09  ajc
3956  * Added 'author' command-line arg to aidepost.  Closes enhancement request
3957    #71 on bugzilla.
3958  * Put the default SMTP and POP3 ports back to 25 and 110.  Now that the
3959    unix domain socket bug is fixed, it's ok if these binds fail.
3960
3961  Revision 572.33  2000/08/31 23:02:15  ajc
3962  * ig_tcp_server() and ig_uds_server()  -  check to make sure queue length is
3963    always at least 5.  Zero-length queues can cause connection lockups.
3964
3965  Revision 572.32  2000/08/31 21:32:44  ajc
3966  * Still trying to fix a socket connect bug
3967
3968  Revision 572.31  2000/08/31 16:37:08  ajc
3969  * docs/import-export.txt: added.
3970
3971  Revision 572.30  2000/08/28 19:51:51  ajc
3972  * messages.c: cosmetic cleanup (coding convention and comments)
3973
3974  Revision 572.29  2000/08/26 20:23:18  ajc
3975  * Finished up the back end code for mailing list sends.  Sends now work!
3976
3977  Revision 572.28  2000/08/24 02:48:18  ajc
3978  * Merged in IO ERROR's diffs to make Citadel work with HP/UX
3979
3980  Revision 572.27  2000/08/22 02:31:47  ajc
3981  * nonce (for APOP-style auth) is now generated when a context is created
3982    instead of during protocol greeting functions.
3983  * Moved Citadel protocol nonce output from greeting to INFO
3984
3985  Revision 572.26  2000/08/18 21:09:36  ajc
3986  * Added a little more mailing list code to serv_network.c
3987
3988  Revision 572.25  2000/08/10 04:36:25  ajc
3989  * Fixed a bug in keyboard polling (in commands.c) which was causing the
3990    client protocol to get out of sync in certain conditions.
3991
3992  Revision 572.24  2000/08/10 02:42:13  ajc
3993  * Changed all the "200 ok" responses to more descriptive strings
3994  * Added a *temporary* protocol sync check.  Remove this!
3995
3996  Revision 572.23  2000/08/09 17:14:34  ajc
3997  msgbase.c: fixed a bug in
3998             remove_any_whitespace_to_the_left_or_right_of_at_symbol() that was
3999             causing the <R>eply function to fail on names with whitespace in
4000             certain parts of the string.  This closes Bug #56.
4001
4002  Revision 572.22  2000/08/05 04:24:00  ajc
4003  * Added [idle] to client wholist display for sessions idle >15 minutes
4004  * Added a generic "void *userdata" field to CtdlForEachMessage()
4005  * More prep for mailing list handling in the server
4006
4007  Revision 572.21  2000/07/30 04:36:12  ajc
4008  * Set up the SNET (Send NETwork config) and GNET (Get NETwork config) commands
4009    for the network overhaul.
4010
4011  Revision 572.20  2000/07/29 05:29:19  ajc
4012  * Changed the format of RWHO output to provide non-masqueraded user/room/host
4013    names (to Aides only) as additional fields rather than an extra line of
4014    output.
4015  * Changed the client to display new RWHO fields, in the "long" wholist only.
4016  * Default SMTP and POP ports are now -1, not 25/110.  These services must now
4017    be activated manually.
4018
4019  Revision 572.19  2000/07/24 00:39:13  ajc
4020  * Fixed a path problem when calling netmailer from mailinglist.c
4021
4022  Revision 572.18  2000/07/22 03:44:17  ajc
4023  * Prepared infrastructure for the networker rewrite
4024
4025  Revision 572.17  2000/07/17 02:38:08  ajc
4026  * Completed serv_vandelay.c (importer/exporter module)
4027  * sendcommand.c: fix behavior of SEND_LISTING mode
4028  * sysdep.c: client_gets() fill buffer with "000" terminator when returning -1
4029
4030  Revision 572.16  2000/07/14 03:06:55  ajc
4031  * Added .ATN (DOWN) and .ATS (SCDN 1) commands to the client
4032
4033  Revision 572.15  2000/07/10 23:36:08  ajc
4034  * Another attempt to fix the crashy crashy bug in serv_vcard
4035  * Did more work on the Art Vandelay module
4036  * Replaced all instances of sprintf(tempfile, tmpnam(NULL)) with strcpy()
4037
4038  Revision 572.14  2000/07/10 04:01:12  ajc
4039  * added an unfinished serv_vandelay.c (Art Vandelay module - importer/exporter)
4040
4041  Revision 572.13  2000/07/09 02:47:40  ajc
4042  * Overhauled the keepalive logic in the chat client.  Closes bug #20.
4043
4044  Revision 572.12  2000/07/09 02:27:02  ajc
4045  * Eliminated the whole SIGINT/SIGQUIT based handling of Ctrl-O and Ctrl-C
4046    keyboard interrupts.  Replaced with a non-blocking check for keyboard input
4047    which sets the global variable 'sigcaught' if either key was pressed.
4048    fmout() and pprintf() switch to 'drain mode' if sigcaught is set.
4049    This closes Bug #18.
4050
4051  Revision 572.11  2000/07/06 20:26:36  ajc
4052  * updated .Help SUMMARY
4053
4054  Revision 572.10  2000/07/04 20:02:46  ajc
4055  * Fixed potential crashy crashy bug in serv_vcard.c
4056
4057  Revision 572.9  2000/06/28 03:42:56  ajc
4058  * Changed the comments at the beginning of each file to a consistent format
4059  * Improved the parameterization of commands in the IMAP module
4060
4061  Revision 572.8  2000/06/27 01:27:13  ajc
4062  * Coupla very small changes to get on the road to IMAP support
4063
4064  Revision 572.7  2000/06/22 21:41:48  ajc
4065  * Made the ICQ stuff far more reliable ... by removing it!
4066
4067  Revision 572.6  2000/06/21 03:46:20  ajc
4068  * IMAP is now legal but useless, supporting NOOP, LOGIN, and LOGOUT.
4069
4070  Revision 572.5  2000/06/15 20:15:52  ajc
4071  * Inserted a skeleton IMAP module into the build.  IT DOES NOT WORK AT ALL.
4072
4073  Revision 572.4  2000/06/04 02:30:56  ajc
4074  * CtdlForEachMessage() now returns the number of messages processed.  It also
4075    accepts the MSGS_EQ mode, for targeting a specific message number (useful
4076    for determining whether the specified message actually exists in a room).
4077  * Completed the server side of the moderation system (serv_moderate.c module
4078    which implements the MMOD command)
4079
4080  Revision 572.3  2000/06/03 05:47:57  ajc
4081  * Replaced most of the very repetitive and very redundant access level checks
4082    in most commands with a single API call:  CtdlAccessCheck()
4083  * serv_moderate.c: added (not finished)
4084
4085  Revision 572.2  2000/06/02 03:38:50  ajc
4086  * Bind unix socket prior to TCP socket for citadel protocol
4087  * Fixed bug in sendcommand.c which was causing it to crash on attach
4088
4089  Revision 572.1  2000/05/26 19:27:51  ajc
4090  * Changed some of the rev-level sensitive stuff to look at the actual version
4091    of Citadel running, not the last version with which we ran setup
4092  * Added a moderation system.  Default filter level for new users is in the
4093    config file.  Per-user setting is in usersupp.  Moderation level of each
4094    message is in SuppMsgInfo.  Tweaked CONF, GETU, and SETU.  Read filter is
4095    working.  Moderate message up/down commands are not here yet.  See
4096    techdoc/moderation.txt for more info.
4097
4098  Revision 572.0  2000/05/23 02:09:30  ajc
4099  * Updated docs and tagged everything for the 5.72 release
4100
4101  Revision 571.7  2000/05/20 23:28:20  ajc
4102  * Fixed bug in client API that was causing netproc to crash
4103
4104  Revision 571.6  2000/05/15 00:05:19  ajc
4105  * Double the retry interval for SMTP deliveries after each failed attempt.
4106
4107  Revision 571.5  2000/05/11 03:08:47  ajc
4108  * serv_smtp.c: clear the relevant state buffers after an SMTP DATA command
4109    completes, allowing multiple messages in one session.  Closes bug #58.
4110
4111  Revision 571.4  2000/04/24 03:36:43  ajc
4112  * Removed references to strucmp() and struncmp(), replaced them with
4113    strcasecmp() and strncasecmp() as we did in the server a while ago, and
4114    set up the config script to figure out whether they need to be compiled
4115    in.  Also moved them to tools.h
4116  * Wrote a password manager for the client
4117
4118  Revision 571.3  2000/04/19 03:17:10  ajc
4119  * Don't ever expire the Local System Configuration> room
4120
4121  Revision 571.2  2000/04/16 19:03:47  ajc
4122  * Minor changes to avoid host lookup for local clients
4123
4124  Revision 571.1  2000/04/15 19:55:52  ajc
4125  * Fixed "Unvalidated users appear even with registration disabled" bug #36
4126
4127  Revision 571.0  2000/04/13 02:43:24  ajc
4128  * Fixed a problem that crashed the client during <G>oto commands if a room
4129    existed with a name more than 32 characters (thanks to Magus for reporting
4130    this one).
4131  * Tagged everything and updated docs for the 5.71 release
4132
4133  Revision 570.18  2000/04/10 01:47:22  ajc
4134  * More paginator changes.  Shuffled code around, added pagination to a bunch
4135    of other functions, and replaced the old, cumbersome pagination with the
4136    new, easy, API-based one in everything except message output.
4137
4138  Revision 570.17  2000/04/09 17:51:18  ajc
4139  * Added pprintf() (paginated version of printf) to the client-side API.  Now
4140    any client side function can be paginated simply by changing all of the
4141    printf's to pprintf's.  I've already done this for the user list and wholist
4142    (removing the old style pagination) and for "read directory."
4143
4144  Revision 570.16  2000/04/08 04:52:48  ajc
4145  * Another minor stoopid little time display fix
4146
4147  Revision 570.15  2000/04/08 03:58:12  nbryant
4148   * backed out the previous changes since they didn't look good on some
4149     xterms with a blue bold mode. just set the background color to black
4150     instead. this makes black-on-white terminals actually readable, if not
4151     particularly good looking.
4152
4153  Revision 570.14  2000/04/08 01:36:30  nbryant
4154   * citadel.c, commands.c: comment out cls() as this wasn't called if
4155     ansi_color=user anyway, and we have no way of knowing whether the user's
4156     terminal does background color erase, which was the reason for adding this
4157     in the first place. with the recent changes to color(), the display will get
4158     screwed up if they *do* have background color erase. perhaps this is a job
4159     for terminfo.
4160
4161  Revision 570.13  2000/04/08 00:37:42  nbryant
4162   * commands.c: fix color support for black-on-white color terminals such as
4163     CDE's dtterm. this just avoids white-on-white text; some color combinations
4164     such as yellow-on-white still aren't very legible due to contrast. There's
4165     not much I can think to do about that without affecting the look on the
4166     white-on-black terminals which probably account for most users.
4167
4168  Revision 570.12  2000/04/07 20:22:34  ajc
4169  * Fixed am/pm bug in time display
4170
4171  Revision 570.11  2000/04/07 19:22:45  ajc
4172  * For services disabled by setting port number to -1, administratively skip
4173    the bind instead of just allowing it to fail.
4174
4175  Revision 570.10  2000/03/31 04:31:02  ajc
4176  * Quick fix to 'stats' utility to purge records with bogus timestamps
4177
4178  Revision 570.9  2000/03/31 02:10:52  ajc
4179  * Caved in to pressure and enabled <R>eply in public rooms.
4180
4181  Revision 570.8  2000/03/28 03:55:53  ajc
4182  * Modified <.RU> to allow search for partial match
4183
4184  Revision 570.7  2000/03/27 03:08:19  ajc
4185  * Third parameter of CtdlDeleteMessages() now takes "" instead of NULL to
4186    specify 'any MIME type'.
4187
4188  Revision 570.6  2000/03/27 01:14:08  nbryant
4189   * Makefile.in: generate parsedate.c automatically
4190   * configure.in: check for bison/byacc/yacc. bison seems to build cleaner
4191     code.
4192   * parsedate.c: removed from CVS
4193   * parsedate.y: added #include <stdlib.h> so it builds with bison
4194
4195  Revision 570.5  2000/03/27 00:46:10  nbryant
4196   * First cut at Solaris fixes. There may still be some *printf("%s", NULL)
4197     type of issues lurking in the shadows.
4198
4199  Revision 570.4  2000/03/25 18:29:58  nbryant
4200  changed my email address
4201
4202  Revision 570.3  2000/03/23 02:41:50  ajc
4203  *** empty log message ***
4204
4205  Revision 570.2  2000/03/21 03:23:24  ajc
4206  * Experimental new linebreak mode
4207
4208  Revision 570.1  2000/03/20 14:43:19  ajc
4209  * "Brown paper bag" fix for SMTP bug (incoming long fields crash logger)
4210
4211  Revision 570.0  2000/03/19 23:42:34  ajc
4212  * This is the official 5.70 release.
4213
4214  Revision 1.494  2000/03/19 23:04:08  ajc
4215  * Small cosmetic change to date/time output
4216
4217  Revision 1.493  2000/03/19 05:02:39  ajc
4218  * SMTP hacks to deal with AOL braindamage
4219
4220  Revision 1.492  2000/03/18 18:18:04  ajc
4221  * Support multiline responses from SMTP servers when sending mail
4222
4223  Revision 1.491  2000/03/17 16:26:57  ajc
4224  * Set up a private "Sent/Received Pages" room for each user
4225
4226  Revision 1.490  2000/03/17 04:11:24  ajc
4227  * Moved bio-related commands out to a loadable module
4228
4229  Revision 1.489  2000/03/16 17:58:54  smw
4230  Created a docs directory.
4231  Moved install.txt to docs.
4232  Added inetmailsetup.txt (BBS server side e-mail)
4233  Added inetmailsetupmx.txt (local mail AND bbs e-mail
4234  Added inetsiteconfig.txt (describes the .asi command)
4235  Added siteconfig.txt (describes .asg)
4236  Added chat.txt (describes changes and new chat functionality)
4237  Made a couple of changes to install.txt (references to new documentation)
4238  Added Steve Williams to copyright.txt as the document writer.
4239
4240 Revision 1.488  2000/03/15 03:04:51  ajc
4241 * Added DEXP server command to disable incoming express messages.
4242 * <Q>uiet mode client side command to set/clear DEXP mode.
4243 * <K>nown rooms list displays through the paginator.
4244
4245 Revision 1.487  2000/03/12 00:21:35  ajc
4246 * Removed the semi-broken "chat room" functionality in the chat system, and
4247   replaced it with direct mapping to the actual Citadel room the user is in.
4248 * Display masqueraded roomname in chat, if applicable.  Fixes bug #19.
4249
4250 Revision 1.486  2000/03/11 21:29:37  ajc
4251 * SM_ flags for CtdlSaveMsgPointerInRoom() need to be a bit bucket, not an
4252   enum, since more than one can be passed.  Changed SM_DONT_BUMP_REF_COUNT
4253   from 3 to 4.  This also fixes bug #33.
4254
4255 Revision 1.485  2000/03/11 20:26:03  ajc
4256 * Reworked the <R>eply logic in messages.c - fixes bug #34
4257
4258 Revision 1.484  2000/03/11 19:22:19  nbryant
4259  * commands.c: improved timing of background keepalives if connection is
4260                lagged
4261
4262 Revision 1.483  2000/03/11 05:08:48  nbryant
4263  * commands.c: oops, that mutex stuff wasn't necessary
4264
4265 Revision 1.482  2000/03/11 04:09:03  nbryant
4266  * new threaded client code for background keepalives
4267
4268 Revision 1.481  2000/03/10 21:40:04  ajc
4269 * Changes to message base and networker to support Internet-style message
4270   ID's instead of the conventional Citadel style.
4271
4272 Revision 1.480  2000/03/08 03:36:37  ajc
4273 * Shut off hostname resolution when dealing with Unix domain sockets
4274 * Cleaned up the 'citmail' MDA tool
4275 * Added POP3 and SMTP port numbers to global system configuration
4276
4277 Revision 1.479  2000/03/07 21:54:58  ajc
4278 * Fixed the naming conventions and permissions for unix domain sockets.
4279
4280 Revision 1.478  2000/03/05 07:33:23  ajc
4281 * Added support for protocols over Unix domain sockets.
4282
4283 Revision 1.477  2000/03/04 22:36:23  ajc
4284 * Remove nulls appended to editor files during replace, edit, and print
4285   operations.  Truncate temp files during same operations.
4286   Closes bugs #6 and #7.
4287
4288 Revision 1.476  2000/03/04 05:29:18  ajc
4289 * Relax restrictions on editing of base rooms.  Renaming is not allowed but
4290   all other attributes can be edited.  Closes feature request #21.
4291 * Sending pages from the client now uses the same message editing functions
4292   as entering messages, allowing edit/abort.  Closes feature request #25.
4293
4294 Revision 1.475  2000/03/03 04:50:14  ajc
4295 * Moved all of the wholist masquerading commands into the serv_rwho module
4296
4297 Revision 1.474  2000/03/03 04:12:37  ajc
4298 * Finished the inbound side of gateway domain service
4299
4300 Revision 1.473  2000/02/27 04:55:51  ajc
4301 * Added "keymenu()" generic menu-maker to commands.c
4302 * Blocked non-numeric input to intprompt()  (fixes bug #16)
4303
4304 Revision 1.472  2000/02/27 03:57:35  ajc
4305 * Completed 'fsck'-like reference count verifier (server and client)
4306
4307 Revision 1.471  2000/02/26 18:30:40  ajc
4308 * Properly handle all aliases specified in network/mail.aliases for incoming
4309   SMTP mail (uses the alias() function, so if we replace that function with
4310   something that uses the same calling convention, it'll still work)
4311
4312 Revision 1.470  2000/02/26 05:15:38  ajc
4313 * Fortified the message base and SMTP code so that misdirected bounce messages
4314   end up in the Aide> room instead of getting dereferenced
4315 * Started writing a message reference count verifier ('fsck' for message base)
4316
4317 Revision 1.469  2000/02/25 06:14:05  ajc
4318 * Modularized the RWHO (Read WHO is online) command, basically as a pilot
4319   for modularizing all "non-API" functionality.
4320
4321 Revision 1.468  2000/02/24 03:44:00  ajc
4322 * Implemented holdoff time (15 minutes) for SMTP send retry.
4323 * Implemented "try for 3 days and then give up" on SMTP send.
4324
4325 Revision 1.467  2000/02/24 00:51:48  ajc
4326 * Client protocol synchronization check during exit from chat.
4327   This closes Bug #15.
4328
4329 Revision 1.466  2000/02/22 16:37:28  ajc
4330 * Minor tweaks to RFC822 output to keep brain-damanged MS Outlook from dying
4331
4332 Revision 1.465  2000/02/22 04:17:56  ajc
4333 * Got bounce messages working (mostly ... testers, please beat this up!)
4334 * Changed 'FIX' comments to 'FIXME' (less conflict, plus vim highlights it!)
4335
4336 Revision 1.464  2000/02/18 22:29:18  ajc
4337 * Coded up the "bounce" functions.  Still a coupla bugs.
4338
4339 Revision 1.463  2000/02/18 05:10:50  ajc
4340 * Made the <.ASI> command a bit friendlier.
4341 * SMTP sender now pays attention to "smarthost" entries in the system's
4342   Internet configuration, using them if one or more is present.
4343
4344 Revision 1.462  2000/02/17 05:27:39  ajc
4345 * Got the "MAIL From:" command sending the correct data.  (unnnhhhhnnhhhh...)
4346
4347 Revision 1.461  2000/02/16 22:06:26  ajc
4348 * Altered the display and conversion of RFC822 messages
4349
4350 Revision 1.460  2000/02/16 03:43:28  ajc
4351 * Added the resolver library to the configure script
4352
4353 Revision 1.459  2000/02/16 01:19:39  ajc
4354 * Vanquished the evil dn_expand() beast.  getmx() now seems to be working.
4355
4356 Revision 1.458  2000/02/14 04:36:14  ajc
4357 * sysdep.c: added new event hook type EVT_TIMER.  Timer event hooks are called
4358   once per minute by any worker thread.
4359 * msgbase.c: removed dependence on nested functions in CtdlOutputMsg() by
4360   replacing them with an API call CtdlRedirectOutput() in sysdep.c, which
4361   can temporarily redirect a session's output to an arbitrary file or socket.
4362 * serv_smtp.c: implemented the purging of messages in the queue for which all
4363   deliveries have been completed.
4364 * serv_smtp.c: removed temporary 'QQQQ' server command and replaced it with
4365   a timer event hook that runs the queue once per minute (this needs to be
4366   made more robust)
4367
4368 Revision 1.457  2000/02/08 21:00:47  ajc
4369 * Implemented the deprecated "LAST" command in POP3.  Some clients need it.
4370 * POP3 sessions now set the last-read pointer in Mail>.
4371
4372 Revision 1.456  2000/02/07 05:15:00  ajc
4373 * Renamed CtdlLocalHost() to CtdlHostAlias() and worked it a little deeper into
4374   the message routing logic.  Still needs some work on the gateway-domain
4375   stuff.
4376 * Twiddled CtdlOutputMsg() a bit for 'all Internet' situations.  Still needs
4377   some work to avoid printing dual headers when both Cit and RFC822 exist.
4378
4379 Revision 1.455  2000/02/03 03:57:35  ajc
4380 * Formalized the 'Internet Configuration' logistics.  Added new API call
4381   CtdlLocalHost() to detect aliases for the local host.  Used in SMTP listener.
4382
4383 Revision 1.454  2000/01/31 02:13:05  ajc
4384 * <.A>ide <S>ystem configuration <I>nternet  in the client (unfinished)
4385
4386 Revision 1.453  2000/01/26 02:41:27  ajc
4387 * SMTP delivery is working but still *very* rough.
4388
4389 Revision 1.452  2000/01/25 04:45:50  ajc
4390 * Wrote enough of the SMTP sender to get Patriot drooling over it, but not
4391   enough to complete the transmission of mail.
4392
4393 Revision 1.451  2000/01/23 21:25:45  ajc
4394 * Temporary hack to ig_tcp_server() to listen on an arbitrary port if the
4395   one specified is not bindable (for development only)
4396 * Added SM_DONT_BUMP_REF flag to CtdlSaveMsgPointerInRoom() to be used only
4397   in very specific and special situations
4398 * Generate delivery instructions when outbound SMTP mail is created from
4399   within Citadel (as opposed to being from the SMTP module)
4400
4401 Revision 1.450  2000/01/23 05:22:41  ajc
4402 * Coded up some more of the SMTP-sender (still not done)
4403
4404 Revision 1.449  2000/01/22 05:13:56  ajc
4405 * Added some more functionality to the string tokenizer
4406
4407 Revision 1.448  2000/01/17 20:57:43  ajc
4408 * CR to CRLF hacks (lose, lose, lose)
4409
4410 Revision 1.447  2000/01/17 18:30:27  ajc
4411 * Completed POP3 server.  All RFC1939 commands except APOP are implemented.
4412
4413 Revision 1.446  2000/01/17 17:09:23  ajc
4414 * Implemented LIST and STAT commands in the pop3 server
4415
4416 Revision 1.445  2000/01/17 05:38:14  ajc
4417 * citserver.c: cleanup hook functions are now run under the proper context,
4418                even when initiated by the housekeeper thread
4419 * serv_pop3.c: establish a place to hold the message list
4420
4421 Revision 1.444  2000/01/17 04:26:39  ajc
4422 * Modified CtdlOutputMsg() to handle output to arbitrary sockets or files.
4423   This uses nested functions and may not be portable beyond GCC...
4424
4425 Revision 1.443  2000/01/15 18:29:15  ajc
4426 * Added a generic (void *) parameter to the ForEachUser() and ForEachRoom()
4427   callback mechanisms, to allow callers and callbacks to pass arbitrary data
4428   between each other without requiring TSD variables.
4429 * room_ops.c: eliminated the need for 'FloorBeingSearched' TSD variable
4430 * internet_addressing.c: eliminated 'buffer1' and 'buffer2' TSD variables
4431
4432 Revision 1.442  2000/01/15 04:31:44  ajc
4433 * Removed UI_DIALOG mode in setup.  Can't count on 'dialog' to be consistent.
4434
4435 Revision 1.441  2000/01/15 04:07:17  ajc
4436 * Fixed the access rights on auto-created rooms (the same changes that were
4437   made to version 5.62 in the stable tree)
4438
4439 Revision 1.440  2000/01/13 03:32:36  ajc
4440 * techdoc/delivery-list.txt: added (syntax for delivery lists)
4441 * domain.*: added (will contain MX lookup code)
4442 * internet_addressing.c, logging.c: fixed some buffer overflow bugs
4443
4444 Revision 1.439  2000/01/12 03:56:27  ajc
4445 * sysdep.c: start the housekeeping thread *after* dropping root perms.
4446
4447 Revision 1.438  2000/01/09 19:03:16  ajc
4448 * Removed the fifo-based protocol downloads and replaced it with a less
4449   elegant "download temporary file to client, then sx/sb/sz" because
4450   downloading through a fifo was confusing some software.
4451
4452 Revision 1.437  2000/01/08 22:19:44  ajc
4453 * Completed spool to outbound delivery queue (still no queue sender implemented)
4454
4455 Revision 1.436  2000/01/08 05:00:09  ajc
4456 * Reworked some of the data structures to handle multiple recipients
4457 * Began implementation of the delivery queue
4458 * Added CtdlReallocUserData()
4459 * CtdlSaveMsg() now returns the local message ID in the database
4460
4461 Revision 1.435  2000/01/06 03:50:34  ajc
4462 * Replaced citmail.c with a new one that simply SMTP-forwards to Citadel
4463 * Started outbound SMTP queue work
4464
4465 Revision 1.434  1999/12/30 04:56:29  ajc
4466 * Got initial SMTP delivery working in a very specific situation (delivery
4467   to a single, local user)
4468
4469 Revision 1.433  1999/12/29 04:44:00  ajc
4470 * client_chat.c: display "No message sent" if a send page is aborted.
4471   Closes bug #2 in bugzilla.
4472
4473 Revision 1.432  1999/12/26 21:50:07  ajc
4474 * serv_vcard: don't run hooks when not logged in (such as in SMTP sessions)
4475 * serv_pop3: added.  This is the skeleton for a module implementing POP3.
4476
4477 Revision 1.431  1999/12/23 04:46:23  ajc
4478 * "Finished" initial hack of RFC822 import
4479
4480 Revision 1.430  1999/12/22 04:46:34  ajc
4481 * Fixed up the "Date:" headers to be RFC822-compliant
4482
4483 Revision 1.429  1999/12/13 05:30:57  ajc
4484 * Removed our naive 'conv_date()' RFC822-to-unixtime conversion function
4485   and replaced it with the public domain 'parsedate()' function from UseNet
4486
4487 Revision 1.428  1999/12/10 23:58:25  ajc
4488 * internet_addressing.c: added.  (Internet address to Citadel mapping)
4489
4490 Revision 1.427  1999/12/10 21:34:19  ajc
4491 * serv_smtp: implemented RFC821 "VRFY" and "EXPN" commands
4492
4493 Revision 1.426  1999/12/09 05:01:14  ajc
4494 * Split cmd_user() and cmd_pass() into frontend/backend functions
4495 * serv_smtp: implemented AUTH LOGIN for client authentication
4496
4497 Revision 1.425  1999/12/09 00:22:58  ajc
4498 * Finished the "arbitrary service" registration.
4499 * Eliminated "special" master socket for Citadel protocol - just register it
4500   like any other protocol.
4501 * Began initial implementation of native SMTP service.
4502
4503 Revision 1.424  1999/12/08 18:09:10  ajc
4504 * Added CtdlRegisterServiceHook() and its data type, for implementing arbitrary
4505   TCP-based services directly in the Citadel server.  Not finished yet.
4506
4507 Revision 1.423  1999/11/29 17:39:07  nbryant
4508 * citserver.c: Solaris lacks inet_aton; use inet_addr instead
4509
4510 Revision 1.422  1999/11/29 17:26:15  nbryant
4511 * citserver.c: include <sys/types.h>; may help portability to Solaris
4512
4513 Revision 1.421  1999/11/22 00:27:42  ajc
4514 * Added some temporary variables to OpenCmdResult().  Hopefully fixes
4515   bug #14 when running on FreeBSD.
4516
4517 Revision 1.420  1999/11/21 18:30:16  ajc
4518 * Protected cmd_move() from buffer overrun (no longer crashes the server)
4519 * cmd_chat() -- truncate input at 100 characters to prevent buffer overruns.
4520   Also handle broken client sockets properly.  (Thanks to DME for bug report)
4521
4522 Revision 1.419  1999/11/19 01:57:40  ajc
4523 * Fixed a *serious* memory leak in the database function wrappers.
4524 * Updated version number to 5.60 -- run setup when installing this version.
4525
4526 Revision 1.418  1999/11/18 03:29:20  ajc
4527 * Changed the order of parameters in <.A>ide <S>ystem config into a more
4528   logical grouping.
4529
4530 Revision 1.417  1999/11/18 02:31:50  ajc
4531 * Updated some of the documentation
4532 * Brought the internal version number up to 5.60
4533
4534 Revision 1.416  1999/11/17 04:15:05  ajc
4535 * Removed the session_count() function.  Instead, keep a reference count
4536   updated when sessions begin and end.
4537 * Replaced fixed number of worker threads with lower and upper limits; current
4538   code now tries to make thread count == session count, within these limits
4539
4540 Revision 1.415  1999/11/15 03:17:39  ajc
4541 * Put lockfile in /tmp instead of in /var/lock.   The latter is not guaranteed
4542   to exist, nor is it guaranteed to be writable by BBSUID
4543   (Resolves bug #11 from the Bugzilla repository)
4544
4545 Revision 1.414  1999/11/15 03:07:24  ajc
4546 * Fixed the network-wide vCard purge logic so that it (1) actually works,
4547   and (2) forces a netproc run immediately when a purge is entered
4548
4549 Revision 1.413  1999/11/09 21:20:44  nbryant
4550 * configure.in: include <sys/types.h> when doing checks which require <utmp.h>
4551   (should fix Bug #10 on FreeBSD)
4552
4553 Revision 1.412  1999/11/05 03:53:47  ajc
4554 * Issue 'cancel' messages for vCard when a user is deleted.
4555 * Try to delete 'cancel' messages locally after they've been distributed.
4556
4557 Revision 1.411  1999/11/03 04:01:20  ajc
4558 * Fixed buffer overrun problems in cmd_rchg(), cmd_hchg(), and cmd_uchg()
4559 * Removed my email address as the feedback content from the docs; replaced
4560   it with a reference to the Citadel web site.
4561
4562 Revision 1.410  1999/11/02 19:51:23  ajc
4563 * Fixed timeout problem for remote client sessions (all timeouts were set to
4564   1 second ... probably a temporary hack that was missed in the cleanup)
4565
4566 Revision 1.409  1999/11/02 03:03:27  ajc
4567 * Several fixes to msgbase.c and netproc.c to prevent corrupted incoming
4568   network traffic from crashing the server.  Reject bad messages.
4569
4570 Revision 1.408  1999/11/01 04:21:34  ajc
4571 * Fixed a concurrency bug which crashed the server when multiple sessions
4572   terminated simultaneously.
4573
4574 Revision 1.407  1999/11/01 00:54:02  ajc
4575 * CtdlFetchMessage() - generate a "<no text>" message body if there's none
4576   on disk.  Too much stuff goes haywire if there's no M field.
4577
4578 Revision 1.406  1999/10/31 18:17:17  ajc
4579 * Fixed buffer overrun in cmd_rchg()
4580 * Call master_cleanup() when time_to_die==1 for proper shutdown
4581
4582 Revision 1.405  1999/10/31 16:26:55  ajc
4583 * Fixed incorrect assignment of new session ID's
4584
4585 Revision 1.404  1999/10/31 04:17:17  ajc
4586 * Fixed a bug which was crashing the server during very long message entry.
4587
4588 Revision 1.403  1999/10/29 01:48:45  ajc
4589 * database.c: Removed arbitrary limit on maximum number of sessions
4590
4591 Revision 1.402  1999/10/29 01:03:03  ajc
4592 * Debugged all possible ways for a session to terminate; do them cleanly.
4593 * Assign session numbers in a more portable and less arbitrary way.
4594
4595 Revision 1.401  1999/10/28 19:50:55  ajc
4596 * Fixed a problem where the client protocol would spit out two responses
4597   and therefore get out of sync if ASUP command set the access level to
4598   0 and therefore deleted the user (thanks to Eric McDonald)
4599
4600 Revision 1.400  1999/10/28 05:08:49  ajc
4601 * Removed all of the thread cancellation cruft that is no longer necessary
4602 * Moved the now non-system-dependent RemoveContext() out of sysdep.c (now
4603   it's part of cleanup() in citserver.c)
4604 * Removed all references to pthread_* from all modules except sysdep.c
4605
4606 Revision 1.399  1999/10/28 03:20:17  ajc
4607 * Fixed the problem of worker threads waking up prematurely.
4608 * 'QUIT'-terminated sessions now exit properly.
4609
4610 Revision 1.398  1999/10/27 04:26:58  ajc
4611 * Initial hack of worker-thread rearchitecture.  Right now it is successfully
4612   dispatching worker threads to active client sockets (and to the master
4613   socket too, of course).  Removing sessions is currently broken.
4614
4615 Revision 1.397  1999/10/26 20:20:29  ajc
4616 * Removed the auto-reconnect stuff... it was locking the client in an active
4617   loop more often than it was reconnecting.
4618
4619 Revision 1.396  1999/10/26 13:59:11  ajc
4620 damn bugs
4621
4622 Revision 1.395  1999/10/26 03:48:39  ajc
4623 * Shuffled around the order of events when a thread is terminating.  All
4624   mutex operations now happen prior to the freeing of the CitContext structure,
4625   otherwise begin_critical_section() and end_critical_section() try to
4626   manipulate the context's mutex count when there isn't any context.
4627
4628 Revision 1.394  1999/10/26 03:21:16  ajc
4629 * Changed a lot of strncpy() calls to safestrncpy() and replaced most of their
4630   hardcoded size arguments with 'sizeof' based arguments.
4631
4632 Revision 1.393  1999/10/24 19:22:51  nbryant
4633         * Makefile.in, configure.in: added --enable-icq flag; made checks for
4634           authentication libraries more intelligent.
4635
4636 Revision 1.392  1999/10/23 03:39:12  ajc
4637 * Finished moving vCard functionality to the new message base functions.
4638
4639 Revision 1.391  1999/10/21 00:50:14  ajc
4640 * Finished up the flags and replication checks in CtdlSaveMsgPointerInRoom().
4641
4642 Revision 1.390  1999/10/20 16:46:27  ajc
4643 * More code shuffle.  Added some flags to CtdlSaveMessagePointerInRoom() and
4644   enabled the MOVE command to also do a "copy" operation (actually just
4645   creates a second link and bumps the ref count).  Implemented "<C>opy" in
4646   the client.
4647
4648 Revision 1.389  1999/10/20 16:07:48  ajc
4649 * Wholist fixes for users who are in chat mode
4650
4651 Revision 1.388  1999/10/20 03:42:29  ajc
4652 * In the wholist, only show <private room> if the user viewing the list
4653   doesn't know that room.  Otherwise show the name.
4654
4655 Revision 1.387  1999/10/20 02:59:22  ajc
4656 * Code reorganization.  Making it easier to move/copy messages without
4657   duplicating existing code.
4658
4659 Revision 1.386  1999/10/17 02:25:18  ajc
4660 * Discovered a huge design flaw in the replication algorithm.  Ripped it
4661   out and replaced it with something a bit more robust.
4662
4663 Revision 1.385  1999/10/16 05:30:17  ajc
4664 * Changes to message replication code.  Don't do server-side hooks during
4665   an ENT3 command.  Also fixed a bug in cmd_whok() that caused crashes
4666   after a file format change.
4667
4668 Revision 1.384  1999/10/14 03:04:16  ajc
4669 * Finished the netproc side of Z (zap/supersede) processing for replication
4670
4671 Revision 1.383  1999/10/13 04:24:18  ajc
4672 * Added search-by-header-fields to CtdlForEachMessage(), and then to the
4673   server MSGS command.  This will have lots of uses.
4674
4675 Revision 1.382  1999/10/13 01:36:39  ajc
4676 * Starting some work on network zap (supersede) mode for replication
4677
4678 Revision 1.381  1999/10/08 02:55:57  ajc
4679 * More vCard-related debugging
4680
4681 Revision 1.380  1999/10/07 02:58:46  ajc
4682 * Semi-broken vCard replacement implementation in place.
4683 * Added "Z" (Zap, supersede) field to message format
4684
4685 Revision 1.377  1999/10/04 03:19:52  ajc
4686 * We now have a housekeeping thread and a housekeeping queue.
4687
4688 Revision 1.376  1999/10/03 21:48:21  ajc
4689 * Added serv_upgrade.h to automagically convert pre-5.55 format user records
4690   to 5.55 format user records and generate vCards.
4691
4692 Revision 1.375  1999/09/29 21:13:17  ajc
4693 * CtdlWriteObject() can now store objects in personal rooms for any specified
4694   user -- rather than only the current user or non-personal rooms.
4695
4696 Revision 1.374  1999/09/29 17:26:56  ajc
4697 * serv_vcard.c: fixed crashola bug in cmd_greg()
4698 * tools.c: simplified and improved the string tokenizer.  Now it runs in a
4699            single pass with no intermediate buffer.
4700
4701 Revision 1.373  1999/09/28 03:27:37  ajc
4702 * Fully migrated cmd_greg() and cmd_regi() into serv_vcard (still has bugs)
4703
4704 Revision 1.372  1999/09/27 03:33:40  ajc
4705 * cmd_regi() is now in serv_vcard and writes to the vcard instead of to the
4706   usersupp file.  Still needs tweaking.
4707
4708 Revision 1.371  1999/09/24 03:32:19  ajc
4709 * "read my vCard" and "write my vCard" are written and tested.
4710
4711 Revision 1.370  1999/09/24 02:54:17  ajc
4712 * Worked a little more on the vCard stuff.  The serv_vcard module is now in
4713   place, and a "read my vcard" function is there; "write my" is next...
4714
4715 Revision 1.369  1999/09/23 03:07:56  ajc
4716 * The vCard 'class' is now linked into the server, though it's not really
4717   functional yet.  Its constructors/destructors are debugged, though.
4718
4719 Revision 1.368  1999/09/19 21:28:33  ajc
4720 * Finished off the message architecture stuff with a new class of hooks to
4721   enable future server-side handlers.
4722
4723 Revision 1.367  1999/09/19 15:57:06  ajc
4724 * migrated cmd_ent3() to CtdlSaveMessage()
4725
4726 Revision 1.366  1999/09/19 05:13:57  ajc
4727 * Debugged the new version of CtdlWriteObject()
4728
4729 Revision 1.365  1999/09/16 03:23:23  ajc
4730 * Did most of the migration from save_message() to CtdlSaveMsg().  The
4731   latter builds a "struct CtdlMessage" (so we can run server-side handlers
4732   against it later on), then serializes it and stores to disk.
4733 * BROKEN BUILD ALERT!!  cmd_ent3() and CtdlWriteObject() are still not
4734   migrated.  They are stubbed out and will MALFUNCTION if used right now!!
4735
4736 Revision 1.364  1999/09/07 01:42:42  ajc
4737 * cmd_msg3() now uses serialize_message() for its output.  All message
4738   commands will eventually exist as a "struct CtdlMessage" at some point
4739   so that we can install server-side handler hooks.
4740
4741 Revision 1.363  1999/09/07 00:04:13  ajc
4742 * netproc.c: put outgoing messages into the use table, too -- this prevents
4743   locally originated messages from showing up again if a remote system is
4744   misconfigured and spools them back to us.
4745
4746 Revision 1.362  1999/09/06 03:39:15  ajc
4747 * citadel.c: run strproc() on new passwords
4748
4749 Revision 1.361  1999/09/03 17:50:26  playcow
4750 For URL view, don't prompt user to select url if there is only one.  Display
4751 <U>RL View prompt if message contains url(s). -Ben
4752
4753 Revision 1.360  1999/09/02 02:09:59  ajc
4754 * msgbase.c: new function serialize_message() for future use
4755
4756 Revision 1.359  1999/09/01 21:09:25  ajc
4757 * database.c: display the GDBM version string on startup
4758
4759 Revision 1.358  1999/09/01 02:36:34  ajc
4760 * Actually _enforce_ the max msg len limit
4761
4762 Revision 1.357  1999/09/01 01:51:48  ajc
4763 * Added the ability to handle embedded URL's from the text client
4764
4765 Revision 1.356  1999/09/01 01:02:47  ajc
4766 * Implemented "maximum message length" in global system config
4767
4768 Revision 1.355  1999/08/31 00:57:17  ajc
4769 * Handle multipart/alternative properly during legacy message outputs.
4770   Basically it just prints the first alternative and skips the rest.
4771
4772 Revision 1.354  1999/08/29 21:12:24  ajc
4773 * Made some changes to the output of MIME (especially multipart) messages.
4774
4775 Revision 1.353  1999/08/29 19:56:43  ajc
4776 * HTML updates
4777
4778 Revision 1.352  1999/08/24 02:01:03  ajc
4779 * html.c: added.  This is an overly simplistic HTML-to-text converter.
4780
4781 Revision 1.351  1999/08/21 18:37:29  ajc
4782 * Minor cosmetic cleanup.  No code changes.
4783
4784 Revision 1.350  1999/08/21 05:15:34  ajc
4785 * mailinglist.c, netmailer.c: fixed to allow list submissions from all posters
4786   on a Citadel network rather than only on the local system.
4787
4788 Revision 1.349  1999/08/08 00:25:45  ajc
4789 * Made one more byte available in locate_host() and in all the structs which
4790   its output gets written to (client can display 24 positions but we were only
4791   saving 23).
4792
4793 Revision 1.348  1999/08/07 16:34:38  nbryant
4794 * serv_icq.c: warning fixes
4795
4796 Revision 1.347  1999/08/06 02:57:26  ajc
4797 * locate_host.c: use strdoop() and phree() instead of strdup() and free()
4798 * serv_icq.c: run learned IP's through Citadel's locate_host() & put in Wholist
4799
4800 Revision 1.346  1999/08/05 17:58:59  ajc
4801 * RWHO command now returns express message code in postion 3
4802
4803 Revision 1.345  1999/08/04 02:21:45  ajc
4804 * Fixed some bugs in the ICQ metaclient, and documented the new protocol cmds
4805
4806 Revision 1.344  1999/08/03 11:34:35  ajc
4807 * Added client_icq.c and client_icq.h
4808
4809 Revision 1.343  1999/08/03 03:14:51  ajc
4810 * Wrote the client side of the ICQ gateway.  Now on to other projects.  :)
4811
4812 Revision 1.342  1999/08/03 01:52:06  ajc
4813 * Redesigned the client protocol commands for dealing with ICQ
4814 * Implemented page function priority ordering to prevent pages from being
4815   simultaneously delivered over multiple IM systems
4816 * Migrated serv_icq.* into the Makefile
4817
4818 Revision 1.341  1999/08/01 21:36:30  ajc
4819 * EXTREME coolness.  The server side of the ICQ metaclient is now working.
4820   It is set up using ICQL and ICQA commands, it automatically logs the user
4821   onto ICQ along with Citadel, and displays all non-offline ICQ contacts
4822   in the Wholist.
4823
4824 Revision 1.340  1999/07/31 07:18:01  ajc
4825 * Restructured the express message infrastructure, adding a class of function
4826   hooks for the addition of multiple paging modules with message routing
4827
4828 Revision 1.339  1999/07/30 22:20:19  ajc
4829 * Applied bugfix patches contributed by Vaggelis Tsirkas:
4830   * rooms.c: buffer overrun fix
4831   * room_ops.c: cmd_rdir() now behaves better when directory doesn't exist
4832
4833 Revision 1.338  1999/07/30 03:32:24  ajc
4834 * Added strdoop(), a leak-checked version of strdup()
4835 * Small fixes to new API functions in msgbase.c
4836 * ICQ metaclient stores/reads config using the message base API functions
4837
4838 Revision 1.337  1999/07/29 03:36:37  ajc
4839 * msgbase.c: reorganized.  output_message() now uses CtdlFetchMessage(),
4840   cmd_msg3() now fetches directly from disk and spews to the client.
4841
4842 Revision 1.336  1999/07/28 04:02:37  ajc
4843 * Server modules are now labelled with their RCS ID instead of a complex and
4844   manually-updated data structure.
4845
4846 Revision 1.335  1999/07/28 03:50:24  ajc
4847 * serv_expire.c: expire-by-age now calls CtdlFetchMessage() instead of
4848   calling output_message() in MT_DATE mode.
4849 * msgbase.c: removed MT_DATE mode ('twas a sleazy hack)
4850
4851 Revision 1.334  1999/07/27 22:47:26  ajc
4852 * Implemented new data type "CtdlMessage" which will eventually be used as
4853   widely as possible to represent a message in memory.
4854 * Implemented CtdlFetchMessage() which is intended to become the back-end to
4855   output_message() as well as a bunch of other things.
4856
4857 Revision 1.333  1999/07/27 20:00:24  ajc
4858 Removed all references to CC->msglist and CC->num_msgs, and all utility
4859 functions which relied upon them.  Citadel Is Now Better.
4860
4861 Revision 1.332  1999/07/27 19:32:22  ajc
4862 Removed serv_upgrade.c and all references to it in Makefile.in
4863 Reworked new-mail-count to not use MessageFromList() etc.
4864
4865 Revision 1.331  1999/07/25 02:59:37  ajc
4866 Fixed reference count problem in cmd_move()
4867
4868 Revision 1.330  1999/07/24 22:50:38  ajc
4869 Continued replacing references to [get|put]_msglist() with better code.
4870 For some reason, cmd_msgs() still doesn't always work right.
4871
4872 Revision 1.329  1999/07/24 22:16:41  ajc
4873 Experimenting with automatic updating of ChangeLog by CVS.  Simply twiddle
4874 ChangeLog a bit (i.e. by adding or removing a newline from the end of the
4875 file) before issusing "cvs commit", and the comments recorded by CVS will
4876 automatically appear at the beginning of ChangeLog.
4877
4878 Revision 1.328  1999/07/24 22:14:21  ajc
4879 cmd_move() now uses CtdlDeleteMessages().
4880 WARNING: build is temporarily broken.  Currently removing all references
4881 to the "msglist" kept in CitContext.  It's ugly and must die.
4882
4883 Thu Jul 22 22:26:50 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4884         * Moved message deletion into new API function CtdlDeleteMessages()
4885         * Added CtdlWriteObject() to store generic data in the msgbase
4886         * Fixed really dumb error that prevented network msgs from posting
4887
4888 Tue Jul 20 22:14:54 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4889         * Moved the actual work done in cmd_msgs() into a new API function
4890           called CtdlForEachMessage() which is supplied a callback function.
4891
4892 Mon Jul 19 23:24:18 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4893         * Keep the (unqualified) content-type in the SuppMsgInfo record.  We'll
4894           be using this shortly to search rooms for specific object types.
4895
4896 Sun Jul 18 14:53:16 EDT 1999 Art Cancro <ajc@uncensored.citadel.org> 
4897         * Changes to dynloader et al to handle ICQ module being written
4898         * serv_icq.c, serv_icq.mk: added (separate makefile is temporary)
4899
4900 1999-07-17 Nathan Bryant <bryant@cs.usm.maine.edu>
4901         * chkpwd.c: DELETED CVS REVISION 1.3 (backed out Art's last change)
4902           use 'cvs update -r 1.2 chkpwd.c; cvs update -A chkpwd.c' NOW to
4903           avoid problems with working directories.
4904         * Makefile.in: don't install chkpwd setuid if make install isn't
4905           being run as root.
4906         * citadel.spec: chmod u+s chkpwd during %install stage
4907
4908 Fri Jul 16 18:39:04 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4909         * PEXP and GEXP no longer trip the idle time display
4910         * Fixed bug which duplicated incoming private mail to Trashcan
4911         * Improved auto-reconnect by NOT using SIGPIPE and longjmp(); also
4912           implemented a 15 second delay to wait for a crashed server to restart
4913         * Relaxed the security check in chkpwd.c a bit; it was just flat-out
4914           preventing logins on my system otherwise
4915
4916 Thu Jul 15 22:57:32 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4917         * eliminate redundant "name" parameter in [l]putuser(), now uses
4918           usbuf->fullname to guarantee the correct name for the index
4919
4920 1999-07-12 Nathan Bryant <bryant@cs.usm.maine.edu>
4921         * Makefile.in, configure.in: link netproc with gdbm
4922         * netproc.c: only include gdbm.h if HAVE_GDBM_H
4923         * user_ops.c: warning fix
4924
4925 Mon Jul 12 19:51:30 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4926         * Mail is now saved in both sender and recipient mailboxes.  This is
4927           structured in a way that will allow a separate "outbox" room and/or
4928           multiple recipients in the future.
4929
4930 Sun Jul 11 18:46:48 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4931         * netproc.c: msgfind() no longer uses the timestamp as a message-ID
4932           when no other message-ID is available (it screws up the loopzapper)
4933         * room_ops.c: eliminate room name parameter in putroom() and its ilk;
4934           get data from quickroom.QRname instead; prevents incorrect indexes
4935         * Tentative implementation of "personal rooms" (user-private namespace)
4936         * Added supplementary message info records for info that may change
4937           at some time later than when the message is saved (i.e. ref counts)
4938         * Implemented msg reference count increment/decrement; delete messages
4939           whose reference count reaches zero
4940
4941 Wed Jul  7 23:25:09 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4942         * control.c: create citadel.control if it doesn't exist (yikes!)
4943         * serv_expire.c: purge mailbox rooms belonging to non-existent users
4944         * user_ops.c: don't delete user's mailbox at user-delete time
4945
4946 Mon Jul  5 17:01:29 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4947         * utilsmenu: removed menu items for defunct utilities
4948
4949 Mon Jun 28 16:24:10 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4950         * Changed any remaining references to UUCP, to "Internet" instead.
4951
4952 Thu Jun 24 11:13:23 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4953         * added server command line option "-f" to defrag databases on startup
4954         * control.c: better performance and reliability in [get|put]_control()
4955         * netproc.c: Finished the loopzapper
4956
4957 Mon Jun 21 00:04:15 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4958         * netproc.c: started writing a vortex checker.  Not finished.
4959
4960 Wed Jun  9 23:34:25 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4961         * Replaced all code that generated temporary filenames with calls to
4962           tmpnam().  Rewrote using tmpfile() where possible.
4963
4964 Thu Jun  3 11:35:18 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4965         * base64.c: mapped fi and fo to stdin and stdout using
4966           actual code rather than assignment at declaration time
4967           (several users of Red Hat Linux 6.0 reported problems)
4968
4969 Fri May 21 20:05:00 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4970         * Added function CtdlGetDynamicSymbol() for dynamic symbol allocation
4971         * server.h: Changed discrete #define's to enum's where appropriate
4972         * sysdep.c: Changed the startup message to give credit to the whole
4973           development team :)  Also made the message more GNU-ish.
4974
4975 Thu May 20 20:01:30 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4976         * database.c: print log messages for file defragmentations
4977         * citserver.c: implemented CtdlAllocUserData() and CtdlGetUserData()
4978           for arbitrary per-session data storage (by modules etc.) without
4979           having to add fields to struct CitContext
4980         * msgbase.c: removed "desired_section" from struct CitContext and
4981           implemented it using CtdlGetUserData() as a test.
4982
4983 Wed May 19 19:30:28 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
4984         * commands.c, commands.h, routines.c: began color scheme changes
4985
4986 1999-05-15 Nathan Bryant <bryant@cs.usm.maine.edu>
4987         * configure.in: Added untested support for BSDI 4.x.
4988
4989 1999-05-13 Nathan Bryant <bryant@cs.usm.maine.edu>
4990         * acconfig.h, configure.in, routines.c: fix for certain SYSV variants
4991           which lack utmp.ut_host
4992         * citadel.h, file_ops.c, msgbase.c, netproc.c, serv_chat.c: fix
4993           namespace collision with <sys/stream.h> on aforementioned SYSV
4994           variant
4995         * configure.in, getutline.c: check for paths.h
4996         * configure.in, Makefile.in: check for -lsocket and -lnsl
4997
4998 1999-05-11 Nathan Bryant <bryant@cs.usm.maine.edu>
4999         * chkpwd.c: fixed excessive paranoia; it used to refuse to run when
5000           invoked by root and BBSUID != 0
5001         * Makefile.in: ignore errors while installing /etc/pam.d/citadel
5002
5003 1999-04-27 Art Cancro <ajc@uncensored.citadel.org>
5004         * file_ops.c: fixed NDOP to not crash the server if it has trouble
5005           with a download file
5006         * netpoll.c: upped default packet size
5007
5008 Mon Apr 26 22:06:57 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5009         * Repaired IGnorant security hole blunder re. citmail
5010
5011 Sun Apr 25 12:44:08 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5012         * serv_chat.c: notify user of number of participants upon entering chat
5013         * Built the 5.53 distribution
5014
5015 Wed Apr 21 22:23:13 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5016         * aidepost.c: add -r flag to allow posting to rooms other than Aide>
5017         * serv_expire.c: now posts transcripts of all auto-purged rooms/users
5018
5019 Tue Apr 20 12:45:55 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5020         * messages.c: downloading more than MAX_MSGS messages now truncates
5021           (off the beginning of the list) rather than crashing.
5022
5023 Mon Apr 19 12:11:48 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5024         * whobbs.c: auto-detect when being called from a webserver, and act
5025           as a CGI (print HTTP headers and HTML output)
5026
5027 1999-04-18 Nathan Bryant <bryant@cs.usm.maine.edu>
5028         * serv_chat.c: fixed some potential buffer overruns (thanks dme)
5029
5030 Wed Apr 14 21:32:28 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5031         * Makefile.in: chmod 4755 citmail to prevent citmail from aborting
5032           when called from sendmail due to citadel.config security check
5033
5034 1999-04-13 Nathan Bryant <bryant@cs.usm.maine.edu>
5035         * dynloader.c: OpenBSD places underscores in front of symbol names
5036         * Makefile.in: fixed a few sillies
5037         * aidepost.c, citmail.c, file_ops.c, logging.c, msgbase.c, netmailer.c,
5038           netproc.c, rcit.c, routines.c, serv_upgrade.c: fixed time_t handling
5039           (have to cast it to long for printf/scanf)
5040
5041 Mon Apr 12 22:13:26 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5042         * aidepost.c: rewrote to unlink temp file before writing to it so that
5043           it will automatically go away if interrupted. Also ran indent -kr -i8
5044
5045 1999-04-12 Nathan Bryant <bryant@cs.usm.maine.edu>
5046         * configure.in, Makefile.in: taught it how to generate OpenBSD shared
5047           libraries
5048         * config.c, sysdep.c: fix -h option not setting proper modules dir
5049         * configure.in, citadel.spec: make --enable-chkpwd the default
5050         * setup.c: don't chown chkpwd
5051
5052 1999-04-11 Nathan Bryant <bryant@cs.usm.maine.edu>
5053         * configure.in: another OpenBSD fix, but we're still not quite there yet
5054         * serv_chat.c: warning fix
5055
5056 Thu Apr  8 22:51:28 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5057         * config.c: now requires a setup run for *any* rev level difference
5058         * Updated docs & confs for 5.53b1 release
5059         * setup.c: sets the 0600 permission bits on citadel.config that
5060           is checked for in config.c
5061
5062 1999-04-08 Nathan Bryant <bryant@cs.usm.maine.edu>
5063         * citserver.c: improved is_public_client(), also if a public_client
5064           only supplies a numeric address, attempt to resolve it
5065         * locate_host.c: verify that the forward DNS matches the reverse
5066         * locate_host.c, locate_host.h: more general interface
5067         * configure.in, acconfig.h: fixes for Digital UNIX
5068
5069 Wed Apr  7 21:36:16 EDT 1999 Art Cancro <ajc@uncensored.citadel.org>
5070         * Implemented "access level required to create rooms" (client & server)
5071
5072 1999-04-07 Nathan Bryant <bryant@cs.usm.maine.edu>
5073         * configure.in: updated help messages, OpenBSD support
5074         * setup.c: if /etc/inittab doesn't exist, don't ask to create an
5075           entry in it
5076         * server.h, sysdep.c: fix a potential deadlock/data corruption bug
5077         * room_ops.c: fixed the 'gdbm error: Illegal data' message when
5078           deleting a room which had never been posted to
5079         * user_ops.c: include errno.h
5080         * dynloader.c: fix for OpenBSD
5081
5082 1999-04-06 Nathan Bryant <bryant@cs.usm.maine.edu>
5083         * Makefile.in, configure.in, getutline.c, sysdep.c:
5084           fixes/bug workarounds for FreeBSD
5085
5086 1999-04-03 Nathan Bryant <bryant@cs.usm.maine.edu>
5087         * Makefile.in, configure.in, chkpwd.c, acconfig.h: support for
5088           `chkpwd', a setuid helper program for machines which use shadow
5089           passwords (configure --enable-chkpwd)
5090         * Makefile.in, configure.in, auth.c, citadel.pam, user_ops.c: support
5091           for PAM or shadow passwords (configure --with-pam)
5092         * Makefile.in: made some messages simpler
5093         * citadel.spec: updated for 5.53; correct name of tarball; build with
5094           --enable-chkpwd and --with-pam; add defattr tags so rpm's can be
5095           built by non-root user
5096         * commands.c: cosmetic cleanup
5097         * config.c: (security/paranoia) check permissions on citadel.config
5098         * configure.in: check for ncurses if we can't find curses
5099         * dynloader.c: warning fix
5100         * sysdep.c: don't complain if initgroups() fails
5101         * citadel.c: fix systems with SYSV-style signal handling (e.g. libc5)
5102         * Makefile.in: New! Improved! Cleaner! Shinier!
5103
5104 Sun Mar 21 14:21:47 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5105         * messages.c: cosmetic cleanups to message reading loop
5106
5107 Sat Mar 13 21:33:19 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5108         * commands.c: use bright colors by default in color mode
5109         * citserver.c: initialize wholist fields with (not logged in) etc.
5110
5111 1999-03-08 Nathan Bryant <bryant@cs.usm.maine.edu>
5112         * sysdep.c: call DLoader_Init() with an absolute path so that gdb can
5113           find module symbols
5114         * database.c: bail out if opening databases fails
5115
5116 Sat Mar  6 01:55:55 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5117         * serv_chat.c: use memfmout(), *not* cprintf() to transmit express
5118           messages.  Calling cprintf() on strings >256 bytes crashes the server
5119         * msgbase.c: minor logging fix in save_message()
5120
5121 1999-03-05 Nathan Bryant <bryant@cs.usm.maine.edu>
5122         * sysdep.c: add undocumented -r flag to citserver to prevent it from
5123           dropping root permissions.
5124         * sysdep.c: also drop supplementary groups
5125
5126 1999-03-04 Nathan Bryant <bryant@cs.usm.maine.edu>
5127         * config.c: error checking in put_config()
5128         * setup.c: chgrp files to the login group associated with BBSUID
5129         * sysdep.c: copyright 1987-1999; drop root perms; load modules and call
5130           master_startup() after dropping perms
5131
5132 Wed Mar  3 00:00:55 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5133         * Prevent buffer overruns in lowercase_name in [get|put]user()
5134         * client_chat.c: use citedit() for page composition
5135
5136 Sat Feb 27 07:47:36 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5137         * rooms.c: download_to_local_disk() prompts for a filename if a blank
5138           filename was supplied to it (for attachments without names)
5139         * mime_parser.c: strip leading whitespace in content_type & disposition
5140
5141 1999-02-24 Nathan Bryant <bryant@cs.usm.maine.edu>
5142         * configure.in: improved check for pthreads
5143         * configure.in, routines.c, acconfig.h: check for ut_type in struct utmp
5144         * configure.in, Makefile.in: support for building server modules as
5145           relocatable objects for BSDI (which still uses a.out *gag* *choke*)
5146         * configure.in: compiler choice & flags for BSDI; check for libtermcap
5147         * database.c: don't use a critical section in open_databases()
5148         * housekeeping.c: use getfloor()/putfloor() instead of
5149           lgetfloor()/lputfloor() in check_ref_counts()
5150         * mime_parser.c: include <errno.h>
5151         * msgbase.c: include <limits.h>
5152         * sysdep.c: hacks for BSDI. use signals to fake thread cancellation;
5153           don't call master_cleanup() directly from signal handler.
5154         * routines.c: prototype getutline() if necessary
5155         * getutline.c: stupid bugfix
5156         * acconfig.h, configure.in, locate_host.c, server.h: work around
5157           nonreentrant gethostbyaddr() on BSDI
5158
5159 Mon Feb 15 22:59:00 EST 1999 Vaggelis Tsirkas
5160         * citadel.c: increased hostname buffer size to handle very big names
5161
5162 1999-02-15 Nathan Bryant <bryant@cs.usm.maine.edu>
5163         * sysdep.c(main): initialize alen before call to accept()
5164
5165 1999-02-04 Nathan Bryant <bryant@cs.usm.maine.edu>
5166         * configure.in: improved check for cygwin
5167         * configure.in, routines.c: access utmp directly instead of calling
5168           `who' if getutline() is available.
5169         * configure.in, Makefile.in, getutline.c: replace getutline() on
5170           systems which don't have it
5171         * routines.c: now always access utmp directly unless we can't find
5172           utmp.h
5173
5174 1999-02-02 Nathan Bryant <bryant@cs.usm.maine.edu>
5175         * Fixes for Cygwin:
5176           - ifdef out file download methods that require named pipes (client)
5177           - include pthread.h and gdbm.h only if they are present (fixes
5178             auto dependency generation)
5179           - include snprintf.h where needed
5180           - handle .exe suffixes for "make install"
5181
5182 Tue Feb  2 22:15:08 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5183         * Overhauled the express messaging system (again)
5184
5185 Mon Feb  1 19:48:04 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5186         * messages.c: implemented client download of MIME attachments
5187
5188 Sun Jan 31 18:29:18 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5189         * Added qpdecode.c to the distribution (decodes quoted-printable)
5190         * Finished the MIME parser
5191         * Gave MSG0 a reasonable behaviour for MIME messages
5192         * Added the OPNA command for downloading attachments
5193
5194 Sat Jan 30 18:39:53 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5195         * Look for citadel.rc in current directory if not found elsewhere
5196         * More work on the MIME parser
5197         * Added base64.c to the distribution
5198
5199 1999-01-29 Nathan Bryant <bryant@cs.usm.maine.edu>
5200         * fixes for IRIX (thanks to wr and family for use of the Indy):
5201           - use memset()/memcpy() instead of bzero()/bcopy() in all cases
5202           - configure updates
5203           - handle `long' pid's
5204           - a few other little bits
5205
5206 Mon Jan 25 21:23:07 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5207         * Fixed bug in save_message() which crashed the server on mail to sysop
5208         * Rewrote pop_march() to be smarter about <G>oto heuristics
5209
5210 Sat Jan 23 14:32:19 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5211         * Changed internal storage of express messages from a linked list to
5212           a single, resizable buffer.
5213         * Added a "room order" key to the room record, to allow some control
5214           over room listing order.
5215         * Made the room list commands aware of the room order key.
5216         * Overhauled <G>oto heuristics to pay attention to floor & room order
5217
5218 Wed Jan 20 19:21:51 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5219         * Added some more code to the unfinished MIME parser
5220         * Changed module loading path to simply "modules" because after calling
5221           get_config(), the cwd is guaranteed to be the correct BBS directory.
5222
5223 Tue Jan 19 21:28:29 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5224         * Fixed a bug in the user editing command (client side)
5225         * Started a rewrite of the MIME parser
5226
5227 Thu Jan 14 21:21:15 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5228         * Brought over the mime_parser from WebCit and began preliminary work
5229           on supporting MIME format messages.
5230
5231 Tue Jan 12 22:30:00 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5232         * Various changes to begin work on support for MIME messages
5233                 - Defined format type 4 for MIME
5234                 - msgbase.c: *temporary* hacks in output_message() for Type 4
5235                 - citmail.c: added more robust header parsing, and support
5236                              for Type 4.  Also eliminated the crappy built-in
5237                              SMTP server.
5238                 - Updated some of the technical documentation
5239
5240 Sun Jan 10 13:34:36 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5241         * Fixed access to page log room
5242
5243 Fri Jan  8 12:35:09 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5244         * control.c: include <limits.h> to fix PATH_MAX undefined
5245         * serv_chat.c: made the following changes to cmd_sexp() --
5246                 * Send zero-length message to check only, don't send
5247                 * Send "-" message on the command line to invoke
5248                   the SEND_LISTING transfer mode for a multi-line message
5249         * Added facilities to log all pages to a room (site configurable)
5250
5251 Tue Jan  5 23:24:52 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5252         * Replaced all occurances of malloc(), realloc(), and free() in the
5253           server and server-modules with mallok(), reallok(), and phree().
5254           Wrote macros and a set of leak-tracking functions.
5255
5256 Sun Jan  3 20:38:45 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5257         * Documentation changes
5258
5259 Fri Jan  1 01:01:45 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
5260         * Fixed security problem relating to private rooms
5261
5262 Wed Dec 30 20:10:52 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5263         * sysdep.c: put a bigger string buffer into lprintf() to avoid overruns
5264
5265 Sat Dec 26 16:56:46 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5266         * internetmail.config: commented this file more clearly
5267
5268 Wed Dec 23 20:42:49 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5269         * citadel.c: added some experimental code to automatically reconnect
5270           to the server if the connection is broken.  For some reason, it only
5271           works once.
5272
5273 Wed Dec 23 18:47:12 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5274         * sysdep.c: ignore SIGPIPE.  This keeps broken connections from
5275           crashing the whole server.
5276         * Tagged everything for the official 5.50 release.
5277
5278 Mon Dec 21 07:54:20 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5279         * housekeeping.c: call kill_session() with session_to_kill,
5280           not ccptr->cs_pid (was crashing the server)
5281
5282 Sat Dec 19 13:57:48 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5283         * Added "-i" flag to netproc to make it skip the export phase.
5284           Updated other programs to call netproc in this way when appropriate.
5285         * Updated network.txt to reflect the usage for netproc (which has
5286           been wrong for several releases)
5287
5288 Thu Dec 17 00:17:04 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5289         * Started removing the word "beta" from the docs and code.
5290           Preparing for an actual release.
5291         * msgbase.c: generate an 'I' field when requested (i.e. on locally
5292           originating messages.  this was breaking parts of the network)
5293
5294 1998-12-15 Art Cancro <ajc@uncensored.citadel.org>
5295         * msgbase.c: remove extra call to alias() which was causing
5296           Citadel-to-Citadel mail to fall into the bit bucket.
5297         * msgbase.c: fixed tempfile naming problem that could cause a new
5298           outgoing netmail message to overwrite another if netproc had not been
5299           run in between
5300
5301 1998-12-14 Art Cancro <ajc@uncensored.citadel.org>
5302         * More session table stability nonsense
5303
5304 Sun Dec 13 17:40:08 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5305         * sysdep.c, citserver.c: (hopefully) fixed a session table concurrency
5306           bug which was causing the server to occasionally crash.
5307         * removed serv_test.so from the default build
5308
5309 Fri Dec 11 18:50:00 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5310         * setup.c: default value for maxsessions is now 0 (no limit)
5311         * room_ops.c: don't allow users to create a room called "Mail"
5312         * serv_expire.c: fixed "number of messages purged" display
5313         * commands.c: when using color, default to low-intensity colors
5314
5315 Tue Dec  8 07:58:16 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5316         * Beta 2
5317
5318 Sat Dec  5 01:24:03 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5319         * Added a new type of module hook for adding logging functions
5320         * Removed whitespace to left and right of '@' in netmail recipients
5321         * sysdep.c: read citadel.config _before_ initializing loadable modules
5322         * stats.c: fixed segfault resulting from extracting log lines
5323         * Ripped most of the "attachments" stuff out of both the client and
5324           server.  (Thought of a better way to handle it ... LATER.)
5325
5326 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
5327         * setup.c: create citadel.config with mode 0600
5328         * Makefile.in: don't chmod sendcommand
5329         * serv_upgrade.c: don't create citadel.config if it doesn't already
5330           exist (paranoia)
5331         * setup.c: saner defaults for nodename and fqdn
5332
5333 Wed Dec  2 20:37:05 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5334         * msgbase.c: modified AddMessageToRoom() and all functions that call it
5335           to use a more reliable/accurate method to set quickroom.QRhighest
5336         * weekly.in: don't sort/purge filedir where filedir doesn't exist
5337
5338 1998-12-02 Nathan Bryant <bryant@cs.usm.maine.edu>
5339         * weekly is now generated by configure
5340
5341 Mon Nov 30 19:48:52 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5342         * room_ops.c: added sort_msglist() to move and save operations
5343         * sendcommand.c: added (also updated utils.txt, weekly, Makefile.in)
5344         * BETA 1
5345
5346 Sun Nov 29 23:57:39 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5347         * Fixed cmd_regi() to not display a second result code after xfer
5348         * Makefile.in: Removed "chmod 4755 citmail netmailer"
5349
5350 1998-11-23 Nathan Bryant <bryant@cs.usm.maine.edu>
5351         * citadel.spec: added
5352
5353 1998-11-22 Nathan Bryant <bryant@cs.usm.maine.edu>
5354         * Makefile.in: split install target into install-exec, install-data,
5355           and install-doc subtargets
5356
5357 Sat Nov 21 16:53:30 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5358         * Added a fourth color mode in the client: "user" which turns color
5359           on or off according to a per-user flag stored on the server.  Added
5360           server-side support for this too, of course.
5361         * import.c: removed
5362         * serv_expire.c: finished the code to purge stale visits
5363         * sysdep.c: strip trailing nonprintables in client_gets()
5364         * routines2.c: fixed <.AS> command; all configs now work properly
5365         * Moved num_parms() and all the extract() type functions into tools.c
5366           and removed them from all other files.  Linked in tools.[o|ro] there.
5367         * netproc.c: handled incoming file transfers to correct room directory
5368         * room_ops.c: fixed incorrect naming of files in info and images dirs
5369
5370 Fri Nov 20 20:29:07 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5371         * setup.c: removed all prompts that can be configured from within the
5372           client in order to simplify the setup procedure
5373
5374 Thu Nov 19 23:28:33 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5375         * Fixed serv_upgrade.c and export5.c (found elsewhere) to use a new
5376           export format which treats visits as a separate section
5377         * serv_expire.c: began writing functions to purge rooms and visits
5378           (neither work yet), and added a way to call defrag_databases()
5379
5380 Wed Nov 18 23:51:17 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5381         * Reimplemented 'visit' structs stored globally instead of as
5382           lists-per-user
5383
5384 Tue Nov 17 22:37:48 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5385         * Started implementing global room numbers.
5386
5387 Sun Nov 15 20:32:34 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5388         * room_ops.c: mailbox rooms always appear on the main floor
5389         * made QR_MAILBOX rooms non-editable
5390         * cmd_setr() delete old room record when room name changes
5391           (This causes a big mess that exposes a flaw in the whole design.)
5392         * room_ops.c: users can delete messages from their mailboxes
5393
5394 Thu Nov 12 23:59:13 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5395         * Rewrote cmd_rchg() and also increased the size of the "fakename"
5396           buffer.  Overruns are probably what was causing the crashes.
5397         * Changed the way cmd_ent3() handles mail messages; the previous code
5398           rerouted all private mail to the trash.
5399
5400 Wed Nov 11 17:57:39 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5401         * citserver.c: slight changes to cmd_rchg() and cmd_hchg() [crashes]
5402         * citserver.c, msgbase.c, user_ops.c: hide the owner-prefix of mail
5403           rooms in a couple more places: set_wtmpsupp() and make_message()
5404         * sysdep.c: added an fflush() to lprintf() for "tail -f"-able logs
5405         * serv_expire.c: purge ops are now a command instead of a cleanup
5406           function.  This is probably temporary as well.
5407         * citadel.c: fixed the way <.WL> parses the returned data from a
5408           TIME command.
5409
5410 1998-11-11 Nathan Bryant <bryant@cs.usm.maine.edu>
5411         * serv_upgrade.c: fix uninitialized variable
5412
5413 Wed Nov 11 00:47:32 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5414         * msgbase.c: fixed a bug that was misrouting incoming network msgs
5415         * server.h, database.c: wrapped all GDBM calls in critical sections
5416           to avoid making those calls re-entrantly (gdbm fatal: lseek error)
5417
5418 1998-11-10 Nathan Bryant <bryant@cs.usm.maine.edu>
5419         * Makefile.in: link in snprintf.o where needed
5420
5421 1998-11-09 Nathan Bryant <bryant@cs.usm.maine.edu>
5422         * client_chat.c: eliminate calls to sprintf()
5423         * commands.h, routines.c, routines2.c: warning fix
5424         * commands.c, control.c, cux2ascii.c, file_ops.c, import.c,
5425           ipc_c_tcp.c: eliminate sprintf() calls
5426
5427 Mon Nov  9 19:15:31 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5428         * serv_upgrade.c: added all missing fields to export/import
5429         * serv_expire.c: support per-user purge time when purging users
5430         * user_ops.c: added per-user purge time to AGUP and ASUP commands
5431         * routines.c: added more stuff to <.A>ide <E>dit user
5432
5433 Sun Nov  8 22:56:53 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5434         * serv_expire.c: created; moved message expiry from serv_test.c,
5435           moved user purge from userpurge.c
5436         * userpurge.c: deleted
5437         * routines2.c: finished <.AS> command
5438         * room_ops.c: fixed Aide room access (for some reason, the Aide
5439           room had the QR_MAILBOX flag set)
5440
5441 1998-11-08 Nathan Bryant <bryant@cs.usm.maine.edu>
5442         * useradmin.c: really removed (cvs remove)
5443         * aidepost.c, citadel.c: convert all sprintf() calls to snprintf()
5444         * sysdep.c: fix overrun in lprintf() described by dme/Dead Monkey
5445         * citmail.c, citserver.c: convert all sprintf() call to snprintf()
5446
5447 Sun Nov  8 13:19:36 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5448         * useradmin.c: removed
5449         * utils.doc: removed references to useradmin and sysoputil
5450
5451 Fri Nov  6 20:22:20 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5452         * citadel.h (and related files): removed defunct parameters,
5453           c_defent and c_msgbase (erase your test bbs)
5454         * Implemented CONF server command for site-global configs
5455         * Shuffled yesno() and yesno_d() from routines.c to commands.c
5456         * commands.c: implemented boolprompt()
5457         * routines2.c: started adding CONF questions to <.AS> command
5458         * room_ops.c: began a fix for the mysterious disappearing Aide room
5459
5460 1998-11-05 Nathan Bryant <bryant@cs.usm.maine.edu>
5461         * snprintf.c: warning fix propagated over from gcit
5462
5463 1998-11-04 Nathan Bryant <bryant@cs.usm.maine.edu>
5464         * added RCS Id keyword strings to sources
5465         * citmail.c: reverted to version 1.10
5466
5467 Wed Nov  4 10:53:13 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5468         * messages.c: temporarily set screenwidth to a fixed value of 80
5469           during <P>rint operations.
5470
5471 Mon Nov  2 12:59:03 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5472         * setup.c: looks for 'citadel', 'bbs', or 'guest' in /etc/passwd to
5473           try to get a default for bbsuid if it's currently set to 0
5474         * citmail.c: changed usersupp.eternal to usersupp.usernum (why didn't
5475           it complain about this before?)
5476         * serv_upgrade.c: began writing an "export" command to do sidegrades
5477
5478 Sun Nov  1 18:47:42 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5479         * serv_upgrade.c: cosmetic changes
5480         * Implemented message expiry by date (this really needs to be moved
5481           out of serv_test.c, but where does it belong?)
5482
5483 1998-11-01 Nathan Bryant <bryant@cs.usm.maine.edu>
5484         * serv_upgrade.c: warning fixes
5485         * acconfig.h: remove ANSI_COLOR
5486         * Configure, Makefile.tmpl: removed
5487
5488 Sat Oct 31 20:48:44 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5489         * More stoopid ANSI colour additions here and there.
5490         * ANSI colour selection is now in citadel.rc instead of an option in
5491           the configure script.  "on" "off" and "auto" are available.
5492         * added "build.txt" to the techdoc directory, with LS's build notes
5493
5494 1998-10-31 Nathan Bryant <bryant@cs.usm.maine.edu>
5495         * citadel.c, commands.c, commands.h: set background color to black
5496           before clearing screen, so that we can actually see text on
5497           black-on-white xterms.
5498
5499 1998-10-29 Nathan Bryant <bryant@cs.usm.maine.edu>
5500         * rooms.c: fix color of Mail>
5501         * citadel.c: send ANSI detect sequence after attach_to_server() so the
5502           terminal doesn't send the answerback sequence to the shell if we
5503           can't connect.
5504
5505 Wed Oct 28 20:20:14 EST 1998 Art Cancro <ajc@uncensored.citadel.org
5506         * citadel.c: Added a splash of colour to the Wholist
5507
5508 1998-10-28 Nathan Bryant <bryant@cs.usm.maine.edu>
5509         * configure.in: added comments
5510         * mkinstalldirs: new file to be used for `make install'
5511         * aclocal.m4, missing: new files, also swiped from automake
5512         * citadel.c: don't mung the terminal if we can't find citadel.rc
5513         * Makefile.in: added `install' target, `clean' removes
5514           *.mo, rebuild configure when configure.in changes.
5515         * configure.in: check for install and autoconf
5516         * configure.in, Makefile.in: only pass -fPIC to gcc
5517         * policy.c: warning fix for OSF/1 (use memset() instead of bzero())
5518
5519 Tue Oct 27 22:25:42 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5520         * Unified the "unpacked database" format for both upgrades and
5521           sidegrades (also see export5.c elsewhere)
5522         * citserver.c: clear out cmdbuf before reading a command; some server
5523           commands were accidentally extracting parameters from previous cmds
5524         * rooms.c: removed the warning about the ineffectiveness of kicking
5525           users out of public rooms, because the new server can do lockouts
5526
5527 1998-10-27 Nathan Bryant <bryant@cs.usm.maine.edu>
5528         * sysdep.c (client_gets), ipc_c_tcp.c (serv_gets): improved handling
5529           of long lines. 
5530         * Makefile.in: partial support for VPATH builds, autodependency fix
5531
5532 Tue Oct 27 00:08:16 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5533         * minor documentation changes
5534
5535 Sun Oct 25 14:57:40 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
5536         * messages.c: fixed an oversight that was allowing attachments even
5537           when disabled in citadel.rc
5538
5539 1998-10-25 Nathan Bryant <bryant@cs.usm.maine.edu>
5540         * routines2.c: warning fix
5541
5542 Sat Oct 24 22:07:56 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5543         * Client: added message expiration policy questions to room edit
5544         * Client: added <.A>ide <S>ystem configuration command
5545
5546 1998-10-24 Nathan Bryant <bryant@cs.usm.maine.edu>
5547         * Makefile.in: Auto dependency generation (may require GNU make, but
5548           does at least function without this feature on OSF/1 make);
5549           Makefile is regenerated when Makefile.in changes (ditto);
5550           `realclean' is now known as `distclean';
5551           portability fixes for older Unix make utilities
5552         * citadel.c, citadel.h, commands.c: make client suspendable
5553
5554 Fri Oct 23 19:34:38 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5555         * setup.c: default node name is now obtained from uname()
5556         * config.c: added put_config()
5557         * policy.c: added, moved GetExpirePolicy() from room_ops.c
5558         * policy.c: implemented cmd_gpex() and cmd_spex()
5559
5560 Wed Oct 21 22:24:48 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5561         * Mail rooms now hide their owner-prefix from the client.
5562         * proxy.c: added configurability and primitive message expiry
5563
5564 1998-10-20 Nathan Bryant <bryant@cs.usm.maine.edu>
5565         * Makefile.tmpl: fix to build client with old Configure script
5566         * configure.in: autologin defaults to enabled if crypt() is available
5567         * room_ops.c: fix improper null-termination bug I introduced
5568
5569 Mon Oct 19 20:52:55 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5570         * Client ability to force display of prompts in Mail rooms, even when
5571           the user has prompting turned off (citadel.rc option)
5572
5573 1998-10-16 Nathan Bryant <bryant@cs.usm.maine.edu>
5574         * sysdep.c (cprintf): generate a newline on truncated buffer
5575         * room_ops.c: exploitable overrun fixes
5576
5577 Thu Oct 15 19:27:32 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5578         * msgbase.c: reimplemented cmd_move()
5579           room_ops.c: wrote AddMessageToRoom() which is used for both entering
5580           and moving messages.
5581         * setup.c: system-default message expire policy of "number of
5582           messages, 150" is now a default configuration instead of a temp hack
5583         * proxy.c: cache dir create now dies on any error except EEXIST
5584
5585 Wed Oct 14 22:41:16 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5586         * Misc code cleanup
5587
5588 1998-10-13 Nathan Bryant <bryant@cs.usm.maine.edu>
5589         * configure.in: don't check for -lcrypt unless autologin is enabled
5590         * file_ops.c: fix another overrun
5591
5592 Mon Oct 12 15:27:21 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5593         * Killed the "rooms" subdirectory (it isn't used anymore)
5594         * dynloader.c: Made dynamically added server commands case-insensitive
5595         * import.c is now serv_upgrade.c, a module
5596         * Removed most of the "level 9" trace messages no longer needed
5597
5598 1998-10-12 Nathan Bryant <bryant@cs.usm.maine.edu>
5599         * Makefile.in: simplified to use pattern rules; files compiled with
5600           -D_REENTRANT go to *.ro to allow the same files to be used with both
5601           client and server
5602         * tools.c, tools.h: new files; misc routines used by both client and
5603           server go here. contains safestrncpy() at the moment.
5604         * rooms.c: fix several exploitable buffer overruns
5605         * sysdep.c: fix infinite loop when long lines are received from the
5606           client; fix exploitable buffer overrun in cprintf()
5607         * ipc_c_tcp.c: fix infinite loop on long line from server
5608         * serv_upgrade.sh: remove uncnsrd-dependent absolute path
5609         * .cvsignore: add *.ro
5610
5611 Sun Oct 11 23:17:48 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5612         * Built some more of the message expiry infrastructure
5613
5614 1998-10-11 Nathan Bryant <bryant@cs.usm.maine.edu>
5615         * citserver.c: fix two more overruns, one of which was preventing
5616           the "From Host" from showing up in the <W>ho listing.
5617
5618 Sun Oct 11 02:51:55 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5619         * Moved "struct visit" and its associated defs from citadel.h to
5620           server.h where they belong
5621         * Set up data structures for room policies (expiry, etc.)
5622
5623 1998-10-10 Nathan Bryant <bryant@cs.usm.maine.edu>
5624         * citserver.c: fix overrun which caused segv's on servers with long
5625           hostnames.
5626
5627 Fri Oct  9 18:34:06 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5628         * user_ops.c: added PurgeStaleRelationships() to do processing at
5629           session logout time to remove visits for rooms which no longer exist
5630         * user_ops.c: implemented NewMailCount()
5631
5632 1998-10-09 Nathan Bryant <bryant@cs.usm.maine.edu>
5633         * serv_chat.c: fix buffer overrun that was resulting in segv's
5634         * serv_chat.c: fix another overrun that could cause sessions to hang,
5635           and cleaned up some other strncpy()-related stuff. DON'T FORGET TO
5636           NULL-TERMINATE DESTINATION BUFFERS AFTER STRNCPY CALLS.
5637
5638 Fri Oct  9 13:22:37 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5639         * Implemented "lazy mode" traversal - pressing the space bar will do
5640           <N>ext messsage, <G>oto next room, or read <N>ew as appropriate.
5641         * room_ops.c: modify CtdlRoomAccess() to allow access to mailbox rooms
5642           only to their owners.
5643
5644 Thu Oct  8 17:13:27 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5645         * messages.c, citadel.rc: added the ability to display message numbers
5646           in the header when reading messages.  I think this is butt ugly, but
5647           some of the DaveCode afficionados seem to like it...
5648
5649 Thu Oct  8 15:34:45 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5650         * room_ops.c: Added is_noneditable() function to replace all of the
5651           duplicated code present in all functions which edit room parameters.
5652
5653 1998-10-08 Nathan Bryant <bryant@cs.usm.maine.edu>
5654         * lots of warning fixes; builds with -std1 on dec unix
5655         * aidepost.c, citadel.h, citmail.c, file_ops.c, msgbase.c, netmailer.c,
5656           netproc.c, rcit.c, server.h, stats.c, userlist.c: use time_t where
5657           needed
5658         * control.c, room_ops.c, serv_chat.c, sysdep.c: use memset() instead of
5659           bzero()
5660         * dynloader.c, dynloader.h, messages.c, server.h, sysdep.c,
5661           sysdep_decls.h: function pointer/prototyping fixes
5662         * rooms.c: use mkfifo(3) instead of system("mkfifo")
5663
5664 1998-10-07 Nathan Bryant <bryant@cs.usm.maine.edu>
5665         * snprintf.c, snprintf.h: new files
5666         * Makefile.in, configure.in, dynloader.c, sysdep.c: support for the
5667           above; citserver now builds and runs on Digital Unix 4.0d with the
5668           GNU-style configure script. there is a bug with the hostname display
5669           in the wholist.
5670         * netproc.c: sillyness fix
5671         * room_ops.h: prototype delete_room()
5672         * client_chat.c, commands.c, serv_chat.c, sysdep.c:
5673           use HAVE_SYS_SELECT_H macro
5674
5675 Mon Oct  5 17:01:32 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5676         * Began fixing the stuff I broke
5677
5678 Sun Oct  4 23:35:18 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5679         * Did the big migration to the new data structures.  Lots of stuff is
5680           now broken.  Basic moving from room to room works, but Mail is
5681           broken, and some of the administrative commands are unimplemented.
5682
5683 1998-10-02 Nathan Bryant <bryant@cs.usm.maine.edu>
5684         * configure.in: autologin now defaults to disabled
5685
5686 Fri Oct  2 00:04:31 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5687         * Finally removed all three usersupp.foo[MAXROOMS] elements, and
5688           migrated all the code that used them to use "struct visit" instead.
5689
5690 Thu Oct  1 23:02:20 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5691         * Rewrote [l][get|put]room() functions to use room names rather than
5692           room index numbers.  Temporarily prepended a "n" to these four
5693           function names until they are put to use.
5694
5695 Thu Oct  1 16:27:13 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5696         * Removed a few more references to usersupp.lastseen[]
5697
5698 1998-10-01 Nathan Bryant <bryant@cs.usm.maine.edu>
5699         * .cvsignore: add so_locations (generated by osf1 ld with shared libs)
5700         * Makefile.in: restructured variables for greater consistency, use
5701           @echo to print out notices during the make process, add so_locations
5702           to `cleaner'
5703         * configure.in, Makefile.in: configure checks for -rdynamic
5704         * ipc_c_tcp.c: fix DEC compiler warning wrt unsigned char
5705         * stats.c: add semicolon to placate DREC compiler
5706         * user_ops.c: define _POSIX_C_SOURCE, include <limits.h>
5707         * configure.in: pass -pthread to DEC compiler, don't check for
5708           libpthread[s] on DEC Unix
5709
5710 1998-09-30 Nathan Bryant <bryant@cs.usm.maine.edu>
5711         * Makefile.in: new variable PTHREAD_DEFS for portability
5712         * aidepost.c, citadel.c, citmail.c, mailinglist.c, msgform.c,
5713           netmailer.c, netpoll.c, netproc.c, rcit.c, readlog.c, setup.c,
5714           stats.c, userlist.c, whobbs.c: return type of main() is int
5715         * citadel.c, commands.c, messages.c: use time_t properly
5716         * citserver.c: include <limits.h>
5717         * config.guess, config.sub, install-sh: new files
5718         * configure.in: don't use gcc on Digital Unix
5719
5720 Tue Sep 29 23:17:34 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5721         * room_ops.c: modified usergoto() to look at the new data structures
5722           for counting new messages and such.
5723
5724 1998-09-29 Nathan Bryant <bryant@cs.usm.maine.edu>
5725         * user_ops.c: fix compiler warning and potential memory leak,
5726           include sysdep.h
5727         * configure.in, Makefile.in: only build the server if we find pthreads
5728         * Makefile.in: realclean removes config.{cache,log,status}
5729
5730 Tue Sep 29 13:20:14 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5731         * Removed code from some of the utilities which was still attempting
5732           to access the old non-gdbm data store.
5733         * housekeeping.c: rewrote check_ref_counts() to do a ForEachRoom()
5734           traversal instead of a MAXROOMS loop.
5735         * sysdep.c: set up a dummy CitContext record to be used during server
5736           startup, during which time there is no real context.
5737
5738 Mon Sep 28 23:51:51 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5739         * Implemented the function ForEachRoom() to handle all-rooms traversal
5740           (this will work with both the old and new paradigms, because both
5741           use a GDBM database with one room per record).  Migrated all room
5742           list commands to use it.
5743
5744 Mon Sep 28 22:05:35 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5745         * Implemented the function CtdlRoomAccess() to handle *all* of the
5746           user-access-to-rooms functionality.  Migrated all room list commands
5747           to use it.  Still need to migrate gotos.
5748
5749 1998-09-28 Nathan Bryant <bryant@cs.usm.maine.edu>
5750         * configure.in, acconfig.h: new files; partially functional GNU
5751           autoconf configure script. Run autoheader; autoconf; ./configure
5752           --prefix=`pwd` to test.
5753         * Makefile.tmpl: new file; this is what Makefile.in used to be. Used by
5754           Configure.
5755         * Makefile.in: modified to work with autoconf-style configure script
5756         * Configure: modified to use Makefile.tmpl and generate autoconf-style
5757           macros. Removed procfs detection. Pass -O2 to gcc, -O to other
5758           compilers. Removed mknod/mkfifo detection; code should use mkfifo(3).
5759         * citmail.c, msgform.c, netproc.c, routines.c, support.c, userlist.c,
5760           whobbs.c: use HAVE_STRERROR macro rather than NO_STRERROR
5761         * commands.c: use HAVE_TERMIOS_H macro rather than POSIX_TERMIO
5762         * netproc.c: remove procfs stuff. simply attempt to kill the target
5763           process with signal zero instead; this checks whether the process
5764           exists.
5765         * setup.c, useradmin.c: use HAVE_CURSES_H macro
5766
5767 Sun Sep 27 23:41:29 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5768         * BOTH the old and new generation systems are being written to at
5769           this point.  Code that reads stuff is still using the old system.
5770
5771 Sun Sep 27 16:10:49 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5772         * Changed all "generation" variables from char to long, in preparation
5773           for removing MAXROOMS.  Generations for new rooms are now timestamps.
5774         * Defined "struct visit" to hold user/room relationships.
5775         * Removed some #define's from citadel.h that are no longer used.
5776
5777 Wed Sep 23 13:41:49 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5778         * More changes to support attachments.  They mostly work, but only
5779           in fixed-format messages.
5780
5781 Mon Sep 21 21:19:17 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5782         * msgbase.c: began laying the groundwork to support attachments.
5783           Purchased Rogaine(tm) in preparation for expected hair loss.
5784
5785 1998-09-21 Nathan Bryant <bryant@cs.usm.maine.edu>
5786         * msgbase.c: include dynloader.h
5787         * citadelapi.h: removed
5788         * dynloader.h: prototype CtdlRegisterUserHook()
5789
5790 Sun Sep 20 18:56:37 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5791         * Added a UserFunctionHook category to implement hooks which perform
5792           operations on various users or usernames
5793
5794 Fri Sep 18 21:14:41 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5795         * citserver.c: removed cmd_extn() and related code
5796
5797 1998-09-18 Nathan Bryant <bryant@cs.usm.maine.edu>
5798         * user_ops.c: include dynloader.h
5799         * roomstats.{c,mk}: removed
5800         * Configure, Makefile.in: autodependency-related fixes
5801
5802 Thu Sep 17 22:55:29 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5803         * Various changes to allow "new messages" to work correctly with Mail
5804
5805 Thu Sep 17 22:21:45 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5806         * server.h, dynloader.c, citserver.c, user_ops.c: reduced the number
5807           of hook types by inventing an EventType field to the Session hook.
5808         * proxy.c: added pre-fetching
5809
5810 1998-09-17 Nathan Bryant <bryant@cs.usm.maine.edu>
5811         * Makefile.in: add SERV_MODULES and PROXY_TARGETS to `cleaner'
5812         * dynloader.[ch], serv_{chat,test}.[ch], sysdep.c: cleaned
5813           up the dynamic loader interface as follows:
5814           - all the symbol table stuff is gone.
5815           - modules are loaded once at server startup and never unloaded.
5816           - Added a new function CtdlRegisterProtoHook() to handle the stuff
5817             that was being done with the symbol tables.
5818           - Dynamic_Module_Init() now returns a pointer to a static struct
5819             DLModule_Info; this structure itself has been modified to use char*
5820             fields instead of fixed char arrays.
5821         * roomstats.c: include <stdarg.h> not <stdargs.h> (is this file still
5822           in use?)
5823         * Configure, Makefile.in: added autodependency support
5824
5825 Wed Sep 16 22:25:13 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5826         * Implemented separate structs, lists, and functions for each type
5827           of server-side hook available.
5828
5829 1998-09-16 Nathan Bryant <bryant@cs.usm.maine.edu>
5830         * ipc_c_tcp.c: Fixed up some #include/prototyping stuff, call memcpy()
5831           instead of bcopy()
5832         * hooks.h: removed
5833         * sysdep.c, user_ops.c: removed reference to hooks.h
5834
5835 Wed Sep 16 11:42:42 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5836         * ipc_c_tcp.c: Reversed any changes that have been made to this file,
5837           because something was causing abominally slow response time.
5838         * proxy.c: added.  This will eventually become a caching, pre-fetching
5839           multiuser proxy server for the Citadel protocol.
5840
5841 1998-09-15 Nathan Bryant <bryant@cs.usm.maine.edu>
5842         * Makefile.in: remove support.o from serv_chat.so, add -fPIC to compile
5843           flags for serv_chat.o
5844         * dynloader.c: include "sysdep_decls.h", use RTLD_NOW not RTLD_LAZY
5845         * dynloader.h: prototype CtdlRegisterHook()
5846         * .cvsignore: added data
5847
5848 Mon Sep 14 20:49:08 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5849         * Tried my hand at adding the ability for server extensions to
5850           register various types of "hooks" in addition to just adding
5851           server commands.  This is probably not final.
5852
5853 Tue Sep  8 12:11:56 EDT 1998 Brian Costello <btx@calyx.net>
5854         * Added support for dynamic server modules.  Reworked serv_chat.c
5855           to be such a module.
5856
5857 Tue Sep  1 23:09:50 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5858         * userpurge.c: rewrote using functions from the server core, rather
5859           than the now-defunct external API.  This'll be ready once the module
5860           loading code is done.  (I just had to commit _something_ tonight.)
5861
5862 Mon Aug 31 22:47:58 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5863         * Yanked the citadelapi.c module.  This wasn't working out well.
5864         * techdocs/citadelapi.txt - began documenting the new API to be used
5865           by modules which will be dynamic linked into the server - most of
5866           this API is existing server functions.
5867         * Added a ForEachUser() function with callback mechanism, and reworked
5868           cmd_list() to use it.
5869
5870 Sun Aug 30 21:52:43 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5871         * Moved all of the gdbm databases to a separate "data" directory.
5872
5873 1998-08-26 Nathan Bryant <bryant@cs.usm.maine.edu>
5874         * Makefile.in: realclean removes Makefile, fixed `touch citadel.h'
5875           problem
5876
5877 1998-08-25 Nathan Bryant <bryant@cs.usm.maine.edu>
5878         * room_ops.c: include time.h
5879         * userlist.c, whobbs.c, serv_chat.c, user_ops.c, sysdep.c, stats.c,
5880           citadel_decls.h, commands.c, messages.h, routines.h, routines2.h:
5881           remove duplicated declarations
5882
5883 Mon Aug 24 23:45:01 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5884         * setup.c: Removed yesno_s()
5885         * citadel.h, room_ops.c: added QRmtime field to struct quickroom,
5886           modified whenever a room is modified or posted in.
5887         * citadelapi.c: Added CtdlForEachRoom() function
5888
5889 Mon Aug 24 20:04:04 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5890         * Makefile.in: new target `cleaner' does the same as `realclean' 
5891           without removing sysdep.h
5892         * proto.h: is bad. eliminate. I've moved the prototypes into several
5893           header files, one per .c file
5894
5895 Mon Aug 24 00:45:55 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5896         * Added a CtdlGotoRoom() function to the CitadelAPI.
5897  
5898 Sun Aug 23 21:47:00 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5899         * sysoputil is finally dead!  Removed it from the build.
5900         * Added userpurge.c server extension (initial implementation)
5901
5902 Tue Aug 18 00:42:33 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5903         * Makefile.in: `clean' target no longer rm's sysdep.h; new target
5904           `realclean' removes everything clean does, plus sysdep.h, plus
5905           target binaries.
5906         * Configure: add -Wstrict-prototypes to CFLAGS for gcc systems
5907         * *.[ch]: protoized. Added several new header files containing
5908           prototypes and other external declarations; many duplicated
5909           declarations still should be moved to header files. proto.h must die
5910           as well, IMHO.
5911
5912 Mon Aug 17 23:52:13 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5913         * Implemented a bunch of user account related functions in the
5914           CitadelAPI library.
5915
5916 Mon Aug 17 20:01:18 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5917         * Fixed the crash problem.  It wasn't AGUP/ASUP, but rather a buffer
5918           overrun in getuser() (thanks, Nathan).  Implemented overrun checks
5919           in getuser(), getroom(), and getfloor() to prevent future problems.
5920
5921 Mon Aug 17 00:06:52 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5922         * Updated citmail.c with the latest stuff from the production system.
5923         * Implemented AGUP and ASUP commands, but AGUP crashes the server
5924           after its first successful use (user-not-found's don't affect it).
5925
5926 Thu Aug  6 19:25:01 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5927         * Got the CitadelAPI library to the point where the server can start
5928           up an extension, and the extension will connect to the server, do
5929           some initialization, call a user-supplied CtdlMain(), and exit.  Also
5930           hacked together a _temporary_ form of the new EXTN server command.
5931  
5932 Wed Aug  5 23:02:22 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5933         * Second attempt at getting the server API started.  Now it runs
5934           outside of the server and builds a connection.
5935
5936 Tue Aug  4 18:33:06 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5937         * Modified the appearance of Internet addresses when they arrive on
5938           a Citadel system.
5939         * Removed the <E> field from the message format writeup in hack.txt.
5940         * Fixed-up citmail.c so that it doesn't try to do database lookups.
5941
5942 Mon Aug  3 23:01:37 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5943         * Started developing the server-side API.  This is in its very
5944           initial stages.  See serverapi.c and techdoc/api.txt
5945
5946 1998-08-02  Nathan Bryant  <bryant@cs.usm.maine.edu>
5947         * Makefile.in: added config_decls.h to dependencies
5948
5949 Sun Aug  2 21:09:09 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5950         * config_defs.h: renamed to config_decls.h
5951         * config.c, sysoputil.c: updated to reflect the above
5952
5953 Sun Aug  2 18:52:05 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5954         * config_defs.h: new file, contains external declarations from config.c
5955         * config.c: moved defs to config_defs.h, use PATH_MAX from <limits.h>
5956           for bbs_home_directory
5957         * mailinglist.c, support.c: include <string.h>
5958         * sysoputil.c: include <string.h>, <limits.h>, "config_defs.h", remove
5959           duplicated defs, replace gets() call with fgets()
5960         * user_ops.c: define _XOPEN_SOURCE_EXTENDED
5961
5962 Sat Aug  1 18:32:52 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5963         * ipc_c_tcp.c: fixed order of memcpy parameters after gethostbyname
5964
5965 Sun Jul 19 17:26:12 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5966         * ChangeLog: reordered; the GNU standard is to add new entries to the
5967           top.
5968         * .cvsignore: added userlist
5969
5970 Sun Jul 12 20:58:59 EDT 1998 Art Cancro <ajc@uncensored.citadel.org>
5971         * Finished migrating everything to the new data store.
5972         * Replaced the binary "calllog" with the ASCII "citadel.log"
5973         * Began converting broken utilities that depend on the old data store
5974
5975 Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
5976         * Makefile.in: removed msgstats
5977
5978 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
5979         * Initial CVS import