home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / mush6.0 / part13 / mush.1.c
Encoding:
Text File  |  1988-04-12  |  37.8 KB  |  1,267 lines

  1. .sp
  2. .ti +2
  3. pick -f island!argv@sun.com | sort s
  4. .sp
  5. This finds all messages from the user \*Qisland!argv@sun.com\*U
  6. and sorts them by subject.
  7. Since these messages are already grouped together via the
  8. previous sort command, the sorting by subject (s) will restrict itself
  9. to such messages.
  10. You may specify the exact message list by specifying
  11. that message list on the command line and using a pipe:
  12. .sp
  13. .ti +2
  14. 10-. | sort d
  15. .sp
  16. This command means to sort the messages from 10 to the current message
  17. according to the date.
  18. .sp
  19. To specify subsorting from with the curses interface, the temporary
  20. curses escape key must be used (the colon `:') and the command issued
  21. at the command line given (as if giving an \*Qex\*U command to \*Qvi\*U).
  22. When the command is finished, the \*Q...continue...\*U prompt is given and
  23. the user may continue or return to the top level of the curses mode.
  24. .sp
  25. In the tool interface, the user must map a function key to the desired
  26. command.
  27. Select the \*QOpts\*U icon with the right mouse button, choose
  28. the menu item labeled \*Qfunction keys\*U and use the interface provided
  29. to set a function key to the desired piped mechanism.
  30. .TP
  31. .B stop
  32. For systems with job control, stop will cause
  33. .I Mush
  34. to send a SIGTSTP to itself.
  35. The command was introduced to facilitate
  36. the stop-job action from a complex command line alias rather than the user
  37. having to type his stop character explicitly.
  38. .TP
  39. .B top
  40. Takes a message list and prints the top few lines of each.
  41. The number of lines printed is controlled by the variable
  42. .B toplines
  43. and defaults to the size of the value of the variable
  44. .B crt.
  45. This command is ignored in the tool mode.
  46. .SH VARIABLES
  47. Shell variables are controlled via the
  48. .B set
  49. and
  50. .B unset
  51. commands.
  52. Options may be either boolean, in which case it is only
  53. significant to see whether or not they are set;
  54. string, in which case the actual value is of interest;
  55. or numerical, in which the numerical value is important.
  56. Some variables may have attributes
  57. of boolean and string at the same time.
  58. .sp
  59. If you or the program references a variable which is not explicitly set,
  60. then the environment variables are checked and a pointer to that data
  61. is returned.
  62. Following is a list of all predefined variables.
  63. .TP
  64. .B alwaysignore
  65. (Boolean)
  66. If set, the mail headers set by the
  67. .B ignore
  68. command are always ignored.
  69. Normally, ignored headers are not ignored when sending messages to
  70. the printer, when interpolating messages into letters with ~f or ~h,
  71. when the `P' or `T' command is given (see the \fBprint\f command),
  72. or with the -h flag to the
  73. .B mail
  74. or
  75. .B reply
  76. commands.
  77. Setting
  78. .B alwaysignore
  79. will ignore those headers even in the situations mentioned here.
  80. No headers can be ignored during updates and when using the
  81. .B save
  82. command since the user may ignore headers which are required by
  83. .I Mush
  84. or any other mail system to read those folders.
  85. .sp
  86. Also see the
  87. .B ignore
  88. command for more information.
  89. .TP
  90. .B ask
  91. (Boolean)
  92. If set, you will be prompted for a subject header for outgoing mail.
  93. If not set, the Subject header will be displayed as a blank header.
  94. Use the tilde escape \*Q~s\*U to set the header once in the message
  95. or specify the -s option on the
  96. .B mail
  97. command line at the
  98. .I Mush
  99. prompt.
  100. .TP
  101. .B askcc
  102. (Boolean)
  103. If set, you will be prompted for a Cc (carbon copy) list when you are
  104. finished editing a letter to be sent.
  105. In the tool mode, this is ignored; the Cc list
  106. is always prompted for after the Subject prompt.
  107. .TP
  108. .B autodelete
  109. (Boolean)
  110. When exiting mail, all messages which have been read
  111. .I "regardless of whether they have been marked for deletion"
  112. are removed.
  113. Only messages that haven't been read or marked as
  114. .BR preserved ,
  115. are not removed.
  116. .TP
  117. .B autoedit
  118. (Boolean)
  119. If set, you are automatically put into your editor whenever you
  120. send or reply to mail.
  121. .TP
  122. .B autoinclude
  123. (Boolean)
  124. When replying to any mail, a copy of the message being replied to
  125. is automatically inserted into your message body indented by
  126. the string described by the variable
  127. .BR indent_str .
  128. .TP
  129. .B autoprint
  130. (Boolean)
  131. After you delete a message, the next message is printed automatically.
  132. .TP
  133. .B auto_route
  134. (Boolean)
  135. This variable has two functions, both of which only concern the command,
  136. .BR replyall ,
  137. and is only important to users who use UUCP to mail to remote sites.
  138. The first function is to cause replyall to modify the return addresses
  139. of all recipients to route through the original sender's host.
  140. The problem with UUCP mail delivery is that mail delivery is frequently
  141. routed through other computers before the message finally gets to its
  142. destination.
  143. If the original sender of the message was on a remote
  144. machine which your machine does not exchange UUCP mail with, then a UUCP
  145. path containing hosts which you do talk to will have to be
  146. created to respond to the author.
  147. However, if he mailed to other people
  148. on machines which are also multi-hops away, the addresses he used for
  149. those recipients may differ from what you should specify if you were to
  150. try to reply to everyone on the listed in the original message.
  151. .sp
  152. For example, if the original sender came from remote host,
  153. .B pixar
  154. and the list of recipients looked like,
  155. .sp
  156. .nf
  157. .in +2
  158. From: pixar!user1
  159. To: yourhost!you
  160. Cc: r2d2!user2, r2d2!user3
  161. .in -2
  162. .fi
  163. .sp
  164. Clearly, \*Quser1\*U on the machine pixar can talk to your machine
  165. and the machine named r2d2.
  166. However, you would not be able to respond to those users if your machine
  167. did not exchange UUCP mail with the host r2d2.
  168. .sp
  169. .I Mush
  170. will attempt to solve this problem if
  171. .B auto_route
  172. is set.
  173. An attempt will be made to compensate by reconstructing the addresses
  174. for \*Quser2\*U and \*Quser3\*U according to the address of the original
  175. sender, \*Quser1\*U.
  176. The new addresses for \*Quser2\*U and \*Quser3\*U should therefore become,
  177. .sp
  178. .ti +2
  179. pixar!r2d2!user2, pixar!r2d2!user3.
  180. .sp
  181. If your machine not only talks to pixar,
  182. but talks to r2d2 as well, it becomes unnecessary to route the mail
  183. through both pixar and r2d2.
  184. The variable
  185. .B known_hosts
  186. may be set to a list of hosts which you know your machine to have
  187. UUCP mail connections with.
  188. This list is checked when constructing
  189. mail addresses and the shortest path is made by removing from the
  190. UUCP path those hosts which do not need to be called.
  191. See the entry for
  192. .B known_hosts
  193. for more information.
  194. .sp
  195. An additional feature of the
  196. .B auto_route
  197. variable is that all redundant hostnames from UUCP pathnames are removed
  198. to avoid unnecessary UUCP connections and speed up mail delivery.
  199. Normally, this is the responsibility of the
  200. .IR "Mail Transfer Agent" ,
  201. or MTA.
  202. But it might be the case where the MTA at your site is not
  203. smart enough to figure out such redundant paths.
  204. In either case, the algorithm for removing redundant hosts is simple and
  205. should probably be used.
  206. An example of how auto_route truncates UUCP paths:
  207. .sp
  208. .ti +2
  209. pixar!island!sun!island!argv
  210. .sp
  211. Here, mail was probably originally sent to users at pixar and sun from
  212. somewhere undetermined now.
  213. Since sun and pixar do not talk to each other, the users on those machines may
  214. have responded to mail creating the type of addresses stated above.
  215. Here, it can be seen that we can reduce the path to the host
  216. .IR island :
  217. .sp
  218. .ti +2
  219. pixar!island!argv
  220. .sp
  221. See the MAIL ADDRESSES section for more detailed information
  222. about legal mail addresses.
  223. .TP
  224. .B autosign
  225. (Boolean/string)
  226. Append a signature to outgoing mail.
  227. If this variable is set, but not to a string (e.g., boolean-true),
  228. then the file ~/.signature is used.
  229. .sp
  230. Otherwise, the variable is interpreted in one of three ways.
  231. By default, the string is interpreted as a pathname relative to the
  232. .I current
  233. directory.
  234. For this reason, it is advisable to use full pathnames here.
  235. As usual, the special characters `~' and `+' are expanded.
  236. If a file is found, it is opened and its contents are read into the
  237. message buffer.
  238. .sp
  239. If the variable is set to a string that begins with `$', then that string
  240. is interpreted as a user-definable variable and is expanded and appended
  241. to the letter.
  242. .sp
  243. Finally, if the variable is set to a string that begins with a backslash (\\),
  244. then the string itself (minus the `\\' character) is used; no expansion
  245. is done and no files are read.
  246. .sp
  247. In the latter two cases, it is advisable to set the variable using single
  248. quotes to avoid expanding the variable beforehand or eliminating the
  249. backslash.
  250. Examples,
  251. .sp
  252. .ti +2
  253. set autosign = '$foo'
  254. .ti +2
  255. set autosign = '\\  Dan Heller island!argv@ucbcad.berkeley.edu'
  256. .sp
  257. Warning: if redirection from the calling shell is used, there will be
  258. no signature or forutne added to outgoing mail.  For example,
  259. .sp
  260. .ti +2
  261. % mush -s report manager < report_file
  262. .sp
  263. In this command, mail is being sent to the user \*Qmanager\*U and the
  264. subject is set to \*Qreport\*U and the file \*Qreport_file\*U is being
  265. redirected as input.  In this case, there will be \fIno\fR signature
  266. appended.
  267. .TP
  268. .B autosign2
  269. (String)
  270. This alternate signature is available for special cases where the default
  271. signature is not desired or if no signture is desired for special addresses
  272. or if special addresses only require a signature.
  273. The format for this variable is:
  274. .sp
  275. .ti +2
  276. autosign2 = \*Qaddress1, address2, ... : <signature>\*U
  277. .sp
  278. The addresses are legal mailing addresses but do not contain comment
  279. fields (see the sections MAIL ADDRESSES for more information on legitimate
  280. mail addresses).
  281. The signature description is the same as described by
  282. .B autosign
  283. above.  The colon (:) separates the list of addresses from the signature
  284. description.  If there is no colon or the address list is missing, the
  285. entire string is considered the signature (except for the colon).
  286. .sp
  287. If
  288. .B autosign
  289. is not set, then autosign2 will ONLY work if the tilde command \*Q~S\*U
  290. is specified.  In this way, a user may never have autosign set and just
  291. set autosign2 to be some signature value.  The user may then issue the
  292. tilde command to automatically sign the letter.
  293. If a list of addresses is given (terminated by a colon), then all
  294. recipients of the message must be in the list of addresses in autosign2;
  295. otherwise, the signature in \fBautosign\fR (if set) is used instead.
  296. A null signature in autosign2 will not sign the letter.
  297. .sp
  298. Example:
  299. .ti +2
  300. set autosign2 = "fred, barney, wilma, betty: ~/flintstone.sig"
  301. .sp
  302. If a message is sent to:
  303. .sp
  304. .ti +2
  305. To: fred, wilma
  306. .sp
  307. Then the file ~/flinstone.sig will be used.
  308. However, if the address were:
  309. .sp
  310. .ti +2
  311. To: barney, betty, bambam
  312. .sp
  313. Then autosign2 will not be used because bambam is not in the list.
  314. .sp
  315. Note that mail sent via redirection from the calling shell will not
  316. sign letters or append fortunes.
  317. .TP
  318. .B cdpath
  319. (String)
  320. Set to a string of pathnames separated by spaces to use when searching
  321. for a directory when the
  322. .B cd
  323. command is issued.
  324. If this variable is used, it is recommended that the path `.' be included.
  325. Note that this differs from the
  326. .IR csh ,
  327. which does not require that `.' be present.
  328. .TP
  329. .B crt
  330. (Numeric)
  331. Set to a value which describes the number of lines a message
  332. must have before invoking the
  333. .B pager
  334. to view a message.
  335. .TP
  336. .B cwd
  337. (String)
  338. The
  339. .B "current working directory"
  340. string is automatically set upon startup of
  341. .I Mush
  342. and is reset each time the command
  343. .BR cd ,
  344. is called.
  345. It is referenced each time
  346. .B pwd
  347. is called and may be used as any other shell variable.
  348. .TP
  349. .B dead
  350. (String)
  351. File to use instead of dead.letter when interrupted mail is saved.
  352. For more information, see the variable,
  353. .B nosave.
  354. .TP
  355. .B dot
  356. (Boolean)
  357. Accepts a `.' on a line by itself, in addition to `^D', to terminate messages.
  358. .TP
  359. .B editor
  360. (String)
  361. Editor to use when \*Q~e\*U is specified.
  362. Default is the value of the variable
  363. .BR visual .
  364. .TP
  365. .B escape
  366. (Character)
  367. When typing in a letter (not in an editor), when the
  368. .B escape
  369. character is the first character on the line, the following character
  370. is examined and a corresponding function associated with that
  371. .B "escape command"
  372. is executed.
  373. See
  374. .B "tilde escapes"
  375. for more information.
  376. .TP
  377. .B folder
  378. (String)
  379. The folder variable is set to a path where folders are kept.
  380. \&~/Mail is the default value.
  381. .TP
  382. .B fortune
  383. (Boolean/string)
  384. If fortune is set, a random fortune is appended to the end of
  385. all outgoing mail using the
  386. .I UNIX
  387. command
  388. .B /usr/games/fortune
  389. (may vary from system to system).
  390. If fortune is set to something that starts with
  391. a `\-', then it is interpreted as a flag to fortune (e.g., \*Q\-o\*U).
  392. If
  393. .B fortune
  394. starts with a `/', then the program described by
  395. the string is executed (thus not doing fortune at all, if you want).
  396. By default,
  397. .I "fortune \-s"
  398. (short fortunes) is used.
  399. .TP
  400. .B fortunates
  401. (String)
  402. When fortunes are added to messages, sometimes it is desireable to
  403. make sure that only a selected group of people get a fortune since
  404. certain people may not understand the messages at the end of your
  405. mail.  Therefore, you can set a list of addresses (either pure addresses
  406. or aliases which are expanded to addresses) to be the only people who
  407. receive fortunes if one is to be appended.  Therefore,
  408. if the To: and Cc: lines contain only address listed in this string
  409. variable, then a fortune is appended to the message.
  410. If those lists contain names which are not on the fortunates
  411. list, then no fortune is added.
  412. This cannot be overriden; using the
  413. tilde command \*Q~F\*U does not force a fortune to be added unless the
  414. list of individuals on the recipient list are all included in the fortunates
  415. list.  The list is made up of addresses or aliases separated by spaces or
  416. commas.
  417. .I "NOTE: fortune must be set in order for fortunates to work."
  418. .TP
  419. .B hdr_format
  420. (String)
  421. This variable controls the format of the headers displayed by the
  422. .B headers
  423. command and in the curses and graphics modes.
  424. The format style of this variable string is similar to printf in C.
  425. When printing the information, the variable is evaluated and each
  426. character in the string is echoed unless a `%' character is
  427. encountered.
  428. If one is found, the following string substitutions are made:
  429. .sp
  430. .in +2
  431. .nf
  432. .ta 0.5i
  433. %a    address of the author
  434. %c    number of characters (bytes) in the message
  435. %f    entire \*QFrom:\*U field (author)
  436. %l    number of lines in the message
  437. %n    name of the author
  438. %s    subject of the message
  439. %t    \*QTo:\*U field (recipients)
  440. %d    entire date of the message
  441. %T    the time only of the message
  442. %N    the day number of the month of the message
  443. %D    the day or the week (Sun, Mon, etc.)
  444. %M    the month name of the message
  445. %Y    the year of the message
  446. \\n    a newline
  447. \\t    a tab
  448. .fi
  449. .in -2
  450. .sp
  451. A field width specifier may be used in all options.
  452. Thus, \*Q%20f\*U will print the
  453. first 20 characters of the from line.
  454. No matter what the formatting string, the message number
  455. followed by a `>' (for current message) is printed.
  456. .sp
  457. The \*Qaddress\*U and \*Qname\*U of the author
  458. are extracted from the \*QFrom:\*U field of the message.
  459. The name may be given in parentheses and
  460. the rest of the line is the address, or the address is given in angle
  461. brackets (`<' and `>') and the rest of the line is the name.
  462. Sometimes the address is the only thing on the line,
  463. in which case the name and address are the same.
  464. .sp
  465. .TP
  466. .B hold
  467. (Boolean)
  468. Normally, on termination of mail, read messages are saved in
  469. your mbox (except those marked as preserved).
  470. Setting
  471. .B hold
  472. prevents this from happening,
  473. and messages remain in /usr/spool/mail/user.
  474. This does not apply to folders, obviously.
  475. .TP
  476. .B home
  477. (String)
  478. This variable describes the user's home directory.
  479. The variable is initialized to the value of the environment variable HOME,
  480. but can be modified at any time during the
  481. .I Mush
  482. session.
  483. The home directory is the same directory where temporary
  484. files are kept for editing and so forth.
  485. If the home directory cannot be found or read/write access is denied, an
  486. alternate directory, typically /tmp, is used.
  487. .TP
  488. .B ignore_bang
  489. (Boolean)
  490. If set,
  491. .I Mush
  492. will ignore the `!' character as a history reference.
  493. .TP
  494. .B ignoreeof
  495. (Boolean/string)
  496. If set, `^D' will not exit from
  497. .IR Mush .
  498. If set to a string, that string is executed as a command
  499. when `^D' is typed.
  500. This does not effect termination of messages under the
  501. .B mail
  502. and
  503. .B reply
  504. commands.
  505. .TP
  506. .B in_reply_to
  507. (String)
  508. This variable may be set to a string which will complete the
  509. header \*QIn-Reply-To:\*U.
  510. The format of this string is identical to the options for the variable
  511. .BR hdr_format .
  512. .sp
  513. For example, if the user were to respond to a message
  514. from Dan Heller that was sent on October 21, 1987 at 10:39pm, with
  515. .B in_reply_to
  516. set to the string
  517. .in +2
  518. .sp
  519. %n's message as of %d.
  520. .sp
  521. .ti -2
  522. the header line
  523. .sp
  524. In-Reply-To: Dan Heller's message as of Oct 21, 1987 10:39pm.
  525. .in-2
  526. .sp
  527. would be added to the message.
  528. .TP
  529. .B indent_str
  530. (String)
  531. When including messages into the text of a letter you are editing,
  532. each line of the messages is preceded by the value of
  533. .BR indent_str .
  534. If it is unset, the message body is indented by the string \*Q> \*U.
  535. See also the variables
  536. .B pre_indent_str
  537. and
  538. .BR post_indent_str .
  539. .TP
  540. .B keepsave
  541. (Boolean)
  542. If set, the commands
  543. .B save
  544. and
  545. .B write
  546. will
  547. .I not
  548. mark messages for deletion.
  549. .TP
  550. .B known_hosts
  551. (String)
  552. Used in conjunction with the variable
  553. .BR auto_route ,
  554. this variable is set to a list of hosts, separated by spaces, tabs,
  555. and/or commas, and describes
  556. the hosts with whom you know your machine shares UUCP connections.
  557. When replying to mail, many times you will see that the return path
  558. constructed will have hostnames which your site could call, but instead
  559. the mail has been routed through a number of different machines first.
  560. .sp
  561. For example, if you respond to mail which would mail to the path,
  562. .sp
  563. .ti +2
  564. unicom!pixar!root
  565. .sp
  566. but your know your machine already calls pixar, then sending the mail
  567. to unicom first is unnecessary.
  568. If you have set your known_hosts string to include pixar in its list,
  569. the resulting address would look like,
  570. .sp
  571. .ti +2
  572. pixar!root
  573. .sp
  574. Also see the command
  575. .B replyall
  576. for more information on constructing correct return addresses.
  577. .TP
  578. .B lister
  579. (String)
  580. Default arguments to the \*Qls\*U command for printing the
  581. contents of a directory.
  582. .TP
  583. .B mbox
  584. (String)
  585. Set to the pathname of a file you'd like mush to use as the default
  586. holder for read mail.
  587. The default is ~/mbox.
  588. .TP
  589. .B metoo
  590. (Boolean)
  591. When replying to mail, you are normally deleted from the list of
  592. recipients.
  593. If metoo is set, you remain on the list.
  594. See the 
  595. .B alternates
  596. command
  597. for information on determining whether or not you're even on the list.
  598. .TP
  599. .B mil_time
  600. (Boolean)
  601. Whenever the time is displayed in a message header or in the prompt,
  602. it can be displayed in either 12-hour am/pm format, or in 24 hour
  603. military time format.
  604. The default is the 12 hour format, but can be
  605. reset to use the 24 hour format by setting this variable.
  606. .TP
  607. .B newline
  608. (Boolean/string)
  609. If set, carriage returns are ignored.
  610. If set to a string, that string is executed as a command when a
  611. carriage return is typed.
  612. Otherwise, carriage return prints the next undeleted message.
  613. .TP
  614. .B no_expand
  615. (Boolean)
  616. When a
  617. .I Mush
  618. alias is used to reference a list of addresses, the list is expanded on
  619. the To: and Cc: lines to indicate the complete list of all the recipients of
  620. the message.
  621. When no_expand is set, aliases are not expanded and the headers
  622. reflect the same information as typed by the user.
  623. .TP
  624. .B no_hdr
  625. (Boolean)
  626. If set, this variable tells 
  627. .I Mush
  628. not to include your personalized mail headers in messages.
  629. This does not unset your headers, it just disables them.
  630. .TP
  631. .B no_reverse
  632. (Boolean)
  633. In curses mode and in the tool mode, reverse video is not used to indicate the 
  634. .I "current message"
  635. if this variable is set.
  636. In the tool mode, if reverse video is not in use,
  637. text is displayed in \*Qbold\*U.
  638. .TP
  639. .B nosave
  640. (Boolean)
  641. When composing a letter, the user can terminate the letter without
  642. sending it using the tidle escape \*Q~q\*U or by sending two \*Qinterrupt\*U
  643. signals.
  644. When the message is terminated, a copy of it is saved to the
  645. file \*Qdead.letter\*U in the user's home directory or to the file described
  646. by the variable,
  647. .BR dead .
  648. If the variable,
  649. .B nosave
  650. is set, then a backup copy of the message will not be saved.
  651. .TP
  652. .B pager
  653. (String)
  654. If a message is longer than the number of lines that the variable
  655. .B crt
  656. is set to, then this program is executed to view a message.
  657. If the user does not have this variable set, the user's environment PAGER
  658. is checked.
  659. If this isn't set, then the default value for pager (set up
  660. by the system manager) is used.
  661. This may or may not be the internal pager.
  662. To use the internal pager, you may set the variable pager to
  663. .I internal
  664. or to a null string.
  665. .TP
  666. .B pre_indent_str
  667. (String)
  668. If this variable is set, when including the body of a message into an outgoing
  669. mail message (using the \-i option to
  670. .I reply
  671. or
  672. .IR mail ,
  673. or when using the \*Q~i\*U escape),
  674. a line preceding the first line of
  675. included text is printed using the string value of the variable.
  676. This string uses the same printf style formatting characters as the
  677. .B hdr_format
  678. variable.
  679. For example, you could set
  680. .B pre_indent_str
  681. as follows:
  682. .sp
  683. .ti +2
  684. set pre_indent_str = '[In the message entitled "%s", on %7d\n %n writes:]'
  685. .sp
  686. You can then include a message body using \*Q~i\*U, and you might
  687. get something like this:
  688. .sp
  689. .in +2
  690. .nf
  691. [In the message entitled "This is a test.", on Jan 19,
  692.  Dan Heller writes:]
  693. > This is a test message to show how
  694. > pre_indent_str might be used.
  695. .ti -2
  696. .sp
  697. .fi
  698. This example assumes that the string value of
  699. .B indent_str
  700. is not set.
  701. .TP
  702. .B post_indent_str
  703. (String)
  704. This variable has the same function as
  705. .B pre_indent_str
  706. except that the string is inserted into the message body
  707. .I after
  708. the text of the included message rather than before.
  709. The purpose of this variable is to complement the string described by
  710. the variables
  711. .B pre_indent_str
  712. and
  713. .BR indent_str .
  714. For example,
  715. .sp
  716. .in +2
  717. .nf
  718. set pre_indent_str = "/*"
  719. set indent_str = " * "
  720. set post_indent_str = " */"
  721. .sp
  722. .ti -2
  723. An included message might look something like this:
  724. .sp
  725. /*
  726.  * This is a test message to show how
  727.  * post_indent_str and pre_indent_str
  728.  * can work together with indent_str.
  729.  */
  730. .fi
  731. .in -2
  732. .TP
  733. .B printer
  734. (String)
  735. Used to set the default printer for the lpr command.
  736. .TP
  737. .B print_cmd
  738. (String)
  739. This string should describe UNIX command other than "lpr" for sending
  740. messages to the line printer.
  741. Some people may choose to use a device independent
  742. troff style program, but virtually any UNIX command will suffice.
  743. Common usage might include:
  744. .sp
  745. .ti +2
  746. set print_cmd = 'ptroff -ms -Plp'
  747. .ti +2
  748. lpr .-$
  749. .sp
  750. This command would send all messages from the current message to the last
  751. message through the ptroff command, supplying the appropriate arguments.
  752. Uncommon, but legal usage might include:
  753. .sp
  754. .ti +2
  755. set print_cmd = 'write frank ttyp0'
  756. .ti +2
  757. lpr *
  758. .sp
  759. This command will send all your messages through to the \*Qwrite\*U
  760. program and display them on Frank's terminal.
  761. .sp
  762. .TP
  763. .B prompt
  764. (String)
  765. You can set your prompt to tell you many different pieces of information.
  766. By default, the prompt is set to the string,
  767. .sp
  768. .ti +2
  769. \*QMsg %m of %t: \*U
  770. .sp
  771. If you have 10 messages and your current message is 5, then your prompt
  772. would look like:
  773. .sp
  774. .ti +2
  775. Msg 5 of 10:
  776. .sp
  777. The string value that prompt is set to will be printed as your prompt.
  778. If the string contains a `%', then that character is
  779. ignored, the next character is evaluated and an appropriate
  780. value is printed in its place:
  781. .sp
  782. .nf
  783. .in +2
  784. .ta 0.5i
  785. %d    number of deleted messages
  786. %D    today's day (Sun, Mon, Tue, ...)
  787. %f    filename of the current folder
  788. %m    \*Qcurrent message\*U number
  789. %n    number of \*Qnew\*U messages
  790. %N    today's date (Number of the day in the month)
  791. %T    current time (hours and seconds)
  792. %t    total number of messages
  793. %u    number of unread messages
  794. %Y    this year
  795. \\n    a newline
  796. \\t    a tab
  797. .fi
  798. .in -2
  799. .TP
  800. .B quiet
  801. (Boolean)
  802. If set, the currently running version of
  803. .I Mush
  804. is not printed on startup.
  805. .TP
  806. .B record
  807. (String)
  808. Set to the name of a file to record all outgoing mail.
  809. This should be a full pathname or the current directory is searched.
  810. The pathname may begin with `+' (indicating the user's ~/Mail directory
  811. or the value of the 
  812. .B folder
  813. variable) or with a `~' (or \*Q~user\*U)
  814. indicating the user's home directory.
  815. .TP
  816. .B reply_to_hdr
  817. (String)
  818. When replying to mail,
  819. .I Mush
  820. searches for return paths from the message by searching for
  821. the message headings \*QReply-to\*U, \*QReturn-path\*U, and \*QFrom:\*U,
  822. in that order.
  823. If none are found, then the first line of the
  824. message created by the delivery system is parsed and the address
  825. given there is used.
  826. If the variable
  827. .B reply_to_hdr
  828. is set to a of headers (delimited by spaces or commas), then that list
  829. is searched.
  830. If none of the headers listed in the variable exist
  831. in the message, then a warning message is printed and the default
  832. headers are used.
  833. See the
  834. .B reply
  835. command for more details.
  836. .TP
  837. .B sendmail
  838. (String)
  839. If set, the program and arguments described by this variable will
  840. be executed to actually deliver mail sent by
  841. .I Mush.
  842. .TP
  843. .B screen
  844. (Numeric)
  845. May be set to the number of message headers to display at a time in the
  846. line and curses modes.
  847. .TP
  848. .B screen_win
  849. (Numeric)
  850. Man be set to the number of message headers to display in the tool mode.
  851. A subwindow is created for message headers, and its size is large
  852. enough to hold $screen_win headers.
  853. .TP
  854. .B show_deleted
  855. (Boolean)
  856. If true, deleted message headers are displayed along with
  857. other messages ('*' indicates a deleted message).
  858. In curses mode, this variable is ignored and deleted messages are always
  859. displayed with other messages to facilitate undeleting messages.
  860. .TP
  861. .B show_hdrs
  862. (String)
  863. Set to a list (space and/or comma separated) of headers which are to be the
  864. only headers displayed when viewing a message.
  865. This variable disables the headers supressed by the
  866. .B ignore
  867. command.
  868. For example,
  869. .sp
  870. .ti +2
  871. set show_hdrs = "from date subject to cc"
  872. .sp
  873. will only display the headers,
  874. .B From: Date: Subject: To: Cc:
  875. in their entirety.
  876. .TP
  877. .B sort
  878. (Boolean/string)
  879. The value of this variable is the same as the arguments to the
  880. .B sort
  881. command.
  882. This variable is used for the initialization file to presort
  883. mail in the system mailbox upon entering mush.
  884. See the COMMANDS section for more information.
  885. .TP
  886. .B squeeze
  887. (Boolean)
  888. Whenever messages are read, piped, or saved, if this variable is set,
  889. all consecutive blank lines are squeezed into one blank line.
  890. .TP
  891. .B toplines
  892. (Numeric)
  893. The number of lines of a message to print when the "top" command
  894. is issued.
  895. If unset, $crt lines are printed.
  896. .TP
  897. .B unix
  898. (Boolean)
  899. If set, commands which are not
  900. .I Mush
  901. commands are considered to be
  902. .I UNIX
  903. commands.
  904. This removes the inconvenience of requiring the user to do
  905. shell escapes to do quick UNIX commands.
  906. For systems that support job control, SIGTSTP will stop the entire shell as
  907. well as the process being executed.
  908. When SIGCONT is delivered, both will receive the
  909. signal and the shell will continue to wait for the job to finish.
  910. .sp
  911. Due to the lack of real job control, input/output redirection and UNIX command
  912. piping, this mode of the shell is not intended to be used as a login shell.
  913. .sp
  914. If a
  915. .I Mush
  916. command conflicts with a UNIX command, use the command
  917. .B sh
  918. to force execution as a shell command.
  919. .sp
  920. .I "WARNING: Be aware that Mush commands return message lists, NOT TEXT."
  921. You cannot pipe UNIX or shell commands to or from UNIX commands.
  922. UNIX commands should be simple commands without pipes or metacharacters.
  923. .sp
  924. This feature is not available for the graphics (tool-based) mode.
  925. .TP
  926. .B verbose
  927. (Boolean)
  928. Passes verbose flag to mail delivery systems when sending mail.
  929. .TP
  930. .B verify
  931. (Boolean)
  932. When through editing messages, just before sending,
  933. .B verify
  934. will ask you if you want to send, continue editing, or abort the
  935. whole message all together.
  936. .TP
  937. .B visual
  938. (String)
  939. May be set to the visual editor to use when ~v is specified.
  940. Default is vi.
  941. The visual editor is invoked by the \-e arguments to the
  942. commands, 
  943. .B respond
  944. and
  945. .BR mail .
  946. .TP
  947. .B warning
  948. (Boolean)
  949. If set, warning messages are printed when:
  950. .in +4
  951. .ti -2
  952. \(bu a command line alias (\*Qcmd\*U) looks like a command.
  953. .br
  954. For example,
  955. .ti +2
  956. cmd mail 'set fortune; \\mail'
  957. .ti +2
  958. cmd respond 'unset fortune; \\respond;'
  959. .ti -2
  960. \(bu a variable is set differently from its default value.
  961. .br
  962. For example, if the escape character is set to something other
  963. that the tilde (~), then a warning message will be printed.
  964. .ti -2
  965. \(bu a date format from a message is unknown.
  966. .br
  967. The date of a message is taken from the \fBDate:\f header.
  968. If the date on that header is unknown, other headers are searched for a
  969. valid date format until a legal one is found.
  970. This date may not be
  971. correct in that it was the date the message was received, not sent.
  972. .in -4
  973. .sp
  974. The intent is so that users who are used to their own environments
  975. will be aware of changes in other environments should they be forced
  976. to use them.
  977. There may also be warning messages of failed routines
  978. or assertions which are not fatal enough to interrupt normal running
  979. of the program.
  980. .TP
  981. .B wrap
  982. (Boolean)
  983. Normally, when the last message is deleted, the current message
  984. pointer remains pointing to the last message and the user is done
  985. reviewing his mail.
  986. If the
  987. .B wrap
  988. variable is set, the current message pointer will wrap around to the
  989. beginning of the user's messages again to the next undeleted message.
  990. This also applies to the
  991. .B next
  992. command.
  993. .SH "MAIL ADDRESSES"
  994. Whenever a command which requires a user address or set of addresses
  995. is specified
  996. .RB ( mail ,
  997. .BR reply ,
  998. .BR alias ,
  999. .BR etc ),
  1000. the addresses given must be separated by commas.
  1001. Most casual users specify addresses that contain no comments or whitespace.
  1002. The simplest addresses are just the login names of the users you wish to send
  1003. your message to:
  1004. .sp
  1005. .ti +2
  1006. \fBmail\fR fred barney wilma betty
  1007. .sp
  1008. In these cases,
  1009. .I Mush
  1010. can figure out that they are separate addresses and
  1011. insert commas between addresses automatically.
  1012. .sp
  1013. .ti +2
  1014. To: fred, barney, wilma, betty
  1015. .sp
  1016. Addresses may also contain `!', `@' and `%' characters which are used
  1017. to separate hostnames and the final user name from each other.
  1018. This is primarily used to mail to users on other machines.
  1019. UUCP addresses are specified as
  1020. .sp
  1021. .ti +2
  1022. host1!host2!user
  1023. .sp
  1024. where there may be as many hosts as necessary to route the message
  1025. to the recipient user.
  1026. Here, the user's account is on \*Qhost2\*U
  1027. and that machine is connected to \*Qhost1\*U.
  1028. .I Domain
  1029. addresses (also called Arpanet and RFC822 addresses) are specified as
  1030. .sp
  1031. .ti +2
  1032. user@host.domain
  1033. .ti +2
  1034. user%host2.domain@host1
  1035. .sp
  1036. where \*Qdomain\*U is a domain name such as \*Q.berkeley.edu\*U or \*Q.com\*U.
  1037. As in the first example, the user is on \*Qhost2\*U, but that machine talks
  1038. to \*Qhost1\*U.
  1039. It is beyond the scope of this document to discuss in detail the ramifications
  1040. of internetwork mailing.
  1041. More information can be obtained through your system manager.
  1042. .PP
  1043. .I Mush
  1044. understands addresses containing a comment field.
  1045. Comment fields do not affect the destination address of mail being sent.
  1046. These fields are purely for
  1047. human legibility and may be specified according to the following constraints: 
  1048. .sp
  1049. Anything within angle brackets is an address; whatever is outside of the
  1050. address is considered a comment:
  1051. .sp
  1052. .ti +2
  1053. Dan Heller <sun!island!argv>
  1054. .ti +2
  1055. Dan Heller <argv%island@sun.com>
  1056. .sp
  1057. Anything that has parentheses is a comment; whatever is outside of the
  1058. parentheses is considered the address:
  1059. .sp
  1060. .ti +2
  1061. sun!island!argv (Dan Heller)
  1062. .ti +2
  1063. argv%island@sun.com (Dan Heller)
  1064. .sp
  1065. Double quotes (") are treated just like parentheses:
  1066. .sp
  1067. .ti +2
  1068. "Dan Heller" sun!island!argv
  1069. .ti +2
  1070. "Dan Heller" island!argv@sun.com
  1071. .sp
  1072. If the comment is to contain a comma, the first case above may not be used;
  1073. you must use either the parenthesis or double-quote cases.
  1074. .sp
  1075. .ti +2
  1076. fred@flintstone.bed.rock (Fred Flintstone, Cave Man)
  1077. .sp
  1078. If the comment contains unbalanced quotes, unpredictable results may occur
  1079. (Mush won't deliver the mail).
  1080. .sp
  1081. Since the angle brackets have the highest precedence, quotes or parentheses
  1082. may be used in conjunction with one another.
  1083. .sp
  1084. .ti +2
  1085. Yabba Dabba Doo (Fred Flintstone) <fred>
  1086. .ti +2
  1087. Scoobie "Doobie" Doo <scooby@shaggys.mystery.machine>
  1088. .PP
  1089. Multiple addresses may appear on a line:
  1090. .sp
  1091. .in +2
  1092. island!argv@sun.com argv@garp.mit.edu dheller
  1093. .in -2
  1094. .sp
  1095. Because there is no indication of comments (parenthesis, angle bracket,
  1096. or quotes), it is assumed that these are separate addresses and mush will
  1097. insert commas between these addresses accordingly.
  1098. It is for this reason that the user is encouraged to explicitly insert
  1099. commas between all mail addresses and not depend on the automation of comma
  1100. insertion to correctly separate addresses from one another.
  1101. .PP
  1102. Mail aliases may contain addresses of the form described above.
  1103. .sp
  1104. .nf
  1105. .in +2
  1106. .ta 1.5i
  1107. alias george    George Jetson <george@spacely.space.sprokets>
  1108. alias jane    Jane Jetson <jane@sky-high.appts>
  1109. alias group    george, jane
  1110. .in -2
  1111. .fi
  1112. .sp
  1113. You can mail using the alias as an address and it will be expanded
  1114. accordingly.
  1115. You can not, however, reference an alias and specify a
  1116. comment or another address at the same time.
  1117. .sp
  1118. .ti +2
  1119. To: The Jetsons <group>
  1120. .sp
  1121. The alias \*Qgroup\*U will not be expanded because the angle brackets
  1122. causes it to be considered as another address entirely.
  1123. .SH FILES
  1124. .nf
  1125. .ta 2.0i
  1126. /usr/spool/mail/*    Directory for incoming mail
  1127. ~/Mail    Default \fBfolder\fR directory
  1128. ~/mbox    File where old mail is saved
  1129. ~/.mushrc    File giving initial \fIMush\fR commands
  1130. ~/.mailrc    Alternate initialization file
  1131. ~/.edXXXXXXX    Temporary for file for outgoing messages
  1132. ~/.mushXXXXXX    Temporary mail file (copy of current folder)
  1133. .fi
  1134. .PP
  1135. Temporary files which are created by the program are always
  1136. created with read/write access to the owner only; group and other
  1137. permissions are never set.
  1138. This is also true for the /usr/spool/mail/* files.
  1139. All other files created by the user via commands internal or external
  1140. to the program have permissions set by the user's default umask.
  1141. If the umask is reset within the program, the mask remains
  1142. intact even after exiting.
  1143. Remember to set the variable
  1144. .B unix
  1145. before attempting to set the umask value.
  1146. .PP
  1147. If your system is using Sun Microsystem's NFS, take special note to
  1148. read the manual page for mount(1).
  1149. Filesystems mounted for read/write
  1150. access should be mounted as \*Qhard\*U NFS mounts or you may lose
  1151. mailboxes during a timeout during a write or update.
  1152. .PP
  1153. Filesystems that use RFS still have bugs to be ironed out in the way
  1154. of owners and permissions concerning utime(2).
  1155. .SH "SEE ALSO"
  1156. .IR Mail (1),
  1157. .IR binmail (1),
  1158. .IR csh (1),
  1159. .IR aliases (5),
  1160. .IR mount (1),
  1161. .IR mailaddr (7),
  1162. .IR sendmail (8),
  1163. .IR printf (3),
  1164. .IR execl (3),
  1165. .IR umask (1),
  1166. .IR utime (2).
  1167. .SH AUTHOR
  1168. This code was written entirely by Dan Heller and contains no UNIX sources.
  1169. It is also not a modified version of any other mail user agent.
  1170. Similarities
  1171. with any other mailer may have been designed for compatibility reasons.
  1172. .PP
  1173. argv@spam.istc.sri.com    sun!island!argv
  1174. .SH BUGS
  1175. The curses interface uses the curses library.
  1176. The routines from the library that are used are the most basic and simple to
  1177. avoid possible bugginess that different versions of UNIX might have.
  1178. However, one unavoidable problem is the reverse video mode.
  1179. Depending on your terminal,
  1180. the termcap entry for it, and the version of curses you are running,
  1181. the reverse video may makes things worse than desired.
  1182. In such situations, the user should set the variable
  1183. .B no_reverse
  1184. to not get reverse video.
  1185. \&`^R' may still be entered at runtime in the curses
  1186. interface to toggle reverse video.
  1187. .PP
  1188. If the program is already running and the system [later] has to swap
  1189. and there is no swap space left, there may be problems.
  1190. One such problem is sending mail.
  1191. If this happens, then sending mail
  1192. will fail and a segmentation fault from the spawned forked child will occur
  1193. unless the -v flag was given to mail.
  1194. The unsent letter will not be removed from the editing file ($home/.edXXXXXX)
  1195. and may be recovered.
  1196. .PP
  1197. Many functions available to the line oriented mode (shell mode)
  1198. are not available to the tool mode.
  1199. For example,
  1200. .B pick
  1201. may not be directly accessed although experienced users may find that
  1202. typing pick commands within single backquotes in the \*Qrange\*U panel item
  1203. in the header window will indeed pick messages.
  1204. This is mostly for selecting the \*Qdelete range\*U item
  1205. or the middle mouse button icon in the header panel.
  1206. .PP
  1207. Shell escapes (of any kind) may not be called from
  1208. the tool/graphics mode.
  1209. The reason for this is that there is no tty
  1210. .I window
  1211. to run commands from.
  1212. It is impossible to determine whether or not the user wants to run an
  1213. interactive program or not so it is best to disallow its usage all together.
  1214. The experienced window user
  1215. can figure out how to really do shell layers from within the tool mode.
  1216. .PP
  1217. Toggling from the curses mode to the line mode to get the full
  1218. functionality of the shell/line mode is unfortunately necessary
  1219. in the name of \*Quser friendliness.\*U
  1220. Mostly, this is only necessary
  1221. for piping of commands and using the pick command.
  1222. .PP
  1223. The function keys and their ability to
  1224. .I work
  1225. has been variable depending on the version of SunWindows/SunView
  1226. your Sun Workstation has.
  1227. From time to time, it works, but when it
  1228. doesn't, it seems to be related to other user or system definable
  1229. dot-files or whatever.
  1230. I hardly use them, so I haven't had a chance
  1231. to really debug that part much.
  1232. My experiences have shown them to
  1233. work in Sun versions 2.0, 2.2, and 3.3, but not any other version.
  1234. .PP
  1235. When using
  1236. .B vi
  1237. in the tool/graphics mode, periodically the window will be one
  1238. line \*Qshort.\*U
  1239. That is, scrolling will be off by one line and you may
  1240. have to redraw the window (using \*Qz.\*U in vi) to get it in sync again.
  1241. This is a known problem with SunWindows, but Sun refuses to fix it
  1242. as SunWindows are \*Qobsolete.\*U
  1243. .PP
  1244. When running on full filesystems,
  1245. .I Mush
  1246. may complain or not even run since it needs temporary space with which
  1247. to work.
  1248. Instead of finding new filesystems on it's own,
  1249. .I Mush
  1250. leaves this task up to the user.
  1251. The workaround is to set the variable
  1252. .B home
  1253. in the initialization file to be a writable place in a filesystem which
  1254. has enough disk space.
  1255. This will set the user's home directory to be
  1256. set incorrectly, but resetting the home manually once in the shell
  1257. will correct the problem.
  1258. .PP
  1259. Most of the other known and documented bugs
  1260. are in the supplied README file accompanying the source.
  1261. Of course, the source is an excellent place to look as most known bugs are
  1262. documented right in the source code.
  1263. A good way to track suspicious bugs is to use the
  1264. .B debug
  1265. command, but note that
  1266. this command is very difficult to use in curses mode.
  1267.