home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mm / test / notes-fdc.txt < prev   
Text File  |  2020-01-01  |  45KB  |  1,143 lines

  1. MM edit history - Frank da Cruz <fdc@columbia.edu>
  2.  
  3. Beginning with MM-0.90.4 (Notes are chronological, newest stuff at the bottom).
  4.  
  5. Warning: Includes learning experiences and false starts.
  6.  
  7. ------------------------------
  8. Wed Jan  9 19:42:31 2002
  9.  
  10. Short story: I added some code to MM to address the truncating problem
  11. that occurs when you edit an outgoing message, save the result, and
  12. exit from the editor.
  13.  
  14. Long version:
  15.  
  16. I spoke with Melissa about MM and found out where the latest (patched) 
  17. sources were:
  18.  
  19.   /src/acis/ccmd/src
  20.   /src/acis/mm/obj/solaris25
  21.  
  22. I made an ~fdc/mm/ directory on prost with mm and ccmd subdirectories.
  23. Copied all the files from the /src tree.  Checked that they built OK; in
  24. ~/mm/ccmd:
  25.  
  26.   make solaris
  27.  
  28. In ~/mm/mm (it looks to me like the current Makefile unconditionally defines
  29. SOLARIS?):
  30.  
  31.   make
  32.  
  33. This makes an MM 0.90.4(xx) binary:
  34.  
  35.   Columbia MM, version 0.90.4(24)
  36.   Copyright (c) 1986, 1990
  37.       The Trustees of Columbia University in the City of New York
  38.   Compiled by fdc@watsol on 9 Jan 2002 6:16pm
  39.   Report bugs to bug-mm
  40.   
  41. Now the truncating problem: The editor is run by mm_execute() in exit.c,
  42. which is just a fork() and execvp().  Then the upper fork calls
  43. wait_for_process(pid), which calls do_wait(pid, true), where "true"
  44. means "blocking".  do_wait() might need looking at but first assume it
  45. works as advertised.  Where is Howie's sleep()?  Nowhere.
  46.  
  47. I added an msleep() (millisecond sleep) routine to datime.c, for Solaris
  48. only.  Uses select().  Builds without complaint.
  49.  
  50. Then I added a chk_edit(filename) routine to edit.c, which sleeps for
  51. half a second and then in a loop, gets the size of the filename,
  52. compares it with the previous size, and if they are not equal, sleeps
  53. for 1/10 second and tries again, up to 25 times.  If, after 25
  54. iterations, the size still doesn't settle down, or some other bad thing
  55. happens, chk_edit() returns < 1.
  56.  
  57. Then I found all the places in edit.c where mm_execute() is called with
  58. editor[0], and after each of these, I called chk_edit() on the temp file.
  59. If chk_edit() returns < 1, we set a trouble flag, which is supposed to
  60. inhibit deletion of the temp file.
  61.  
  62. The very first time I tried it, I caught it in the act:
  63.  
  64.   (Exit from EMACS here)
  65.   /p/kd/fdc/.mm-outgoing.25233: 0 6263 (BAD)
  66.   /p/kd/fdc/.mm-outgoing.25233: 6263 6263 (OK)
  67.   S>
  68.  
  69. This seems to exonerate wait_for_process() (e.g. of killing EMACS
  70. prematurely).  The messages won't appear unless there is at least one
  71. size mismatch.  If the size doesn't settle down after 3 seconds (500
  72. msec + 25 x 100 msec), it prints "Possible problem with edit, temp file
  73. saved: " and the filename.
  74.  
  75. I didn't notice any kind of edit history file, but a copy of this message
  76. is in ~fdc/mm/NOTES.fdc.
  77.  
  78. I'll be the guinea pig, feel free to join in; time will tell.
  79.  
  80. - Frank
  81.  
  82. P.S. The fact that the BUG command puts "SunOS" in the Bug-Report:
  83. header doesn't really mean SunOS -- the Solaris versions really are
  84. compiled for Solaris, but the real name of Solaris is SunOS.
  85.  
  86. P.P.S. This message itself was truncated when I exited from EMACS, but
  87. the new code fixed it automatically.
  88.  
  89. P.P.P.S. Melissa or Postmaster, I guess you can add me to the bug-mm list :-)
  90.  
  91. ------------------------------
  92.  
  93. Date: Thu, 10 Jan 2002 9:40:01 EST
  94. From: Melissa Metz <melissa@columbia.edu>
  95. To: Frank da Cruz <fdc@columbia.edu>
  96. Cc: bug-mm@columbia.edu, kermites@columbia.edu, unixsys@columbia.edu,
  97.         postmaster@columbia.edu, Vace Kundakci <vace@columbia.edu>,
  98.         Walter Bourne <walter@columbia.edu>
  99. Subject: Re: MM truncating problem maybe fixed?
  100. In-Reply-To: Your message of Wed, 9 Jan 2002 20:20:27 EST
  101. Message-ID: <CMM.0.90.4.1010673601.melissa@broccoli>
  102.  
  103. Cool.  
  104.  
  105. > I didn't notice any kind of edit history file, but a copy of this
  106. > message is in ~/mm/NOTES.fdc.
  107.  
  108. We kept track of the edit histories in RCS.  e.g. cd /src/acis/mm/src,
  109. co -l edit.c, <edit>, ci -u datime.c, <type in comment>.  The comment
  110. can be as long as you like; you can use "ci -u edit.c <filename" to
  111. include a file.
  112.  
  113. I'll put your version up in a couple of days.  But let's get your
  114. changes into the /src tree first :-).
  115.  
  116. > P.S. The fact that the BUG command puts "SunOS" in the Bug-Report:
  117. > header doesn't really mean SunOS -- the Solaris versions really are
  118. > compiled for Solaris, but the real name of Solaris is SunOS.
  119.  
  120. Right, uname also reflects the name SunOS.  Sun claims that Solaris is
  121. the whole operating system and all applications, while SunOS is just
  122. the kernel.
  123.                                         --Melissa
  124. ------------------------------
  125. Thu Jan 10 09:24:55 2002
  126.  
  127. Various refinements and tuning, #ifdef adjustment, message improvement, etc.
  128.  
  129. The main impact of these changes is (a) there is always at least a 500-msec
  130. delay after returning from EMACS, and (b) if you return from EMACS with an
  131. empty file, there's a longer delay because MM has no way of knowing if the
  132. file is empty because it hasn't been written yet (this has happened to me
  133. many times), or because you really saved an empty file.
  134.  
  135. read_from_temp(), which is called after every editor invocation, executes an
  136. fsync() on the file to forestall truncation, but doesn't.  I suspect fsync()
  137. has no effect on a file open with O_RDONLY.  The Solaris 2.5.1 man page
  138. suggests as much:
  139.  
  140.   ERRORS
  141.      EBADF: fildes is not a valid file descriptor open for writing.
  142.  
  143. although in Solaris 2.5.1 fsync() on a read-only file returns 0 and does not
  144. set errno.  The Solaris 8 man page, on the other hand, says "EBADF: The fildes
  145. argument is not a valid file descriptor".  I wonder if EMACS does an fsync(),
  146. and if it does, how can MM be reading partial files?
  147.  
  148. ------------------------------
  149. Sat Jan 12 15:25:07 2002
  150.  
  151. At some point in the last few years, MM started adding a blank line to the end
  152. of every message after returning from the editor.  Off-by-one bug at the end
  153. of read_from_temp(), fixed in edit.c.
  154.  
  155. Changed copyright date from "1986, 1990" to "1986, 2002".  This makes it a bit
  156. more obvious that it is being maintained, handles Y2K, etc.  I made this
  157. change only in misc.c to keep the differences small.
  158.  
  159. ------------------------------
  160. Sun Jan 13 11:34:11 2002
  161.  
  162. Changed #ifdefs around new code from #ifdef SOLARIS to
  163. #if defined(BSD) || defined(_AIX) || defined(SVR4), since (a) this is what
  164. is used for dttzone(), which depends on the same struct definitions (timeval
  165. and timezone) and functions (gettimeofday()), and (b) to include SunOS, which
  166. also has/had the truncating problem.  datime.c, edit.c.
  167.  
  168. But surprisingly, this did not pick up Solaris -- I assumed that defining
  169. SOLARIS would imply SVR4 but it doesn't, so I changed the #ifdefs for the
  170. new code to:
  171.  
  172.   #if defined(BSD)  || defined(SOLARIS) || defined(SVR4) || defined(_AIX)
  173.  
  174. But I did not change the #ifdefs around dttzone().  datime.c, edit.c.
  175.  
  176. Tried building for SunOS:
  177.   ccmd: "make clean; make sun" failed at link time, but then worked if I
  178.     manually deleted ccmd.a, test.o, and skel.o and did "make sun" again.
  179.   mm: "make clean; make" fails because of the hardwired SOLARIS definition
  180.     in Makefile.  Copied the Makefile out of /src/acis/mm/obj/sunos41 and
  181.     used that instead and mm build ok.
  182.  
  183. Tried building for Solaris 8 on newcunix in /p/kd/fdc/mm/solaris8/:
  184.   ccmd: "make clean; rm -f ccmd.a test.o skel.o; make solaris" (ok)
  185.   mm:   "make clean; make" (ok)
  186.  
  187. Tried building for HP-UX 11.20 but it bombed right away with undefined
  188. symbols.  Didn't try fixing or building on AIX or anywhere else.
  189.  
  190. In heavy testing and real use of MM over the past several days, I have not
  191. experienced a single truncation (normally I have 3-4 per day).  However, after
  192. rearranging the code on Thursday, I also have not seen a single instance of
  193. the file size changing.  The 500-msec pause appears to be sufficient, but the
  194. subsequent size-checking loop is still there as a precaution (e.g. for high
  195. load, memory full, swap-space low).
  196.  
  197. I'd suggest the MM version number be bumped up and the new source replace
  198. the old source on the public FTP server.
  199.  
  200. ------------------------------
  201. Other things on my list:
  202.  
  203. Maybe add a SET command to enable/disable chk_edit() since most people
  204. don't need it.
  205.  
  206. Check and enable or fill in msleep() for other platforms.
  207.  
  208. Character sets, when sending a message [done, see below]:
  209.  
  210.  . Don't strip 8th bit from text (what is 8th bit used for now?)
  211.  . SET CHARACTER-SET <keyword> (default US-ASCII), SHOW CHARACTER-SET
  212.  . Add header: Content-Type: text/plain; charset="iso-8859-1" or whatever.
  213.  . Add header: Content-Transfer-Encoding: 7bit (or 8bit) according to charset.
  214.  . Add header: MIME-version <-- get right syntax.
  215.  
  216. MM shouldn't "do" anything with character sets, just let the user declare
  217. which one is used in the outbound message and not strip the 8th bit from text,
  218. Subject, or other header data characters.  The SET CHARACTER-SET command would
  219. take a keyword list of MIME charset names for only those MIME charsets that
  220. are also international standard sets (i.e. ISO registered), since it's impolite
  221. and antisocial to send email in proprietary character sets; an internal table
  222. tells whether each one is 7bit or 8bit.  The commands and headers are easy,
  223. but figuring how to undo whatever is currently done with the 8th bit is hard.
  224.  
  225. Slightly more ambitious tasks:
  226.  
  227.  . Add switches (cmswi()) to some of the commands; for example:
  228.    COPY /APPEND /REPLACE /BODY-ONLY
  229.  
  230.  . COPY and MOVE to pipelines.
  231.  
  232.  . Hooks to Kermit, e.g. COPY /DOWNLOAD [done, see below]
  233.  
  234.  . Allow definition of macros
  235.  
  236.  . Allow macros to accept parameters
  237.  
  238.  . Case-sensitive text searches.
  239.  
  240.  . Pattern or regexp text searches.
  241.  
  242.  . Devise a way of accomplishing OR in message selection; currently
  243.    conditions are all connected by implied ANDs.  This would also
  244.    require syntax for grouping.
  245.  
  246.  . Add an option that tells MM, when it reads a message and finds a
  247.    charset header, to send the corresponding ISO 2022 escape sequence
  248.    to switch the terminal into the character set used by the message or,
  249.    if there is no charset header, to switch it back into its prevailing
  250.    charset (such as Latin-1).  Of course this can work only with standard
  251.    ISO-registered character sets, not with (e.g.) Windows code pages or
  252.    random MIME charsets, and only with ISO-2022 / ANSI X3.64 compliant
  253.    terminals (e.g. VT220 or 320).
  254.  
  255. The latter would require MM to have to several distinct charset settings:
  256.  
  257.  . The default (global) charset for sending 
  258.  
  259.  . The default charset for reading (when message doesn't specify one)
  260.  
  261.  . A way to send a message with a given charset without affecting the
  262.    global one (e.g. SEND /CHARACTER-SET:blah).
  263.  
  264.  . A way to tell MM, when replying, whether to automatically choose
  265.    the same charset as the original message (again, without affecting
  266.    the global outbound charset), e.g. REPLY /SAME-CHARSET or something,
  267.    plus a global setting for whether this should be the default.
  268.  
  269. Also:
  270.  
  271.  . Consolidate the many makefiles and make a master makefile that builds
  272.    both ccmd and mm [done, see below].
  273.  
  274.  . Clean up compiler warnings [mostly done].
  275.  
  276.  . Check/update/fix ports to HP-UX, AIX, FreeBSD, etc.
  277.  
  278. Definitely NOT on my list:
  279.  
  280.  . Enclosures (if I want this I'll use another mail client!)
  281.  . Desktop metaphors (folders, in-boxes, address books, "My New Messages",
  282.    "My Favorite Friends", etc -- fooey, ditto!)
  283.  
  284. ------------------------------
  285. Wed Jan 16 13:12:29 2002
  286.  
  287. A message was lost -- first time in nearly week.  I was replying to a message
  288. and editing the reply.  I was typing really fast, including the ^X^S^X^C to
  289. save and exit EMACS.  In this case the MM S> prompt appeared immediately, with
  290. no 0.5sec pause.  Therefore there must be a path thru the code in which
  291. chk_edit() is not called.  (Later the same day several more messages were
  292. truncated; same deal: no pause.)
  293.  
  294. ------------------------------
  295. Wed Jan 23 14:02:56 2002
  296.  
  297. A reply was totally lost -- 0 bytes -- but this time MM paused for the
  298. full 3 seconds.
  299.  
  300. ------------------------------
  301. Sun Feb  3 11:20:12 2002
  302.  
  303. IDEA: add SET TMPDIR to allow temp files to be written on a local disk.
  304. e.g. "set tmpdir /tmp/fdc".  Create it if it doesn't exist.  Give it 600
  305. perms.  But what if it does exist and is not owned by the MM user?  Give
  306. an error message.  Give all temp files mode 600 on open.
  307.  
  308. ------------------------------
  309. Mon Feb  4 16:53:13 2002
  310.  
  311. Many composed messages & replies lost.  A big problem is that MM always
  312. deletes the .mm-xxx tmp file after reading it in (unless it *knows* there's
  313. a problem).  Not deleting it would at least let us get it back but then:
  314. (a) successive messages use the same filename (.mm-outgoing-<pid>), and (b)
  315. when *would* we delete them?  <-- When MM EXITs.
  316.  
  317. ------------------------------
  318. Mon Apr 15 16:20:53 2002
  319.  
  320. Built Ken Harrenstein's updated version (see KLH.NOTES) and started running
  321. it in debug mode ("make fdc-solaris").  It built fine on Solaris, works fine
  322. so far.  When exiting from EMACS, we always get the debug message: "wait3
  323. errno 2" (no such file or directory).  Looked through sources again for any
  324. invocations of the editor that do not call chk_edit() afterwards; didn't find
  325. any.  Added more debugging statements.
  326.  
  327. ------------------------------
  328. Tue May 14 11:54:37 2002
  329.  
  330. Melissa was getting more truncations.  Replaced the version of
  331. read_from_temp() that does calloc() and then (potentially) a bunch of
  332. rmallocs() with the original simple version that does just one malloc(), and
  333. added debugging after every operation.  Suspicion: read() and malloc() take
  334. an int, but the old code was calling it with sbuf.st_size, which is long.
  335. Changed the code to (a) convert the long to an int, (b) check that (long) of
  336. the int is equal to the original long, and then (c) to use the int in all
  337. the malloc() and read() calls.
  338.  
  339. ------------------------------
  340. Thu May 16 19:20:52 2002
  341.  
  342. Melissa was still getting truncations.  The messages indicated that
  343. everything in read_from_temp() was working right.  But upon return the
  344. message is empty.  That means that the pointer to the message is not being
  345. returned right.  Aha.  The last statement in read_from_temp() is
  346. return(newtext).  But newtext is on the stack; made it static (it shouldn't
  347. matter but you never know).  Added debugging checks and messages to
  348. read_from_temp()'s callers.
  349.  
  350. ------------------------------
  351. Tue May 21 17:44:21 2002
  352.  
  353. Replying to message, entered EMACS, edited the reply, exited EMACS, debugging
  354. messages showed everything normal, yet the message was truncated to 0 bytes.
  355. There should be NO path through the code where that can happen without a
  356. message.
  357.  
  358. At this point we still have two problem cases:
  359.  
  360.  1. Debugging messages all come out normal, but file is stil truncated.
  361.  2. There are no debugging messages at all, and file is truncated.
  362.  
  363. ------------------------
  364. Sun Jul 21 15:15:47 2002
  365.  
  366. Fixed stupid debugging message for empty temp file:
  367.   Text length mismatch [gnuemacs_edit_outgoing]: 0 != 0.
  368.  
  369. Added more debugging messages, including a message when a missing final
  370. terminator is supplied in case this correlates with truncation.  edit.c.
  371.  
  372. Added "set user-temp-files-keep" (keyword chosen so it goes at end of list,
  373. since it wasn't clear to me how to insert a new keyword -- do I have to change
  374. all the #defines in set.h?).  Made the default for this "yes" if FDC_EDITFIX
  375. is defined, since otherwise what good is it?  set.h, set.c, extern.h.
  376.  
  377. Filled in action for "set user-temp-files-keep yes" -- just check the boolean
  378. variable for this setting in purge() and change all open()s for temporary
  379. files to include O_TRUNC (since we keep recycling the same name).  Then in
  380. cmd_quit(), delete the temp files (i.e. when user says BYE or QUIT).  Thus
  381. after editing a message, the temp files stay around until the next time you
  382. enter the editor from within MM, or you (really) exit from MM, so now if any
  383. message is truncated after editing, you can get it back from the temp file --
  384. and if the temp file itself is truncated, we know it's the editor's fault and
  385. not MM's.  edit.c.
  386.  
  387. ------------------------
  388. Fri Sep 13 16:06:03 2002
  389.  
  390. Enclosed all verbose debugging messages in edit.c in #ifdef VERBOSE_MESSAGES
  391. except "Temp file kept: <name>" in gnuemacs_edit_outgoing().
  392.  
  393. ------------------------
  394. Sat Sep 14 13:31:27 2002
  395.  
  396. The 8th bit of data characters seems to be used by CCMD to mark whether each
  397. character was (or is to be) echoed or quoted or something; see CC_CHR,
  398. CC_QUO, etc, in ccmd.h and mm/parse.c.  But this stuff should apply to
  399. commands, not data text.
  400.  
  401.  1. Send, ^E, create 8-bit text in EMACS, exit from EMACS, send: Stripped.
  402.  2. Send, ^B, insert 8-bit file, send immediately: Stripped.
  403.  3. Send, type 8-bit chars directly into text buffer: Stripped.
  404.  
  405. In case 3, it's obviously because the text is being read by CCMD.  But in
  406. cases 1 and 2, there must be some code that zips through the new text and
  407. strips off the bits.
  408.  
  409. When EMACS returns (and also when "Insert file:" inserts data from a file),
  410. the data is still 8-bit, so the bits are being stripped later.
  411.  
  412. In cmd_send() in sendcmds.c, upon return from get_msg(&outgoing), the 8th bits
  413. are gone.  OK, so get_msg() sets up Ctrl-E handler (editaction()) and then
  414. calls parse(), which calls the editor if I type Ctrl-E, but then strips the
  415. bits.  BUT... if you "set use-editor-always", parse is not called, and the
  416. bits are not stripped.  This works even when replying to messages.
  417.  
  418. ------------------------
  419. Sun Sep 15 14:19:48 2002
  420.  
  421. Adding new header items...
  422.  
  423. The idea is that normally these would be omitted, but if the user gives a
  424. CONTENT-TYPE command, the other two would be filled in too, using default
  425. values.  Use "reply-to" as a model.  Commands for the others would be
  426. available to override the default values.
  427.  
  428. message.h:
  429. [ok]  Add symbols for new headers:
  430.       #define MIME_VERSION        21
  431.       #define CONTENT_TYPE        22
  432.       #define TRANSFER_ENCODING   23
  433. [ok]  Add new header members to struct mail_msg definition.
  434.  
  435. parsemsg.c:
  436. [ok]  Add header keywords to header_keys[] -> header_tab -> header_fdb...
  437. [xx]  Add cases to parse_msg()... (not necessary).
  438.  
  439. cmds.H:
  440. [ok]  Add CMD_ symbols for CONTENT-TYPE, MIME-VERSION, and TRANSFER-ENCODING.
  441.  
  442. cmds.c:
  443. [ok]  Add CONTENT-TYPE, MIME-VERSION, and TRANSFER-ENCODING to send_keys2[].
  444. [ok]  Add them to hdr_keys[] too.
  445. [ok]  Add prototypes.
  446. [ok]  Add to dispatch table mm_cmds[].
  447.  
  448. display.c:
  449. [ok]  Add cases to cmd_display().
  450.  
  451. send.c:
  452. [ok]  Add action routines: cmd_content_type(), etc.
  453.  
  454. NOTE: "help header-fields" is missing.
  455.  
  456. ------------------------
  457. Mon Sep 16 10:14:55 2002
  458.  
  459. Updated copyright date in VERSION text, misc.c.
  460.  
  461. ------------------------
  462. Tue Sep 17 10:11:38 2002
  463.  
  464. Fixed Linux build with help from <ishikawa@yk.rim.or.jp> and <azz@gnu.org>...
  465.  
  466. ccmd/Makefile
  467.   test and skel targets should not have hardwired -ltermlib.
  468.   Added TERMLIB symbol to ccmd Makefile to handle this.
  469.  
  470. ccmd/machdep.h
  471.   #define HAVE_BSTRING and HAVE_TZ_SYSV for Linux.
  472.  
  473. mm/Makefile
  474.   In Linux, link with ncurses, not termlib; handled in Linux target.
  475.  
  476. mm/sysh/s-linux.h
  477.   define NEED_TIME and HAVE_BSTRING
  478.  
  479. mm/config.h
  480.   Contains hardwired #include "sysh/s-sun58.h".  Noticed that there are a
  481.   bunch of config.h-blah files, where blah == platform-name, and each one
  482.   #includes a different "sys/s-blah.h".  Made one for Linux (and while I was
  483.   at it, for HP-UX, AIX, etc, but these are probably not right).  Then I
  484.   changed each target in the MM makefile to link config.h to the appropriate
  485.   config.h-blah.
  486.  
  487. We still get warnings about mktemp() but so what; unfortunately mkstemp()
  488. is not a compatible replacement, so if somebody really cares about this,
  489. they'll have to write an mm_mktemp() routine that handles both cases.
  490. Anyway, once I installed movemail in /usr/local/lib/mm/ Linux MM works fine.
  491.  
  492. ------------------------
  493. Tue Sep 17 20:04:29 2002
  494.  
  495. Adding a new command...
  496.  
  497. DOWNLOAD command for Read Mode, plus SET/SHOW DOWNLOAD-FILTER.
  498.   Works just like PRINT and PRINT-FILTER but downloads rather than prints.
  499.  
  500. cmds.H: 
  501.  [ok] Add CMD_blah symbol (in alphabetical order).
  502.  
  503. cmds.c:
  504.  [ok] Add DOWNLOAD keyword to mm_top_keys_2[].
  505.  [ok] Add DOWNLOAD keyword to mm_send_keys_inv[].
  506.  [ok] Add DOWNLOAD keyword to mm_read_keys_2[].
  507.  [ok] Add prototype for cmd_download().
  508.  [ok] Add cmd_download function pointer to mm_cmds[].
  509.  
  510. print.c:
  511.  [ok] Copy cmd_print() to cmd_download() with minor edits.
  512.  [ok] Modify cmd_download() to have a /FILENAME: switch.
  513.  [ok] Modify cmd_literal() to allow LITERAL DOWNLOAD.
  514.  
  515. set.H:
  516.  [ok] Define SET_DOWNLOAD_FILTER
  517.  
  518. set.c:
  519.  [ok] Define default download_filter = "kermit -s - -a %s".
  520.  [ok] Add "download-filter" to set_cmds.
  521.  [ok] Add to download_filter to set_variables[].
  522.  
  523. extern.h:
  524.  [ok] Add download_filter to list of extern strings.
  525.  
  526. Combined notes on new features into release-0.91.txt.
  527.  
  528. Moved old makefiles into mm/old/ and ccmd/old/.
  529.  
  530. Updated help files.
  531.  
  532. ------------------------
  533. Wed Sep 18 12:39:40 2002
  534.  
  535. Changed default download filter to "kermit -Ts -s - -a %s" (added the 'T')
  536. to ensure that Kermit downloads in text mode.  set.c.
  537.  
  538. Changed DOWNLOAD command to allow up to four %s's in the download-filter
  539. (and to fill them in without overflowing any buffers) for the benefit of
  540. setups like "set download-filter cat > %s; sz %s; rm %s".  print.c.
  541.  
  542. Figured out how to set the breakmask for the _CMFLD call in cmd_download()
  543. to allow all printable characters (except ?), so now you can type
  544. DOWNLOAD /FILE:c:\foo$bar_baz\xxx.eml or /FILE:~/mail/xxx.tml.  print.c.
  545.  
  546. I noticed an apparent problem with the HEADERS command -- dates were coming
  547. out wrong.  I thought I had broken something, even though I never went near
  548. any code that deals with dates.  It turns out to be a longstanding problem.
  549. Quoting Melissa:
  550.  
  551.   "This is the creeping-DST bug.  It hasn't always been there.  We've fixed
  552.   it many times.  But DST is pretty slippery.  MM misinterprets the DST
  553.   status of the message, so each time it writes out the file, you quit and
  554.   restart MM, then read the file again, the time creeps +/- 1 hour.  Maybe a
  555.   difference in the DST or time() library or timezone setting or something?
  556.  
  557.   "If you are restarting MM a lot (e.g. debugging), the message creeps 1
  558.   hour each time, and after 31 iterations 9/17 16:00 (GMT) becomes 9/16
  559.   09:00.  You can [see the effect] by copying a file, reading it in, writing
  560.   it out again, and running diff to see if the time changed.
  561.  
  562.   "You could 'normalize' the envelope times by moving all the messages into
  563.   a no-envelope format like RMAIL, then reading it back in with MM (which
  564.   will initialize using the Date: header) and writing it back out in your
  565.   desired format."
  566.  
  567. Envelope format refers to mbox-style message files in which each message
  568. starts with a "From " line.  MM uses this line, rather than the Date:
  569. header, to determine the message's timestamp.  The bug is the MM
  570. recalculates the timestamp incorrectly and rewrites the "From " line every
  571. time it writes out the mail file.
  572.  
  573. ------------------------
  574. Thu Sep 19 10:56:36 2002
  575.  
  576. When a CONTENT-TYPE command forces creation of a MIME-Version header, put
  577. the MIME-Version header first.  It shouldn't make a difference, but all the
  578. other mail clients put the MIME-Version header before any other MIME-related
  579. headers so why take chances.  send.c.
  580.  
  581. Back to DST creep...  Copying my mail file and then writing out a new copy
  582. from MM does indeed show all the "From " lines have changed by 5 hours!
  583. This doesn't look like a DST difference -- it looks like UCT (GMT) versus
  584. local time.  Turns out the problem was in ccmd/machdep.h.  The definition of
  585. HAVE_TZ_SYSV wasn't taking because CCMD_OS_SOLARIS wasn't included among
  586. the platforms that select it.
  587.  
  588. ------------------------
  589. Fri Sep 20 11:40:01 2002
  590.  
  591. Builds:
  592.  
  593. Built on Solaris 2.5.1, Solaris 8, Solaris 9, Red Hat Linux 7.1, FreeBSD 4.4.
  594. Some of these required minor tweaks to mm/Makefile and creation of additional
  595. config.h-blah files.
  596.  
  597. Failed to build on OpenBSD 3.0:
  598.  
  599.   cc -g -DCCMD_OS_BSD44  -c cmgrp.c
  600.   cmgrp.c: In function rphelp':
  601.   cmgrp.c:115: structure has no member named 'gr_name'
  602.   etc etc...
  603.  
  604. The HPUX build bombed right away because CCMD uses ANSI C features but the
  605. default cc on HPUX is the bundled non-ANSI one.  Changed the makefile targets
  606. to require the ANSI compiler and it gets a little farther but still bombs.
  607.  
  608. ------------------------
  609. Tue Sep 24 13:43:54 2002
  610.  
  611. Added new mm/Makefile targets for NetBSD and OpenBSD that are like BSD44 and
  612. FreeBSD but add -Dunix; this fixes the OpenBSD and NetBSD builds because their
  613. cc does not define "unix".
  614.  
  615. I have been using MM as heavily as ever since Sept 14th, when I switched to
  616. "use-editor-always" and have not lost a single byte.  I wonder if I lose that
  617. option, will I start losing text again?  If so, the culprit is parse()...
  618.  
  619. ------------------------
  620. Sat Oct  5 13:03:06 2002
  621.  
  622. Linda Wallinger noticed that when you remail a message, the Content-Type
  623. header disappears.  Further testing shows the same thing happens to the
  624. MIME-Version header.  Diagnosis: the switch() statement in parse_msg()
  625. didn't have cases for the three new headers.  Fixed in parsemsg.c.
  626.  
  627. ------------------------
  628. Sat Nov  2 11:20:37 2002
  629.  
  630.  
  631.  
  632. ------------------------
  633. Wed Nov  6 09:46:24 2002
  634.  
  635. Suddenly about 9:30 this morning, MM started adding From lines that were
  636. 20 hours off:
  637.  
  638.   From fdc@columbia.edu Tue Nov  5 13:37:57 2002
  639.   Date: Wed, 6 Nov 2002 9:37:52 EST
  640.   From: Frank da Cruz <fdc@columbia.edu>
  641.   To: ...
  642.  
  643. Spamassasin rejects messages that have non GMT-offset timezones.
  644. Fix MM to put dates in RFC2822 format.
  645.  
  646. ------------------------
  647. From Jeff on watsun:
  648.  
  649. while sitting at the command prompt on watsun.  mm core dumped
  650. There is a core file in ~jaltman/core
  651.  
  652. Here is the back trace:
  653.  
  654. #0  0xef77636c in read ()
  655. (gdb) bt
  656. #0  0xef77636c in read ()
  657. #1  0xef77ab90 in _filbuf ()
  658. #2  0x443e8 in cmgetc (c=0xeffff958, fd=0xef7e7248) at ccmdmd.c:226
  659. #3  0x41574 in fill (btab=0x748b4, brk=0xeffff9db "\n") at ccmd.c:854
  660. #4  0x407a0 in parse (fdblist=0x7316c, value=0x7a260, usedfdb=0x7a258)
  661.     at ccmd.c:437
  662. #5  0x1fc84 in top_level_parser ()
  663. #6  0x1f4a0 in main ()
  664.  
  665. ------------------------
  666. A way for users to fix stale locks?
  667. Melissa: "No, actually, MM uses kernel locking over NFS.  Contrary to the
  668. rumors, it works.  Except when the locks get left around."
  669.  
  670. ------------------------
  671. Mon Jan 27 09:45:21 2003
  672.  
  673. Rebuilt to use /opt/ACISmm/ paths.
  674.  
  675. ------------------------
  676.  
  677. Date: Tue, 4 Mar 2003 15:25:03 EST
  678. From: Eric Weaver <eric@columbia.edu>
  679. To: bug-mm@columbia.edu
  680. Cc: eric@columbia.edu
  681. Subject: multiple Bcc's not processed
  682. Bug-Report: Bug in Columbia MM, version 0.91.0(140) (SunOS)
  683.  
  684. Hi,
  685.   If one puts multiple "Bcc" headers in their outgoing mail (like when editing
  686. the body and headers in an editor), then only the last "Bcc" header gets
  687. processed.  For example:
  688.  
  689.         From: eric
  690.         To: joe
  691.         Bcc: bob
  692.         Bcc: tom
  693.  
  694. will only go to joe and tom.  Bob will not get a copy.  After composing and
  695. getting back to the send prompt, a "display" will show the multiple "Bcc"
  696. headers, but only the last one gets processed.
  697.   Oh, to clarify a related item,... if one specifies multiple "bcc user[, user
  698. [, ...]]" commands on MM's command line (like at the send prompt), then that
  699. method works ok because MM puts all the users into one Bcc header.  /Eric
  700.  
  701. -----
  702. Miscellaneous to do or check:
  703.  
  704.  . Subject: mm set dont-type-headers
  705.    Expand buffer size or max count for this, we need a lot more these days.
  706.  
  707.  . Add X-Mailer: header?  and/or User-Agent:
  708.  
  709.  . Idea: "type [ | filter ]"
  710.  
  711.  . Stale locks.  Why?  MM catches SIGHUP and does the right thing.  The 
  712.    problem is that when somebody's dialup connection drops, SIGHUP never comes.
  713.  
  714.  . Add an "mm" command that does nothing at top level, and goes to top level
  715.    if at Send or Read level.
  716.  
  717.  . Make X-Spam-Score a known header so we don't have to search the whole
  718.   text for it.
  719.  
  720.  . HEADERS ENTIRE-SUBJECT (as opposed to "subject contains")
  721.    Ditto for FROM, etc.  Maybe make this a switch...  /FULL-MATCH ?
  722.  
  723.  . HEADERS RECEIVED
  724.  
  725.  . "keyword junk keyword vacation" gets a parse error if no messages have a
  726.    "vacation" keyword.  This should just be text, not a keyword.  Especially
  727.    since if it happens in a command file, it prevents the rest of the
  728.    command file from working (the real error here is that command retry is
  729.    active when the command source is not the terminal).
  730.  
  731.  . Add a command to enable translation of all correctly-tagged messages to
  732.    UTF-8.  Perhaps by automatically choosing a pager like iconv | more.
  733.  
  734.  . Where is the mbox From line format specified?  RFC 976 (UUCP mail
  735.    interchange format), section 2.4, "Envelope".  Not really.  RFC 822
  736.    mentions the need for an envelope but does not describe it.  MRC says
  737.    that at least the following formats have been seen, and nothing is
  738.    written anywhere about what the default timezone is:
  739.  
  740.     *              From user Wed Dec  2 05:53 1992
  741.     * BSD          From user Wed Dec  2 05:53:22 1992
  742.     * SysV         From user Wed Dec  2 05:53 PST 1992
  743.     * rn           From user Wed Dec  2 05:53:22 PST 1992
  744.     *              From user Wed Dec  2 05:53 -0700 1992
  745.     * emacs        From user Wed Dec  2 05:53:22 -0700 1992
  746.     *              From user Wed Dec  2 05:53 1992 PST
  747.     *              From user Wed Dec  2 05:53:22 1992 PST
  748.     *              From user Wed Dec  2 05:53 1992 -0700
  749.     * Solaris      From user Wed Dec  2 05:53:22 1992 -0700
  750.  
  751.    Therefore MM, to be general and portable, should support all these
  752.    formats and be configurable per site (and possibly also per user) about
  753.    defaulting the timezone.
  754.  
  755. From MRC:  "MS Source is in:
  756.  
  757.   ftp://ftp.cac.washington.edu/mail/ms.tar.Z
  758.  
  759. It's a baby MM that uses the c-client library.  All the basic stuff is
  760. there, but it's missing a lot of more advanced facilities of both MM and
  761. of the c-client library (MIME, sorting, threading...)."
  762.  
  763. ------------------------------
  764. Thu Oct  9 16:27:15 2003
  765.  
  766. Date creep, cont'd...  This time because of the timestamp in the From line.
  767. Columbia's mail agent puts:
  768.  
  769.    From fdc@columbia.edu  Thu Oct  9 13:35:31 2003
  770.  
  771. where the time is local.  The problem is that when MM rewrites the "From "
  772. line, it changes it to GMT.  I traced this to mkdate() in mm/dt.c.  The
  773. #ifdefs did not pick up any of the timezone code in Solaris.  Rather than
  774. mess with the #ifdefs and risk breaking something else, I simply tacked
  775. "|| defined(MM_OS_SOLARIS)" onto the selection clauses that import and check
  776. the external timezone variable.  This seems to fix the problem:
  777.  
  778.  . Wait for a message to arrive in incoming spool directory.
  779.  . Check its "From " line.
  780.  . Read the message with today's mm.
  781.  . Write out the mail file.
  782.  . Check the same message's From line
  783.  
  784. Now it's the same, rather than 4 hours different.  It works the same
  785. no matter whether built in Solaris 2.5.1 or Solaris 9.
  786.  
  787. Still Needed:
  788.  . There is no code to parse GMT +/-hhmm format; I think this could be
  789.    handled by adding "+0100", "-0300", etc, and the corresponding values
  790.    to the timezone keyword table.
  791.  
  792. Other Changes:
  793.  . Added UTC as a synonym for GMT in the timezone table.
  794.  . Merged solaris-cu and (bogus) cu-solaris targets.
  795.  
  796. ------------------------------
  797. Fri Oct 17 14:55:30 2003
  798.  
  799. In new_mail() [newmail.c] added #ifdef COLUMBIA..#endif code to default mail
  800. spool directory to SPOOL_DIRECTORY/a/b/abc123 if /var/spool/.splitmail exists,
  801. where abc123 is any user ID (one-char IDs are handled as .../a/a/a).
  802.  
  803. ------------------------------
  804. Mon Oct 27 13:09:36 2003
  805.  
  806. Checked envelope date after DST->EST switchover; still OK.
  807.  
  808. Changed default In-Reply-To: value to be the replied-to message's message-id
  809. (instead of "Your message of <date>"), which is needed for Remedy and also
  810. recommended ("SHOULD") by RFC 2822.
  811.  
  812. ------------------------------
  813.  
  814. Date: Thu, 22 Apr 2004 7:48:02 EDT
  815. From: Eric Weaver <eric@columbia.edu>
  816. To: bug-mm@columbia.edu
  817. Cc: eric@columbia.edu
  818. Subject: [sys@rg03.ais.columbia.edu: New system errors for rg03 as of
  819.         04-21-2004 09:30PM]
  820.  
  821. I think MM's sense of which day is it was messed up by the change to
  822. Daylight Saving Time... The message below should be "yesterday", but it is
  823. listed when I get a list of messages for "today".  Am I missing something?
  824. /Eric
  825.  
  826. ----------
  827. Misc ideas not acted upon:
  828.  
  829. Add HEADERS ADDRESS (matching all messages whose to, from, or cc lists
  830. contain the address -- similar to HEADERS TO).
  831.  
  832. Print a hint when mail file can't be opened because of lock?  What should
  833. the hint say?  To run some variation of the "killme" script...
  834.  
  835. See: ~/mm/mail.txt message from ron@isri.unlv.edu
  836.  
  837. Idea for MIME charsets...  make iconv or whatever part of the crt-filter
  838. pipeline.  Still have to set terminal charset so iconv can convert *to* it.
  839.  
  840. But then what about replying, etc?
  841.  
  842. Make MOVE and similar command default to "previous sequence" if the previous
  843. command was "headers" or other command that created a sequence; otherwise to
  844. current message.
  845.  
  846. Change DOWNLOAD to allow a filename as argument, or default to x.eml or
  847. something (not mm_msg).
  848.  
  849. Add SET RECENT to define what "recent" means, e.g. last 5 days or "since
  850. yesterday".
  851.  
  852. Make "previous-sequence" the default message sequence for COPY, etc.
  853.  
  854. Need "set include-mime-headers always" so I don't have to remember each
  855. time.
  856.  
  857. Fix "content-type" to allow specification of HTML, etc.
  858.  
  859. Add HEADERS ADDRESS to list all messages sent from or to the given address
  860. or person.
  861.  
  862. Implement the FOLLOW command. Given a message number, it constructs a
  863. message sequence showing the whole thread.  Depends on In-Reply-To: showing
  864. the Message-ID.  It can go backwards, forwards, or both.  To go forward:
  865. find all messages that are In-Reply-To the Message-ID of the given message,
  866. then find all the messages that are In-Reply-To the Message-IDs of each of
  867. those messages, etc.  To go backward, find the message that this message is
  868. In-Reply-To.  Find all the other messages that are In-Reply-To that same
  869. message.  For each of these, find the messages that THEY are In-Reply-To, etc.
  870.  
  871. ---------------------------------
  872. Fri Aug 26 10:49:57 2005
  873.  
  874. Downloaded Nelson Beebe's mm 0.94 from Utah.
  875. He did a very good job on the makefiles, adding a new top-level one.
  876. You can find it in:
  877.  
  878.   ftp://kermit.columbia.edu/kermit/mm/utah/mm-0.94.tar.gz
  879.  
  880. I built it on Solaris 9 with "make OS=solaris2.x all".
  881. It built OK (but it doesn't with the default OS=solaris10).
  882. Started it and it worked OK, but, contrary to what Nelson
  883. had said, it didn't have any of my changes.  Sent him email repeatedly
  884. about this and he never answered.
  885.  
  886. ------------------------
  887. Thu Dec  1 18:09:27 2005
  888.  
  889. Made crude and minimal modifications to allow MM to use a replacement
  890. for movemail that acts as a pop client:
  891.  
  892. .mmint
  893.   set movemail-path /p/kd/fdc/scripts/pop.ksc
  894.  
  895. init.c:
  896.   user_init() looks for .mm-use-pop or .cyrustt file in home directory.
  897.   If found, sets global use_pop variable.
  898.   The difference is:
  899.   .mm-use-pop will go to the old pop server.
  900.   .cyrus will go to the new one.
  901.  
  902. mm.c:
  903.   After calling user_init(), if use_pop is set, prompts for POP password
  904.   immediately upon startup.  The maximum length is 255.  Added a prompt_pw()
  905.   routine to do this.  The password is kept in MM's memory and used every
  906.   time the "movemail" program is called.
  907.  
  908. newmail.c:
  909.   if use_pop set, make an argument vector for the POP script rather
  910.   than regular movemail (first arg is dummy, second is ~/.mm-newmail,
  911.   as always, and new third argument is password).  Skip over code
  912.   that looks at the mail spool, and always call the movemail program.
  913.  
  914. ------------------------
  915. Fri Dec  2 20:05:12 2005
  916.  
  917. Changed the default filename for download from mm_msg to mm.eml, for the MS
  918. Windows filetype association: print.c.  I suppose I should make a SET
  919. command for this so we don't discriminate against file associations on other
  920. platforms (Mac OS X?)  Also updated the copyright year: misc.c.
  921.  
  922. ------------------------
  923. Sat Dec  3 21:53:22 2005
  924.  
  925. When running MM using "Method 1", in which the POP script replaces movemail,
  926. it quickly became obvious that MM would be contacting the POP server way too
  927. often, sometimes 2-3 times in succession without a pause, which is not such
  928. a big deal if it's just looking at files in the spool directory but we don't
  929. want it pummeling the poor POP server.  I fixed this by having move_mail()
  930. keep track of the time, and never call the POP script more often than 30
  931. seconds apart (only when use_pop is set).  When move_mail() is called within
  932. less than 30 seconds since the previous POP access it just says "no new
  933. mail".  Then I realized that MM would try to get new mail only if it saw it
  934. sitting in the spool (which won't happen with Cyrus, there won't be any
  935. spool).  Fixing this required major surgery to new_mail().
  936.  
  937. ------------------------
  938. Sun Dec  4 15:13:28 2005
  939.  
  940. Let CHECK-INTERVAL be the minimum interval for contacting the POP server.
  941. This way the user can control it.  However, MM still won't contact the POP
  942. server more than once per 30 seconds.  move_mail(): newmail.c.
  943.  
  944. Moved the password prompt to the place where we call the POP script.  If
  945. the password hasn't been set yet, prompt for it.  This way we don't ask for
  946. the passowrd if MM is being used (e.g.) to examine some random file.
  947. main(): mm.c; move_mail(): newmail.c.
  948.  
  949. But when I did this and then did "mm examine foo.txt", why did it still want
  950. to check for new mail?  Changed cmd_get() to set a nocheck flag if the file
  951. is read-only (EXAMINE) or it is not the user's mail file, and changed
  952. new_mail() to check this flag.  file.c, newmail.c.
  953.  
  954. But it still checked for new mail.  Turns out that in the main program, the
  955. call to new_mail() was executed unconditionally the first time through the
  956. loop before we parsed any commands and therefore before any mail file was
  957. loaded.  I changed it to call new_mail() only if there was a current mail
  958. file.  top_level_parser(): mm.c.
  959.  
  960. I received spam from some place that put junk in the Date: field.  This
  961. caused the POP script to write a From line with missing date, which MM did
  962. not like at all.  Fixed the POP script to supply the current date and time
  963. in this case.
  964.  
  965. ------------------------
  966. Mon Dec  5 10:27:27 2005
  967.  
  968. Fixed CONTENT-TYPE command to allow allow the user to specify the entire
  969. content-type, not just charset.
  970.  
  971. Discovered that INPUT /CLEAR /NOWRAP has a fatal flaw, namely that if the
  972. search target straddles an INPUT buffer boundary, it will never be seen.
  973. Worked around this one temporarily by adding a trick to the script.  Need
  974. to fix it in Kermit.
  975.  
  976. Announced Beta.01 to emailtech-wg@columbia.edu.
  977.  
  978. ------------------------
  979. Tue Dec  6 12:00:38 2005
  980.  
  981. Don't check spool file if movemail_path is empty, which means that we have
  982. some other process delivering mail asynchronously to ~/.mm-newmail (a.k.a.
  983. Method 2).
  984.  
  985. ------------------------
  986. Wed Dec  7 10:22:56 2005
  987.  
  988. Tried to build MM on Linux RH AS4.2, bombs out immediately with ANSI
  989. strictness ravings.  Looked through my notes and saw that I had not actually
  990. made any changes to ccmd except to get it to compile on non-Sun platforms.
  991. So it should be safe to just take Nelson Beebe's version.  I did that, and
  992. of course it built fine on Linux ("make gnu-linux").  When I bring this
  993. version back to solaris and build it, it's OK there too, but clashes with
  994. my copy of MM because MM refers to some ccmd header files which have been
  995. changed to disagree with how some ccmd items are declared in the MM source.
  996.  
  997. Then I copied all of Nelsons's files into the mm tree, and then copied all
  998. the files I have modifed on top of those.  Then I tried compiling.  Each of
  999. my files got horrible errors, and I fixed them one by one, importing
  1000. Nelson's ansifications and modernizations and occasional fixes while taking
  1001. care to preserve (and sometimes modernize) my changes.  This involved about
  1002. 30 *.[ch] files.  Finally MM built OK on Solaris, starts OK, but dumps core
  1003. if I give it any command.
  1004.  
  1005. It turns out that the array of function pointers declared towards the bottom
  1006. of cmds.c is NOT generated automatically; it has to be VERY CAREFULLY edited
  1007. by hand to match the CMD_blah values in cmd.h, which ARE generated
  1008. automatically from cmd.H.
  1009.  
  1010. ------------------------
  1011. File pairs like cmds.H and cmds.h, that differ only in case, don't work on
  1012. case-insensitive file systems like Mac OS X.
  1013.  
  1014. HEADERS RECENT used to apply to the the messages that came in since MM was
  1015. started.  Now it applies to the ones since we last checked mail.
  1016.  
  1017. Re-enable locking code via #ifdefs.
  1018.  
  1019. #ifdef COLUMBIA lock mail file using file locks.
  1020.  
  1021. Add SET DEFAULT-DOWNLOAD-FILENAME (this name is OK).
  1022.  
  1023. Ctrl-C... 
  1024. Do you really want to exit MM? [y/n] y  <-- doesn't exit.
  1025. Do you really want to exit MM? [y/n] y
  1026.  
  1027. Add build instructions.
  1028. Add list of site flags.
  1029. Add list of feature flags.
  1030.  
  1031. Make the POP script remember whether it is logged in so it knows
  1032. what to send on Ctrl-C.
  1033.  
  1034. Add this to mm "make clean":
  1035. rm -f mm argsort mkdefines mkversion mm-trans mmversion sys-prof movemail -
  1036. prepatch
  1037.  
  1038. add linux target to ccmd makefile.
  1039.  
  1040. Message 14 has bad date string (continuing)
  1041. Message 15 has bad date string (continuing)
  1042. Message 16 has bad date string (continuing)
  1043. Message 17 has bad date string (continuing)
  1044.  
  1045. Here are headers from some of the offending messages:
  1046.  
  1047. From: Odetta Rogers  <newsletter@diversitybusiness.info>
  1048. Date: 16 Dec 2005 16:28:50 -0500
  1049.  
  1050. From: Best Postcard  <service@postcard.com>
  1051. Date: Sat, 24 Dec 2005 04:50:16 -0500 (EST)
  1052.  
  1053. This has happened twice in about 3 weeks.
  1054.  
  1055. There doesn't seem to be anything wrong with them.  Added code to mbox.c
  1056. to print the bad line, and to substitute the current date/time rather than
  1057. Wed Dec 31 19:00:00 1969.  mbox.c, 24 Dec 2005.
  1058.  
  1059. Changed Copyright year to 2006, misc.c, 8 Jan 2006.
  1060.  
  1061. Added QD as an invisible synonym for DELETE, because of 'more' -- first you
  1062. have to type 'q' to get out of more, then 'd' to delete the message.  But if
  1063. the message was less than a screenful, you often wind up typing 'qd'.  cmds.H,
  1064. cmds.c, etc, 8 Jan 2006.
  1065.  
  1066. MM writes a bogus in the Resent-Date: header:
  1067.      Resent-Date: Sun, 8 Jan 106 12:42:18 EST
  1068.  
  1069. The problem with date is in rfctime() in dates.c.  Old (which works):
  1070.     sprintf(str,"%3.3s, %d %3.3s %d %d:%02d:%02d %s",
  1071.         day_names[t->tm_wday],
  1072.         t->tm_mday, month_names[t->tm_mon], t->tm_year + 1900, ...
  1073.  
  1074. New (which doesn't):
  1075.     sprintf(str,"%3.3s, %d %3.3s %d %d:%02d:%02d %s",
  1076.         day_names[t->tm_wday],
  1077.         t->tm_mday, month_names[t->tm_mon], t->tm_year /*+ 1900*/, ...
  1078.  
  1079. What will I break if I uncomment the "+ 1900"?  rfctime() is called in only
  1080. two places: in writing the Resent-Date (which needs to be fixed), and in
  1081. sendmail() in sendmail.c, which as far as I can tell, adds the Date: header
  1082. to every outgoing message.
  1083.  
  1084. In sendmail(): 
  1085.  
  1086.   x->string = safe_strcpy (rfctime ((time_t)0));
  1087.  
  1088. In do_remail_one():
  1089.  
  1090.   msg->resent_date->string = safe_strcpy(rfctime(time(0)));
  1091.  
  1092. What if I make the second one like the first?  Makes no difference.  It
  1093. seems rfctime() is never called when I send a new message because in that
  1094. case, the date header has already been added elsewhere.  I tried to see
  1095. where, and how, and have the Resent-Date set the same way, but I couldn't
  1096. home in on it, so I just uncommented the "+ 1900" and everything seems to be
  1097. fine.  rfctime(): dates.c, 8 Jan 2006.
  1098.  
  1099. The new version of MM seems to rewrite the From: and Date: headers when I
  1100. remail.  Turns out that this happens because the following was added to
  1101. config.h in the Utah version:
  1102.  
  1103. /*
  1104.  *  Let's let sendmail do it's thing with From:, To:, Sender: headers.
  1105.  */
  1106.  
  1107. #define DONT_EMIT_FROM_HEADERS
  1108.  
  1109. and is easily fixed in config.h by not defining, or by undefining it once
  1110. defined.  config.h, 9 Jan 2006.
  1111.  
  1112. The other big change since reconciliation with the Utah code is that the
  1113. mail file is no longer locked, which is bad because it's too easy to start a
  1114. second copy of MM and then mess up your mail file.  Kernel locks are a big
  1115. pain when using NFS and multihomed hosts (as we do here), but first let's
  1116. see if we can put it back the way it was...  I did in config.h by defining
  1117. HAVE_F_LOCK within #ifdef COLUMBIA..#endif.  The resulting mm binary
  1118. interoperates with the old one in guaranteeing exclusive access to the mail
  1119. file and to ~/.mm-newmail.  9 Jan 2006.
  1120.  
  1121. When I start MM on Solaris, it says "Cannot restore tty attributes: error 9".
  1122. This comes from ccmdmd.c, the machine-dependent module of ccmd.  Error 9 is
  1123. "bad file number".  I see this has been noticed before by other people.
  1124. It looks like the ccmd routine unraw() is sometimes called on a file
  1125. descriptor that is not open.  I put in a check for this, as well as a check
  1126. that the tty modes have indeed been saved before we try to restore them.
  1127. ccmd/ccmdmd.c, 9 Jan 2006.
  1128.  
  1129. ------------------
  1130.  
  1131. How about making a lockfile instead?  Then users can fix problems
  1132. themselves.  If MM GETs a mail file in R/W mode, it should create a file
  1133. in the same directory with ".lock" appended to its name.  The lock file
  1134. should contain:
  1135.  
  1136.   username
  1137.   hostname
  1138.   timestamp
  1139.   pid
  1140.  
  1141. But then it will only interoperate with itself.  Maybe it should do a kernel
  1142. lock AND a file lock.  That way, if kernel locking fails because the file is
  1143. in use, MM can give the user the info from the file lock.