home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mm / notes-fdc.txt < prev    next >
Text File  |  2020-01-01  |  29KB  |  738 lines

  1. MM edit history - Frank da Cruz <fdc@columbia.edu>
  2.  
  3. Beginning with MM-0.90.4 (Notes are chronological).
  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 internation 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. Wed Oct 16 11:24:35 2002
  629.  
  630. The (top) "From " line (envelope) seems to arrive with a GMT date, which
  631. gets rewritten by MM assuming it's local time.
  632.  
  633. ------------------------
  634. Sat Nov  2 11:20:37 2002
  635.  
  636. Idea: "type [ | filter ]"
  637.  
  638. ------------------------
  639. Wed Nov  6 09:46:24 2002
  640.  
  641. Suddenly about 9:30 this morning, MM started adding From lines that were
  642. 20 hours off:
  643.  
  644.   From fdc@columbia.edu Tue Nov  5 13:37:57 2002
  645.   Date: Wed, 6 Nov 2002 9:37:52 EST
  646.   From: Frank da Cruz <fdc@columbia.edu>
  647.   To: ...
  648.  
  649. Spamassasin rejects messages that have non GMT-offset timezones.
  650. Fix MM to put dates in RFC2822 format.
  651.  
  652. ------------------------
  653. From Jeff on watsun:
  654.  
  655. while sitting at the command prompt on watsun.  mm core dumped
  656. There is a core file in ~jaltman/core
  657.  
  658. Here is the back trace:
  659.  
  660. #0  0xef77636c in read ()
  661. (gdb) bt
  662. #0  0xef77636c in read ()
  663. #1  0xef77ab90 in _filbuf ()
  664. #2  0x443e8 in cmgetc (c=0xeffff958, fd=0xef7e7248) at ccmdmd.c:226
  665. #3  0x41574 in fill (btab=0x748b4, brk=0xeffff9db "\n") at ccmd.c:854
  666. #4  0x407a0 in parse (fdblist=0x7316c, value=0x7a260, usedfdb=0x7a258)
  667.     at ccmd.c:437
  668. #5  0x1fc84 in top_level_parser ()
  669. #6  0x1f4a0 in main ()
  670.  
  671. ------------------------
  672. A way for users to fix stale locks?
  673. Melissa: "No, actually, MM uses kernel locking over NFS.  Contrary to the
  674. rumors, it works.  Except when the locks get left around."
  675.  
  676. ------------------------
  677. Mon Jan 27 09:45:21 2003
  678.  
  679. Rebuilt to use /opt/ACISmm/ paths.
  680.  
  681. ------------------------
  682.  
  683. Date: Tue, 4 Mar 2003 15:25:03 EST
  684. From: Eric Weaver <eric@columbia.edu>
  685. To: bug-mm@columbia.edu
  686. Cc: eric@columbia.edu
  687. Subject: multiple Bcc's not processed
  688. Bug-Report: Bug in Columbia MM, version 0.91.0(140) (SunOS)
  689.  
  690. Hi,
  691.   If one puts multiple "Bcc" headers in their outgoing mail (like when editing
  692. the body and headers in an editor), then only the last "Bcc" header gets
  693. processed.  For example:
  694.  
  695.         From: eric
  696.         To: joe
  697.         Bcc: bob
  698.         Bcc: tom
  699.  
  700. will only go to joe and tom.  Bob will not get a copy.  After composing and
  701. getting back to the send prompt, a "display" will show the multiple "Bcc"
  702. headers, but only the last one gets processed.
  703.   Oh, to clarify a related item,... if one specifies multiple "bcc user[, user
  704. [, ...]]" commands on MM's command line (like at the send prompt), then that
  705. method works ok because MM puts all the users into one Bcc header.  /Eric
  706.  
  707. -----
  708. Subject: mm set dont-type-headers
  709.  
  710. Expand buffer size or max count for this, we need a lot more these days.
  711. -----
  712.  
  713. Add X-Mailer: header?  and/or User-Agent:
  714. -----
  715.  
  716. Stale locks.  Why?  MM catches SIGHUP and does the right thing.  The problem
  717. is that when somebody's dialup connection drops, SIGHUP never comes.
  718.  
  719. Add an "mm" command that does nothing at top level, and goes to top level
  720. if at Send or Read level.
  721.  
  722. Make X-Spam-Score a known header so we don't have to search the whole
  723. text for it.
  724.  
  725. HEADERS ENTIRE-SUBJECT (as opposed to "subject contains")
  726. Ditto for FROM, etc.  Maybe make this a switch...  /FULL-MATCH ?
  727.  
  728. HEADERS RECEIVED
  729.  
  730. "keyword junk keyword vacation" gets a parse error if no messages have a
  731. "vacation" keyword.  This should just be text, not a keyword.  Especially
  732. since if it happens in a command file, it prevents the rest of the
  733. command file from working (the real error here is that command retry is
  734. active when the command source is not the terminal).
  735.  
  736. add a command to enable translation of all correctly-tagged messages to
  737. UTF-8.  Perhaps by automatically choosing a pager like iconv | more.
  738.