| 1 | @comment{-*- Dictionary: /afs/cs/project/clisp/scribe/hem/hem; Mode: spell; Package: Hemlock -*-}
|
|---|
| 2 | @chap[The Mail Interface]
|
|---|
| 3 | @section[Introduction to Mail in Hemlock]
|
|---|
| 4 |
|
|---|
| 5 | @index[MH interface]@label[introduction]
|
|---|
| 6 | @hemlock provides an electronic mail handling facility via an interface to the
|
|---|
| 7 | public domain @i[Rand MH Message Handling System]. This chapter assumes that
|
|---|
| 8 | the user is familiar with the basic features and operation of @mh, but it
|
|---|
| 9 | attempts to make allowances for beginners. Later sections of this chapter
|
|---|
| 10 | discuss setting up @mh, profile components and special files for formatting
|
|---|
| 11 | outgoing mail headers, and backing up protected mail directories on a
|
|---|
| 12 | workstation. For more information on @mh, see the @i[Rand MH Message Handling
|
|---|
| 13 | System Tutorial] and the @i[Rand MH Message Handling System Manual].
|
|---|
| 14 |
|
|---|
| 15 | The @hemlock interface to @mh provides a means for generating header (@f[scan])
|
|---|
| 16 | lines for messages and displaying these headers in a @hid[Headers] buffer.
|
|---|
| 17 | This allows the user to operate on the @i[current message] as indicated by the
|
|---|
| 18 | position of the cursor in the @hid[Headers] buffer. The user can read, reply
|
|---|
| 19 | to, forward, refile, or perform various other operations on the current
|
|---|
| 20 | message. A user typically generates a @hid[Headers] buffer with the commands
|
|---|
| 21 | @hid[Message Headers] or @hid[Incorporate and Read New Mail], and multiple such
|
|---|
| 22 | buffers may exist simultaneously.
|
|---|
| 23 |
|
|---|
| 24 | Reading a message places its text in a @hid[Message] buffer. In a manner
|
|---|
| 25 | similar to a @hid[Headers] buffer, this allows the user to operate on that
|
|---|
| 26 | message. Most @hid[Headers] buffer commands behave the same in a @hid[Message]
|
|---|
| 27 | buffer. For example, the @hid[Reply to Message] command has the same effect in
|
|---|
| 28 | both @hid[Headers] mode and @hid[Message] mode. It creates a @hid[Draft]
|
|---|
| 29 | buffer and makes it the current buffer so that the user may type a reply to the
|
|---|
| 30 | current message.
|
|---|
| 31 |
|
|---|
| 32 | The @hid[Send Message] command originates outgoing mail. It generates a
|
|---|
| 33 | @hid[Draft] buffer in which the user composes a mail message. Each @hid[Draft]
|
|---|
| 34 | buffer has an associated pathname, so the user can save the buffer to a file as
|
|---|
| 35 | necessary. Invoking @hid[Send Message] in a @hid[Headers] or @hid[Message]
|
|---|
| 36 | buffer associates the @hid[Draft] buffer with a @hid[Message] buffer. This
|
|---|
| 37 | allows the user to easily refer to the message being replied to with the
|
|---|
| 38 | command @hid[Goto Message Buffer]. After the user composes a draft message, he
|
|---|
| 39 | can deliver the message by invoking the @hid[Deliver Message] command in the
|
|---|
| 40 | @hid[Draft] buffer (which deletes both the this buffer and any associated
|
|---|
| 41 | @hid[Message] buffer), or he can delay this action. Invoking @hid[Deliver
|
|---|
| 42 | Message] when not in a @hid[Draft] buffer causes it to prompt for a draft
|
|---|
| 43 | message ID, allowing previously composed and saved messages to be delivered
|
|---|
| 44 | (even across distinct Lisp invocations).
|
|---|
| 45 |
|
|---|
| 46 | @index[virtual message deletion]
|
|---|
| 47 | The @hemlock mail system provides a mechanism for @i[virtual message deletion].
|
|---|
| 48 | That is, the @hid[Delete Message] command does not immediately delete a message
|
|---|
| 49 | but merely flags the message for future deletion. This allows the user to
|
|---|
| 50 | undelete the messages with the @hid[Undelete Message] command. The
|
|---|
| 51 | @hid[Expunge Messages] command actually removes messages flagged for deletion.
|
|---|
| 52 | After expunging a deleted message, @hid[Undelete Messages] can no longer
|
|---|
| 53 | retrieve it. Commands that read messages by sequencing through a @hid[Headers]
|
|---|
| 54 | buffer typically ignore those marked for deletion, which makes for more fluid
|
|---|
| 55 | reading if a first pass has been made to delete uninteresting messages.
|
|---|
| 56 |
|
|---|
| 57 | After handling messages in a @hid[Headers] buffer, there may be messages
|
|---|
| 58 | flagged for deletion and possibly multiple @hid[Message] buffers lying around.
|
|---|
| 59 | There is a variety of commands that help @i[terminate] a mail session.
|
|---|
| 60 | @hid[Expunge Messages] will flush the messages to be deleted, leaving the
|
|---|
| 61 | buffer in an updated state. @hid[Delete Headers Buffer and Message Buffers]
|
|---|
| 62 | will delete the @hid[Headers] buffer and its corresponding @hid[Message]
|
|---|
| 63 | buffers. @hid[Quit Headers] is a combination of these two commands in that it
|
|---|
| 64 | first expunges messages and then deletes all the appropriate buffers.
|
|---|
| 65 |
|
|---|
| 66 | One does not have to operate only on messages represented in a @hid[Headers]
|
|---|
| 67 | buffer. This is merely the nominal mode of interaction. There are commands
|
|---|
| 68 | that prompt for a folder, an @mh message specification (for example, "@f[1 3 6
|
|---|
| 69 | last]", "@f[1-3 5 6]", "@f[all]", "@f[unseen]"), and possibly a @f[pick]
|
|---|
| 70 | expression. @f[Pick] expressions allow messages to be selected based on header
|
|---|
| 71 | field pattern matching, body text searching, and date comparisons; these can be
|
|---|
| 72 | specified using either a Unix shell-like/switch notation or a Lisp syntax,
|
|---|
| 73 | according to one's preference. See section @ref[scanning] for more details.
|
|---|
| 74 |
|
|---|
| 75 | A @i[mail-drop] is a file where a Unix-based mail system stores all messages a
|
|---|
| 76 | user receives. The user's mail handling program then fetches these from the
|
|---|
| 77 | mail-drop, allowing the user to operate on them. Traditionally one locates his
|
|---|
| 78 | mail-drop and mail directory on a mainframe machine because the information on
|
|---|
| 79 | mainframes is backed up on magnetic tape at least once per day. Since @hemlock
|
|---|
| 80 | only runs under CMU @clisp on workstations, and one's mail directory is not
|
|---|
| 81 | usually world writable, it is not possible to adhere to a standard arrangement.
|
|---|
| 82 | Since @mh provides for a remote mail-drop, and CMU's Remote File System has a
|
|---|
| 83 | feature allowing authentication across a local area network, one can use
|
|---|
| 84 | @hemlock to fetch his mail from a mainframe mail-drop (where it is backed up
|
|---|
| 85 | before @hemlock grabs it) and store it on his workstation. Reading mail on a
|
|---|
| 86 | workstation is often much faster and more comfortable because typically it is a
|
|---|
| 87 | single user machine. Section @ref[backing-up] describes how to back up one's
|
|---|
| 88 | mail directory from a workstation to a mainframe.
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 | @section[Constraints on MH to use Hemlock's Interface]
|
|---|
| 92 |
|
|---|
| 93 | @index[constraints for mail interface]@label[constraints]
|
|---|
| 94 | There are a couple constaints placed on the user of the @hemlock interface to
|
|---|
| 95 | @mh. The first is that there must be a draft folder specified in one's @mh
|
|---|
| 96 | profile to use any command that sends mail. Also, to read new mail, there must
|
|---|
| 97 | be an @f[Unseen-Sequence:] component in one's @mh profile. The default @mh
|
|---|
| 98 | profile does not specify these components, so they must be added by the user.
|
|---|
| 99 | The next section of this chapter describes how to add these components.
|
|---|
| 100 | Another constraint is that @hemlock requires its own @f[scan] line format to
|
|---|
| 101 | display headers lines in a @hid[Headers] buffer. See the description of the
|
|---|
| 102 | variable @hid[MH Scan Line Form] for details.
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | @section[Setting up MH]
|
|---|
| 106 |
|
|---|
| 107 | @index[setting up the mail interface]@label[setting-up]
|
|---|
| 108 | @index[mail profile]@index[MH profile]
|
|---|
| 109 | Get an @mh default profile and mail directory by executing the @mh @f[folder]
|
|---|
| 110 | utility in a Unix shell. When it asks if it should make the "@f[inbox]"
|
|---|
| 111 | folder, answer "@b[yes]". This creates a file called "@f[.mh_profile]" in the
|
|---|
| 112 | user's home directory and a directory named "@f[Mail]".
|
|---|
| 113 |
|
|---|
| 114 | Edit the "@f[.mh_profile]" file inserting two additional lines. To send mail
|
|---|
| 115 | in @hemlock, the user must indicate a draft folder by adding a
|
|---|
| 116 | @f[Draft-Folder:] line with a draft folder name @dash "@f[drafts]" is a common
|
|---|
| 117 | name:
|
|---|
| 118 | @begin[example]
|
|---|
| 119 | Draft-Folder: drafts
|
|---|
| 120 | @end[example]
|
|---|
| 121 |
|
|---|
| 122 | Since the mail-drop exists on a remote machine, the following line must
|
|---|
| 123 | also be added:
|
|---|
| 124 | @begin[example]
|
|---|
| 125 | MailDrop: /../<hostname>/usr/spool/mail/<username>
|
|---|
| 126 | @end[example]
|
|---|
| 127 |
|
|---|
| 128 | Since the user's mail-drop is on a separate machine from his mail directory
|
|---|
| 129 | (and where the user runs @hemlock), it is necessary to issue the following
|
|---|
| 130 | command from the Unix shell (on the workstation). This only needs to be done
|
|---|
| 131 | once.
|
|---|
| 132 | @begin[programexample]
|
|---|
| 133 | /usr/cs/etc/rfslink -host <hostname> /usr/spool/mail/<username>
|
|---|
| 134 | @end[programexample]
|
|---|
| 135 | Note that @b[<hostname>] is not a full ARPANET domain-style name. Use an
|
|---|
| 136 | abbreviated CMU host name (for example, "@b[spice]" not
|
|---|
| 137 | "@b[spice.cs.cmu.edu]").
|
|---|
| 138 |
|
|---|
| 139 |
|
|---|
| 140 | @section[Profile Components and Customized Files]
|
|---|
| 141 |
|
|---|
| 142 | @subsection[Profile Components]
|
|---|
| 143 |
|
|---|
| 144 | @label[Profile]
|
|---|
| 145 | The following are short descriptions about profile components that are either
|
|---|
| 146 | necessary to using @hemlock@comment{}'s interface to @mh or convenient for using @mh in
|
|---|
| 147 | general:
|
|---|
| 148 |
|
|---|
| 149 | @begin[description]
|
|---|
| 150 | @f[Path:]@\
|
|---|
| 151 | This specifies the user's mail directory. It can be either a full pathname or
|
|---|
| 152 | a pathname relative to the user's home directory. This component is
|
|---|
| 153 | @i[necessary] for using @mh.
|
|---|
| 154 |
|
|---|
| 155 | @f[MailDrop:]@\
|
|---|
| 156 | This is used to specify one's remote mail-drop. It is @i[necessary] for
|
|---|
| 157 | @hemlock only when using a mail-drop other than "@f[/usr/spool/mail/<user>]" on
|
|---|
| 158 | the local machine.
|
|---|
| 159 |
|
|---|
| 160 | @f[Folder-Protect:], @f[Msg-Protect:]@\
|
|---|
| 161 | These are set to 700 and 600 respectively to keep others from reading one's
|
|---|
| 162 | mail. At one time the default values were set for public visibility of mail
|
|---|
| 163 | folders. Though this is no longer true, these can be set for certainty. The
|
|---|
| 164 | 700 protection allows only user read, write, and execute (list access for
|
|---|
| 165 | directories), and 600 allows only user read and write. These are not necessary
|
|---|
| 166 | for either @mh or the @hemlock interface.
|
|---|
| 167 |
|
|---|
| 168 | @f[Unseen-Sequence:]@\
|
|---|
| 169 | When mail is incorporated, new messages are added to this sequence, and as
|
|---|
| 170 | these messages are read they are removed from it. This allows the user at any
|
|---|
| 171 | time to invoke an @mh program on all the unseen messges of a folder easily. An
|
|---|
| 172 | example definition is:
|
|---|
| 173 | @begin[example]
|
|---|
| 174 | Unseen-Sequence: unseen
|
|---|
| 175 | @end[example]
|
|---|
| 176 | Specifying an unseen-sequence is @i[necessary] to use @hemlock@comment{}'s
|
|---|
| 177 | interface to @mh.
|
|---|
| 178 |
|
|---|
| 179 | @f[Alternate-Mailboxes:]@\
|
|---|
| 180 | This is not necessary for either @mh or the @hemlock interface. This
|
|---|
| 181 | component tells @mh which addresses that it should recognize as the user. This
|
|---|
| 182 | is used for @f[scan] output formatting when the mail was sent by the user. It
|
|---|
| 183 | is also used by @f[repl] when it sets up headers to know who the user is for
|
|---|
| 184 | inclusion or exclusion from @b[cc]: lists. This is case sensitive and takes
|
|---|
| 185 | wildcards. One example is:
|
|---|
| 186 | @begin[example]
|
|---|
| 187 | Alternate-Mailboxes: *FRED*, *Fred*, *fred*
|
|---|
| 188 | @end[example]
|
|---|
| 189 |
|
|---|
| 190 | @f[Draft-Folder:]@\
|
|---|
| 191 | This makes multiple draft creation possible and trivial to use. Just supply a
|
|---|
| 192 | folder name (for example, "@f[drafts]"). Specifying a draft-folder is
|
|---|
| 193 | @i[necessary] to use @hemlock@comment{}'s interface to @mh.
|
|---|
| 194 |
|
|---|
| 195 | @f[repl: -cc all -nocc me -fcc out-copy]@\
|
|---|
| 196 | This tells the @f[repl] utility to include everyone but the user in the
|
|---|
| 197 | @b[cc:] list when replying to mail. It also makes @f[repl] keep an copy of the
|
|---|
| 198 | message the user sends. This is mentioned because one probably wants to reply
|
|---|
| 199 | to everyone receiving a piece of mail except oneself. Unlike other utilities
|
|---|
| 200 | that send mail, @f[repl] stores personal copies of outgoing mail based on a
|
|---|
| 201 | command line switch. Other @mh utilities use different mechanisms. This line
|
|---|
| 202 | is not necessary to use either @mh or the @hemlock interface.
|
|---|
| 203 |
|
|---|
| 204 | @f[rmmproc: /usr/cs/bin/rm]@\
|
|---|
| 205 | This is not necessary to use @hemlock@comment{}'s interface to @mh, but due to
|
|---|
| 206 | @hemlock@comment{}'s virtual message deletion feature, this causes messages to be deleted
|
|---|
| 207 | from folder directories in a cleaner fashion when they actually get removed.
|
|---|
| 208 | Note that setting this makes @f[rmm] more treacherous if used in the Unix
|
|---|
| 209 | shell.
|
|---|
| 210 | @end[description]
|
|---|
| 211 | @;
|
|---|
| 212 |
|
|---|
| 213 |
|
|---|
| 214 | @subsection[Components Files]
|
|---|
| 215 | @index[components]
|
|---|
| 216 | @label[components-files]
|
|---|
| 217 | @i[Components] files are templates for outgoing mail header fields that specify
|
|---|
| 218 | position and sometimes values for specified fields. Example files are shown
|
|---|
| 219 | for each one discussed here. These should exist in the user's mail directory.
|
|---|
| 220 |
|
|---|
| 221 | For originating mail there is a components file named "@f[components]", and it
|
|---|
| 222 | is used by the @mh utility @f[comp]. An example follows:
|
|---|
| 223 | @begin[example]
|
|---|
| 224 | To:
|
|---|
| 225 | cc:
|
|---|
| 226 | fcc: out-copy
|
|---|
| 227 | Subject:
|
|---|
| 228 | --------
|
|---|
| 229 | @end[example]
|
|---|
| 230 | This example file differs from the default by including the @f[fcc:] line.
|
|---|
| 231 | This causes @mh to keep a copy of the outgoing draft message. Also, though it
|
|---|
| 232 | isn't visible here, the @f[To:], @f[cc:], and @f[Subject:] lines have a space
|
|---|
| 233 | at the end.
|
|---|
| 234 |
|
|---|
| 235 | @index[forwarding components]
|
|---|
| 236 | The "@f[forwcomps]" components file is a template for the header fields of any
|
|---|
| 237 | forwarded message. Though it may be different, our example is the same as the
|
|---|
| 238 | previous one. These are distinct files for @mh@comment{}'s purposes, and it is more
|
|---|
| 239 | flexible since the user might not want to keep copies of forwarded messages.
|
|---|
| 240 |
|
|---|
| 241 | @index[reply components]
|
|---|
| 242 | The "@f[replcomps]" components file is a template for the header fields of any
|
|---|
| 243 | draft message composed when replying to a message. An example
|
|---|
| 244 | follows:
|
|---|
| 245 | @begin[example]
|
|---|
| 246 | %(lit)%(formataddr %<{reply-to}%|%<{from}%|%{sender}%>%>)\
|
|---|
| 247 | %<(nonnull)%(void(width))%(putaddr To: )\n%>\
|
|---|
| 248 | %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
|
|---|
| 249 | %(formataddr{resent-to})\
|
|---|
| 250 | %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
|
|---|
| 251 | %<{fcc}Fcc: %{fcc}\n%>\
|
|---|
| 252 | %<{subject}Subject: Re: %{subject}\n%>\
|
|---|
| 253 | %<{date}In-reply-to: Your message of \
|
|---|
| 254 | %<(nodate{date})%{date}%|%(tws{date})%>.%<{message-id}
|
|---|
| 255 | %{message-id}%>\n%>\
|
|---|
| 256 | --------
|
|---|
| 257 | @end[example]
|
|---|
| 258 | This example file differs from the default by including the @b[resent-to:]
|
|---|
| 259 | field (in addition to the @b[to:] and @b[cc:] fields) of the message being
|
|---|
| 260 | replied to in the @b[cc:] field of the draft. This is necessary for replying
|
|---|
| 261 | to all recipients of a distributed message. Keeping a copy of the outgoing
|
|---|
| 262 | draft message works a little differently with reply components. @mh expects a
|
|---|
| 263 | switch which the user can put in his profile (see section @ref[Profile] of this
|
|---|
| 264 | chapter), and using the @mh formatting language, this file tests for the
|
|---|
| 265 | @f[fcc] value as does the standard file.
|
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 | @section[Backing up the Mail Directory]
|
|---|
| 269 | @index[backing up mail directories]
|
|---|
| 270 | @label[backing-up]
|
|---|
| 271 | The easiest method of backing up a protected mail directory is to copy it into
|
|---|
| 272 | an Andrew File System (AFS) directory since these are backed up daily as with
|
|---|
| 273 | mainframes. The only problem with this is that the file servers may be down
|
|---|
| 274 | when one wants to copy his mail directory since, at the time of this writing,
|
|---|
| 275 | these servers are still under active development; however, they are becoming
|
|---|
| 276 | more robust daily. One can read about the current AFS status in the file
|
|---|
| 277 | @f[/../fac/usr/gripe/doc/vice/status].
|
|---|
| 278 |
|
|---|
| 279 | Using AFS, one could keep his actual mail directory (not a copy thereof) in his
|
|---|
| 280 | AFS home directory which eliminates the issue of backing it up. This is
|
|---|
| 281 | additionally beneficial if the user does not use the same workstation everyday
|
|---|
| 282 | (that is, he does not have his own but shares project owned machines). Two
|
|---|
| 283 | problems with this arrangement result from the AFS being a distributed file
|
|---|
| 284 | system. Besides the chance that the server will be down when the user wants to
|
|---|
| 285 | read mail, performance degrades since messages must always be referenced across
|
|---|
| 286 | the local area network.
|
|---|
| 287 |
|
|---|
| 288 | Facilities' official mechanism for backing up protected directories is called
|
|---|
| 289 | @f[sup]. This is awkward to use and hard to set up, but a subsection here
|
|---|
| 290 | describes a particular arrangement suitable for the user's mail directory.
|
|---|
| 291 |
|
|---|
| 292 |
|
|---|
| 293 | @subsection[Andrew File System]
|
|---|
| 294 | If the user choses to use AFS, he should get copies of @i[Getting Started with
|
|---|
| 295 | the Andrew File System] and @i[Protecting AFS files and directories]. To use
|
|---|
| 296 | AFS, send mail to Gripe requesting an account. When Gripe replies with a
|
|---|
| 297 | password, change it to be the same as the account's password on the
|
|---|
| 298 | workstation. This causes the user to be authenticated into AFS when he logs
|
|---|
| 299 | into his workstation (that is, he is automatically logged into his AFS
|
|---|
| 300 | account). To change the password, first log into the AFS account:
|
|---|
| 301 | @begin[programexample]
|
|---|
| 302 | log <AFS userid>
|
|---|
| 303 | @end[programexample]
|
|---|
| 304 | Then issue the @f[vpasswd] command.
|
|---|
| 305 |
|
|---|
| 306 | All of the example command lines in this section assume the user has
|
|---|
| 307 | @f[/usr/misc/bin] on his Unix shell @f[PATH] environment variable.
|
|---|
| 308 |
|
|---|
| 309 | @paragraph[Copy into AFS:]
|
|---|
| 310 |
|
|---|
| 311 | Make an AFS directory to copy into:
|
|---|
| 312 | @begin[programexample]
|
|---|
| 313 | mkdir /afs/cs.cmu.edu/user/<AFS userid>/mail-backup
|
|---|
| 314 | @end[programexample]
|
|---|
| 315 |
|
|---|
| 316 | This will be readable by everyone, so protect it with the following:
|
|---|
| 317 | @begin[programexample]
|
|---|
| 318 | fs sa /afs/cs.cmu.edu/user/<AFSuserid>/mail-backup System:AnyUser none
|
|---|
| 319 | @end[programexample]
|
|---|
| 320 |
|
|---|
| 321 | Once the AFS account and directory to backup into have been established, the
|
|---|
| 322 | user needs a means to recursively copy his mail directory updating only those
|
|---|
| 323 | file that have changed and deleting those that no longer exist. To do this,
|
|---|
| 324 | issue the following command:
|
|---|
| 325 | @begin[programexample]
|
|---|
| 326 | copy -2 -v -R <mail directory> <AFS backup directory>
|
|---|
| 327 | @end[programexample]
|
|---|
| 328 | Do not terminate either of these directory specifications with a @f[/]. The
|
|---|
| 329 | @f[-v] switch causes @f[copy] to output a line for copy and deletion, so this
|
|---|
| 330 | may be eliminated if the user desires.
|
|---|
| 331 |
|
|---|
| 332 | @paragraph[Mail Directory Lives in AFS:]
|
|---|
| 333 |
|
|---|
| 334 | Assuming the AFS account has been established, and the user has followed the
|
|---|
| 335 | directions in @ref[setting-up], now make an AFS directory to serve as the mail
|
|---|
| 336 | directory:
|
|---|
| 337 | @begin[programexample]
|
|---|
| 338 | mkdir /afs/cs.cmu.edu/user/<AFS userid>/Mail
|
|---|
| 339 | @end[programexample]
|
|---|
| 340 |
|
|---|
| 341 | This will be readable by everyone, so protect it with the following:
|
|---|
| 342 | @begin[programexample]
|
|---|
| 343 | fs sa /afs/cs.cmu.edu/user/<AFSuserid>/Mail System:AnyUser none
|
|---|
| 344 | @end[programexample]
|
|---|
| 345 |
|
|---|
| 346 | Tell @mh where the mail directory is by modifying the profile's
|
|---|
| 347 | "@f[.mh_profile]" (see section @ref[setting-up]) @f[Path:] component (see
|
|---|
| 348 | section @ref[Profile]):
|
|---|
| 349 | @begin[programexample]
|
|---|
| 350 | Path: /afs/cs.cmu.edu/user/<AFS userid>/Mail
|
|---|
| 351 | @end[programexample]
|
|---|
| 352 |
|
|---|
| 353 |
|
|---|
| 354 | @subsection[Sup to a Mainframe]
|
|---|
| 355 | To use @f[sup] the user must set up a directory named "@f[sup]" on the
|
|---|
| 356 | workstation in the user's home directory. This contains different directories
|
|---|
| 357 | for the various trees that will be backed up, so there will be a "@f[Mail]"
|
|---|
| 358 | directory. This directory will contain two files: "@f[crypt]" and "@f[list]".
|
|---|
| 359 | The "@f[crypt]" file contains one line, terminated with a new line, that
|
|---|
| 360 | contains a single word @dash an encryption key. "@f[list]" contains one line,
|
|---|
| 361 | terminated with a new line, that contains two words @dash "@b[upgrade Mail]".
|
|---|
| 362 |
|
|---|
| 363 | On the user's mainframe, a file must be created that will be supplied to the
|
|---|
| 364 | @f[sup] program. It should contain the following line to backup the mail
|
|---|
| 365 | directory:
|
|---|
| 366 |
|
|---|
| 367 | @begin[example]
|
|---|
| 368 | Mail delete host=<workstation> hostbase=/usr/<user> base=/usr/<user> \
|
|---|
| 369 | crypt=WordInCryptFile login=<user> password=LoginPasswordOnWorkstation
|
|---|
| 370 | @end[example]
|
|---|
| 371 | Warning: @i[This file contains the user's password and should be
|
|---|
| 372 | protected appropriately.]
|
|---|
| 373 |
|
|---|
| 374 | The following Unix shell command issued on the mainframe will backup the
|
|---|
| 375 | mail directory:
|
|---|
| 376 |
|
|---|
| 377 | @begin[programexample]
|
|---|
| 378 | sup <name of the sup file used in previous paragraph>
|
|---|
| 379 | @end[programexample]
|
|---|
| 380 |
|
|---|
| 381 | As a specific example, assume user "@f[fred]" has a workstation called
|
|---|
| 382 | "@f[fred]", and his mainframe is the "@f[gpa]" machine where he has another
|
|---|
| 383 | user account named "@f[fred]". The password on his workstation is
|
|---|
| 384 | "@f[purple]". On his workstation, he creates the directory
|
|---|
| 385 | "@f[/usr/fred/sup/Mail/]" with the two files "@f[crypt]" and "@f[list]".
|
|---|
| 386 | The file "@f[/usr/fred/sup/Mail/crypt]" contains only the encryption key:
|
|---|
| 387 | @programexample[steppenwolf]
|
|---|
| 388 | The file "@f[/usr/fred/sup/Mail/list]" contains the command to upgrade the
|
|---|
| 389 | "@f[Mail]" directory:
|
|---|
| 390 | @programexample[upgrade Mail]
|
|---|
| 391 |
|
|---|
| 392 | On the "@f[gpa]" machine, the file "@f[/usr/fred/supfile]" contains the
|
|---|
| 393 | following line:
|
|---|
| 394 | @begin[programexample]
|
|---|
| 395 | Mail delete host=fred hostbase=/usr/fred base=/usr/fred \
|
|---|
| 396 | crypt=steppenwolf login=fred password=purple
|
|---|
| 397 | @end[programexample]
|
|---|
| 398 | This file is protected on "@f[gpa]", so others cannot see @f[fred's] password
|
|---|
| 399 | on his workstation.
|
|---|
| 400 |
|
|---|
| 401 | On the gpa-vax, issuing
|
|---|
| 402 | @begin[programexample]
|
|---|
| 403 | sup /usr/fred/supfile
|
|---|
| 404 | @end[programexample]
|
|---|
| 405 | to the Unix shell will update the @mh mail directory from @f[fred's]
|
|---|
| 406 | workstation deleting any files that exist on the gpa that do not exist on the
|
|---|
| 407 | workstation.
|
|---|
| 408 |
|
|---|
| 409 | For a more complete description of the features of @f[sup], see the @i[UNIX
|
|---|
| 410 | Workstation Owner's Guide] and @i[The SUP Software Upgrade Protocol].
|
|---|
| 411 |
|
|---|
| 412 | @section[Introduction to Commands and Variables]
|
|---|
| 413 |
|
|---|
| 414 | @index[mail commands]@index[mail variables]@label[mhcommands]
|
|---|
| 415 | Unless otherwise specified, any command which prompts for a folder name will
|
|---|
| 416 | offer the user a default. Usually this is @mh@comment{}'s idea of the current folder,
|
|---|
| 417 | but sometimes it is the folder name associated with the current buffer if there
|
|---|
| 418 | is one. When prompting for a message, any valid @mh message expression may be
|
|---|
| 419 | entered (for example, "@f[1 3 6]", "@f[1-3 5 6]", "@f[unseen]", "@f[all]").
|
|---|
| 420 | Unless otherwise specified, a default will be offered (usually the current
|
|---|
| 421 | message).
|
|---|
| 422 |
|
|---|
| 423 | Some commands mention specific @mh utilities, so the user knows how the
|
|---|
| 424 | @hemlock command affects the state of @mh and what profile components and
|
|---|
| 425 | special formatting files will be used. @hemlock runs the @mh utility programs
|
|---|
| 426 | from a directory indicated by the following variable:
|
|---|
| 427 |
|
|---|
| 428 | @defhvar[var "MH Utility Pathname", val {"/usr/misc/.mh/bin/"}]
|
|---|
| 429 | @mh utility names are merged with this pathname to find the executable
|
|---|
| 430 | files.
|
|---|
| 431 | @enddefhvar
|
|---|
| 432 |
|
|---|
| 433 |
|
|---|
| 434 | @section[Scanning and Picking Messages]
|
|---|
| 435 | @label[scanning]
|
|---|
| 436 | As pointed out in the introduction of this chapter, users typically generate
|
|---|
| 437 | headers or @f[scan] listings of messages with @hid[Message Headers], using
|
|---|
| 438 | commands that operate on the messages represented by the headers. @hid[Pick
|
|---|
| 439 | Headers] (bound to @bf[h] in @hid[Headers] mode) can be used to narrow down (or
|
|---|
| 440 | further select over) the headers in the buffer.
|
|---|
| 441 |
|
|---|
| 442 | A @f[pick] expression may be entered using either a Lisp syntax or a Unix
|
|---|
| 443 | shell-like/switch notation as described in the @mh documentation. The Lisp
|
|---|
| 444 | syntax is as follows:
|
|---|
| 445 |
|
|---|
| 446 | @begin[example]
|
|---|
| 447 | <exp> ::= {(not <exp>) | (and <exp>*) | (or <exp>*)
|
|---|
| 448 | | (cc <pattern>) | (date <pattern>)
|
|---|
| 449 | | (from <pattern>) | (search <pattern>)
|
|---|
| 450 | | (subject <pattern>) | (to <pattern>)
|
|---|
| 451 | | (-- <component> <pattern>)
|
|---|
| 452 | | (before <date>) | (after <date>)
|
|---|
| 453 | | (datefield <field>)}
|
|---|
| 454 |
|
|---|
| 455 | <pattern> ::= {<string> | <symbol>}
|
|---|
| 456 |
|
|---|
| 457 | <component> ::= {<string> | <symbol>}
|
|---|
| 458 |
|
|---|
| 459 | <date> ::= {<string> | <symbol> | <number>}
|
|---|
| 460 |
|
|---|
| 461 | <field> ::= <string>
|
|---|
| 462 | @end[example]
|
|---|
| 463 |
|
|---|
| 464 | Anywhere the user enters a @f[<symbol>], its symbol name is used as a string.
|
|---|
| 465 | Since @hemlock @f[read]s the expression without evaluating it, single quotes
|
|---|
| 466 | ("@bf[']") are unnecessary. From the @mh documentation,
|
|---|
| 467 |
|
|---|
| 468 | @begin[itemize]
|
|---|
| 469 | A @f[<pattern>] is a Unix @f[ed] regular expression. When using a string to
|
|---|
| 470 | input these, remember that @f[\] is an escape character in Common Lisp.
|
|---|
| 471 |
|
|---|
| 472 | A @f[<component>] is a header field name (for example, @b[reply-to] or
|
|---|
| 473 | @b[resent-to]).
|
|---|
| 474 |
|
|---|
| 475 | A @f[<date>] is an @i[822]-style specification, a day of the week,
|
|---|
| 476 | "@b[today]", "@b[yesterday]", "@b[tomorrow]", or a number indicating @i[n]
|
|---|
| 477 | days ago. The @i[822] standard is basically:
|
|---|
| 478 | @begin[example]
|
|---|
| 479 | dd mmm yy hh:mm:ss zzz
|
|---|
| 480 | @end[example]
|
|---|
| 481 | which is a two digit day, three letter month (first letter capitalized), two
|
|---|
| 482 | digit year, two digit hour (@f[00] through @f[23]), two digit minute, two
|
|---|
| 483 | digit second (this is optional), and a three letter zone (all capitalized).
|
|---|
| 484 | For
|
|---|
| 485 | example:
|
|---|
| 486 | @begin[example]
|
|---|
| 487 | 21 Mar 88 16:00 EST
|
|---|
| 488 | @end[example]
|
|---|
| 489 |
|
|---|
| 490 | A @f[<field>] is an alternate @f[Date:] field to use with @f[(before
|
|---|
| 491 | <date>)] and @f[(after <date>)] such as @f[BB-Posted:] or
|
|---|
| 492 | @f[Delivery-Date:].
|
|---|
| 493 |
|
|---|
| 494 | Using @f[(before <date>)] and @f[(after <date>)] causes date field parsing,
|
|---|
| 495 | while @f[(date <pattern>)] does string pattern matching.
|
|---|
| 496 | @end[itemize]
|
|---|
| 497 |
|
|---|
| 498 | Since a @f[<pattern>] may be a symbol or string, it should be noted that the
|
|---|
| 499 | symbol name is probably all uppercase characters, and @mh will match these
|
|---|
| 500 | only against upper case. @mh will match lowercase characters against lower
|
|---|
| 501 | and upper case. Some examples are:
|
|---|
| 502 | @begin[example]
|
|---|
| 503 | ;;; All messages to Gripe.
|
|---|
| 504 | (to "gripe")
|
|---|
| 505 |
|
|---|
| 506 | ;;; All messages to Gripe or about Hemlock.
|
|---|
| 507 | (or (to "gripe") (subject "hemlock"))
|
|---|
| 508 |
|
|---|
| 509 | ;;; All messages to Gripe with "Hemlock" in the body.
|
|---|
| 510 | (and (to "gripe") (search "hemlock"))
|
|---|
| 511 | @end[example]
|
|---|
| 512 |
|
|---|
| 513 | Matching of @f[<component>] fields is case sensitive, so this example will
|
|---|
| 514 | @f[pick] over all messages that have been replied to.
|
|---|
| 515 | @example[(or (-- "replied" "") (-- "Replied" ""))]
|
|---|
| 516 |
|
|---|
| 517 |
|
|---|
| 518 | @defhvar[var "MH Scan Line Form", val {"library:mh-scan"}]
|
|---|
| 519 | This is a pathname of a file containing an @mh format expression used for
|
|---|
| 520 | header lines.
|
|---|
| 521 |
|
|---|
| 522 | The header line format must display the message ID as the first non-whitespace
|
|---|
| 523 | item. If the user uses the virtual message deletion feature which is on by
|
|---|
| 524 | default, there must be a space three characters to the right of the message ID.
|
|---|
| 525 | This location is used on header lines to note that a message is flagged for
|
|---|
| 526 | deletion. The second space after the message ID is used for notating answered
|
|---|
| 527 | or replied-to messages.
|
|---|
| 528 | @enddefhvar
|
|---|
| 529 |
|
|---|
| 530 | @defcom[com "Message Headers", bind (C-x r)]
|
|---|
| 531 | This command prompts for a folder, message (defaulting to "@b[all]"), and an
|
|---|
| 532 | optional @f[pick] expression. Typically this will simply be used to generate
|
|---|
| 533 | headers for an entire folder or sequence, and the @f[pick] expression will not
|
|---|
| 534 | be used. A new @hid[Headers] buffer is made, and the output of @f[scan] on the
|
|---|
| 535 | messages indicated is inserted into the buffer. The current window is used,
|
|---|
| 536 | the buffer's point is moved to the first header, and the @hid[Headers] buffer
|
|---|
| 537 | becomes current. The current value of the @hemlock @hid[Fill Column] variable
|
|---|
| 538 | is supplied to @f[scan] as the @f[-width] switch. The buffer name is set to a
|
|---|
| 539 | string of the form @w<"@f[Headers <folder> <msgs> <pick expression>]">, so the
|
|---|
| 540 | modeline will show what is in the buffer. If no @f[pick] expression was
|
|---|
| 541 | supplied, none will be shown in the buffer's name. As described in the
|
|---|
| 542 | introduction to this section, the expression may be entered using either a Lisp
|
|---|
| 543 | syntax or a Unix shell-like/switch notation.
|
|---|
| 544 | @enddefcom
|
|---|
| 545 |
|
|---|
| 546 | @defhvar[var "MH Lisp Expression", val {t}]
|
|---|
| 547 | When this is set, @mh expression prompts are read in a Lisp syntax. Otherwise,
|
|---|
| 548 | the input is of the form of a Unix shell-like/switch notation as described in
|
|---|
| 549 | the @mh documentation.
|
|---|
| 550 | @enddefhvar
|
|---|
| 551 |
|
|---|
| 552 | @defcom[com "Pick Headers", stuff (bound to @bf[h] in @hid[Headers] mode) ]
|
|---|
| 553 | This command is only valid in a @hid[Headers] buffer. It prompts for a
|
|---|
| 554 | @f[pick] expression, and the messages shown in the buffer are supplied to
|
|---|
| 555 | @f[pick] with the expression. The resulting messages are @f[scan]'ed, deleting
|
|---|
| 556 | the previous contents of the buffer. The current value of @hid[Fill Column] is
|
|---|
| 557 | used for the @f[scan]'ing. The buffer's point is moved to the first header.
|
|---|
| 558 | The buffer's name is set to a string of the form @w<"@f[Headers <folder> <msgs
|
|---|
| 559 | picked over> <pick expression>]">, so the modeline will show what is in the
|
|---|
| 560 | buffer. As described in the introduction to this section, the expression may
|
|---|
| 561 | be entered using either a Lisp syntax or a Unix shell-like/switch notation.
|
|---|
| 562 | @enddefcom
|
|---|
| 563 |
|
|---|
| 564 | @defcom[com "Headers Help", bind (Headers: ?)]
|
|---|
| 565 | This command displays documentation on @hid[Headers] mode.
|
|---|
| 566 | @enddefcom
|
|---|
| 567 |
|
|---|
| 568 |
|
|---|
| 569 | @section[Reading New Mail]
|
|---|
| 570 |
|
|---|
| 571 | @index[reading new mail]@label[reading-new-mail]
|
|---|
| 572 |
|
|---|
| 573 | @defcom[com "Incorporate and Read New Mail", stuff (bound to @bf[C-x i] globally and @bf[i] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 574 | This command incorporates new mail into @hid[New Mail Folder] and creates a
|
|---|
| 575 | @hid[Headers] buffer with the new messages. An unseen-sequence must be define
|
|---|
| 576 | in the user's @mh profile to use this. Any headers generated due to
|
|---|
| 577 | @hid[Unseen Headers Message Spec] are inserted as well. The buffer's point is
|
|---|
| 578 | positioned on the headers line representing the first unseen message of the
|
|---|
| 579 | newly incorporated mail.
|
|---|
| 580 | @enddefcom
|
|---|
| 581 |
|
|---|
| 582 | @defcom[com "Incorporate New Mail" ]
|
|---|
| 583 | This command incorporates new mail into @hid[New Mail Folder], displaying
|
|---|
| 584 | @f[inc] output in a pop-up window. This is similar to @hid[Incorporate and
|
|---|
| 585 | Read New Mail] except that no @hid[Headers] buffer is generated.
|
|---|
| 586 | @enddefcom
|
|---|
| 587 |
|
|---|
| 588 | @defhvar[var "New Mail Folder", val {"+inbox"}]
|
|---|
| 589 | This is the folder into which @mh incorporates new mail.
|
|---|
| 590 | @enddefhvar
|
|---|
| 591 |
|
|---|
| 592 | @defhvar[var "Unseen Headers Message Spec", val {nil}]
|
|---|
| 593 | This is an @mh message specification that is suitable for any message prompt.
|
|---|
| 594 | When incorporating new mail and after expunging messages, @hemlock uses this
|
|---|
| 595 | specification in addition to the unseen-sequence name that is taken from the
|
|---|
| 596 | user's @mh profile to generate headers for the unseen @hid[Headers] buffer.
|
|---|
| 597 | This value is a string.
|
|---|
| 598 | @enddefhvar
|
|---|
| 599 |
|
|---|
| 600 | @defhvar[var "Incorporate New Mail Hook", val {nil}]
|
|---|
| 601 | This is a list of functions which are invoked immediately after new mail is
|
|---|
| 602 | incorporated. The functions should take no arguments.
|
|---|
| 603 | @enddefhvar
|
|---|
| 604 |
|
|---|
| 605 | @defhvar[var "Store Password", val {nil}]
|
|---|
| 606 | When this is set, the user is only prompted once for his password, and the
|
|---|
| 607 | password is stored for future use.
|
|---|
| 608 | @enddefhvar
|
|---|
| 609 |
|
|---|
| 610 | @defhvar[var "Authenticate Incorporation", val {nil}]
|
|---|
| 611 | @defhvar1[var "Authentication User Name", val {nil}]
|
|---|
| 612 | When @hid[Authenticate Incorporation] is set, incorporating new mail prompts
|
|---|
| 613 | for a password to access a remote mail-drop.
|
|---|
| 614 |
|
|---|
| 615 | When incorporating new mail accesses a remote mail-drop, @hid[Authentication
|
|---|
| 616 | User Name] is the user name supplied for authentication on the remote machine.
|
|---|
| 617 | If this is @nil, @hemlock uses the local name.
|
|---|
| 618 | @enddefhvar
|
|---|
| 619 |
|
|---|
| 620 |
|
|---|
| 621 | @section[Reading Messages]
|
|---|
| 622 | @index[reading messages]
|
|---|
| 623 | @label[reading-messages]
|
|---|
| 624 | This section describes basic commands that show the current, next, and previous
|
|---|
| 625 | messages, as well as a couple advanced commands. @hid[Show Message] (bound to
|
|---|
| 626 | @bf[SPACE] in @hid[Headers] mode) will display the message represented by the
|
|---|
| 627 | @f[scan] line the @hemlock cursor is on. Deleted messages are considered
|
|---|
| 628 | special, and the more conveniently bound commands for viewing the next and
|
|---|
| 629 | previous messages (@hid[Next Undeleted Message] bound to @bf[n] and
|
|---|
| 630 | @hid[Previous Undeleted Message] bound to @bf[p], both in @hid[Headers] and
|
|---|
| 631 | @hid[Message] modes) will ignore them. @hid[Next Message] and @hid[Previous
|
|---|
| 632 | Message] (bound to @bf[M-n] and @bf[M-p] in @hid[Headers] and @hid[Message]
|
|---|
| 633 | modes) may be invoked if reading a message is desired regardless of whether it
|
|---|
| 634 | has been deleted.
|
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 | @defcom[com "Show Message", stuff (bound to @bf[SPACE] and @bf[.] in @hid[Headers] mode) ]
|
|---|
| 638 | This command, when invoked in a @hid[Headers] buffer, displays the current
|
|---|
| 639 | message (the message the cursor is on), by replacing any previous message that
|
|---|
| 640 | has not been preserved with @hid[Keep Message]. The current message is also
|
|---|
| 641 | removed from the unseen sequence. The @hid[Message] buffer becomes the current
|
|---|
| 642 | buffer using the current window. The buffer's point will be moved to the
|
|---|
| 643 | beginning of the buffer, and the buffer's name will be set to a string of the
|
|---|
| 644 | form @w<"@f[Message <folder> <msg-id>]">.
|
|---|
| 645 |
|
|---|
| 646 | The @hid[Message] buffer is read-only and may not be modified. The command
|
|---|
| 647 | @hid[Goto Headers Buffer] issued in the @hid[Message] buffer makes the
|
|---|
| 648 | associated @hid[Headers] buffer current.
|
|---|
| 649 |
|
|---|
| 650 | When not in a @hid[Headers] buffer, this command prompts for a folder and
|
|---|
| 651 | message. A unique @hid[Message] buffer is obtained, and its name is set to a
|
|---|
| 652 | string of the form @w<"@f[Message <folder> <msg-id>]">. The buffer's point is
|
|---|
| 653 | moved to the beginning of the buffer, and the current window is used to display
|
|---|
| 654 | the message.
|
|---|
| 655 |
|
|---|
| 656 | Specifying multiple messages inserts all the messages into the same buffer. If
|
|---|
| 657 | the user wishes to show more than one message, it is expected that he will
|
|---|
| 658 | generate a @hid[headers] buffer with the intended messages, and then use the
|
|---|
| 659 | message sequencing commands described below.
|
|---|
| 660 | @enddefcom
|
|---|
| 661 |
|
|---|
| 662 | @defcom[com "Next Message", stuff (bound to @bf[M-n] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 663 | This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
|
|---|
| 664 | buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
|
|---|
| 665 | point is moved to the next message, and if there is one, it is shown as
|
|---|
| 666 | described in the @hid[Show Message] command.
|
|---|
| 667 |
|
|---|
| 668 | In a @hid[Message] buffer, the message after the currently visible message is
|
|---|
| 669 | displayed. This clobbers the buffer's contents. Note, if the @hid[Message]
|
|---|
| 670 | buffer is associated with a @hid[Draft] buffer, invoking this command breaks
|
|---|
| 671 | that association. Using @hid[Keep Message] preserves the @hid[Message] buffer
|
|---|
| 672 | and any association with a @hid[Draft] buffer.
|
|---|
| 673 |
|
|---|
| 674 | The @hid[Message] buffer's name is set as described in the @hid[Show Message]
|
|---|
| 675 | command.
|
|---|
| 676 | @enddefcom
|
|---|
| 677 |
|
|---|
| 678 | @defcom[com "Previous Message", stuff (bound to @bf[M-p] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 679 | This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
|
|---|
| 680 | buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
|
|---|
| 681 | point is moved to the previous message, and if there is one, it is shown as
|
|---|
| 682 | described in the @hid[Show Message] command.
|
|---|
| 683 |
|
|---|
| 684 | In a @hid[Message] buffer, the message before the currently visible message is
|
|---|
| 685 | displayed. This clobbers the buffer's contents. Note, if the @hid[Message]
|
|---|
| 686 | buffer is associated with a @hid[Draft] buffer, invoking this command breaks
|
|---|
| 687 | that association. Using @hid[Keep Message] preserves the @hid[Message] buffer
|
|---|
| 688 | and any association with a @hid[Draft] buffer.
|
|---|
| 689 |
|
|---|
| 690 | The @hid[Message] buffer's name is set as described in the @hid[Show Message]
|
|---|
| 691 | command.
|
|---|
| 692 | @enddefcom
|
|---|
| 693 |
|
|---|
| 694 | @defcom[com "Next Undeleted Message", stuff (bound to @bf[n] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 695 | This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
|
|---|
| 696 | buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
|
|---|
| 697 | point is moved to the next undeleted message, and if there is one, it is shown
|
|---|
| 698 | as described in the @hid[Show Message] command.
|
|---|
| 699 |
|
|---|
| 700 | In a @hid[Message] buffer, the first undeleted message after the currently
|
|---|
| 701 | visible message is displayed. This clobbers the buffer's contents. Note, if
|
|---|
| 702 | the @hid[Message] buffer is associated with a @hid[Draft] buffer, invoking this
|
|---|
| 703 | command breaks that association. The @hid[Keep Message] command preserves the
|
|---|
| 704 | @hid[Message] buffer and any association with a @hid[Draft] buffer.
|
|---|
| 705 |
|
|---|
| 706 | The @hid[Message] buffer's name is set as described in the @hid[Show Message]
|
|---|
| 707 | command.
|
|---|
| 708 | @enddefcom
|
|---|
| 709 |
|
|---|
| 710 | @defcom[com "Previous Undeleted Message", stuff (bound to @bf[p] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 711 | This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
|
|---|
| 712 | buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
|
|---|
| 713 | point is moved to the previous undeleted message, and if there is one, it is
|
|---|
| 714 | shown as described in the @hid[Show Message] command.
|
|---|
| 715 |
|
|---|
| 716 | In a @hid[Message] buffer, the first undeleted message before the currently
|
|---|
| 717 | visible message is displayed. This clobbers the buffer's contents. Note, if
|
|---|
| 718 | the @hid[Message] buffer is associated with a @hid[Draft] buffer, invoking this
|
|---|
| 719 | command breaks that association. The @hid[Keep Message] command preserves the
|
|---|
| 720 | @hid[Message] buffer and any association with a @hid[Draft] buffer.
|
|---|
| 721 |
|
|---|
| 722 | The @hid[Message] buffer's name is set as described in the @hid[Show Message]
|
|---|
| 723 | command.
|
|---|
| 724 | @enddefcom
|
|---|
| 725 |
|
|---|
| 726 | @defcom[com "Scroll Message", stuff (bound to @bf[SPACE] and @bf[C-v] in @hid[Message] mode) ]
|
|---|
| 727 | @defhvar1[var "Scroll Message Showing Next", val {t}]
|
|---|
| 728 | This command scrolls the current window down through the current message. If
|
|---|
| 729 | the end of the message is visible and @hid[Scroll Message Showing Next] is not
|
|---|
| 730 | @nil, then show the next undeleted message.
|
|---|
| 731 | @enddefcom
|
|---|
| 732 |
|
|---|
| 733 | @defcom[com "Keep Message" ]
|
|---|
| 734 | This command can only be invoked in a @hid[Message] buffer. It causes the
|
|---|
| 735 | @hid[Message] buffer to continue to exist when the user invokes commands to
|
|---|
| 736 | view other messages either within the kept @hid[Message] buffer or its
|
|---|
| 737 | associated @hid[Headers] buffer. This is useful for getting two messages into
|
|---|
| 738 | different buffers. It is also useful for retaining @hid[Message] buffers which
|
|---|
| 739 | would otherwise be deleted when an associated draft message is delivered.
|
|---|
| 740 | @enddefcom
|
|---|
| 741 |
|
|---|
| 742 | @defcom[com "Message Help", bind (Message: ?)]
|
|---|
| 743 | This command displays documentation on @hid[Message] mode.
|
|---|
| 744 | @enddefcom
|
|---|
| 745 |
|
|---|
| 746 |
|
|---|
| 747 | @section[Sending Messages]
|
|---|
| 748 | @index[sending messages]
|
|---|
| 749 | @label[sending-messages]
|
|---|
| 750 | The most useful commands for sending mail are @hid[Send Message] (bound to
|
|---|
| 751 | @bf[m] and @bf[s] in @hid[Headers] and @hid[Message] modes), @hid[Reply to
|
|---|
| 752 | Message] (bound to @bf[r] in @hid[Headers] mode), and @hid[Reply to Message in
|
|---|
| 753 | Other Window] (bound to @bf[r] in @hid[Message] mode). These commands set up a
|
|---|
| 754 | @hid[Draft] buffer and associate a @hid[Message] buffer with the draft when
|
|---|
| 755 | possible. To actually deliver the message to its recipient(s), use
|
|---|
| 756 | @hid[Deliver Message] (bound to @bf[H-s] in @hid[Draft] mode). To abort
|
|---|
| 757 | sending mail, use @hid[Delete Draft and Buffer] (bound to @bf[H-q] in
|
|---|
| 758 | @hid[Draft] mode). If one wants to temporarily stop composing a draft with the
|
|---|
| 759 | intention of finishing it later, then the @hid[Save File] command (bound to
|
|---|
| 760 | @bf[C-x C-s]) will save the draft to the user's draft folder.
|
|---|
| 761 |
|
|---|
| 762 | @hid[Draft] buffers have a special @hemlock minor mode called @hid[Draft] mode.
|
|---|
| 763 | The major mode of a @hid[Draft] buffer is taken from the @hid[Default Modes]
|
|---|
| 764 | variable. The user may wish to arrange that @hid[Text] mode (and possibly
|
|---|
| 765 | @hid[Fill] mode or @hid[Save] mode) be turned on whenever @hid[Draft] mode is
|
|---|
| 766 | set. For a further description of how to manipulate modes in @hemlock see the
|
|---|
| 767 | @i[Hemlock Command Implementor's Manual].
|
|---|
| 768 |
|
|---|
| 769 |
|
|---|
| 770 | @defcom[com "Send Message", stuff (bound to @bf[s] and @bf[m] in @hid[Headers] and @hid[Message] modes and @bf[C-x m] globally) ]
|
|---|
| 771 | This command, when invoked in a @hid[Headers] buffer, creates a unique
|
|---|
| 772 | @hid[Draft] buffer and a unique @hid[Message] buffer. The current message is
|
|---|
| 773 | inserted in the @hid[Message] buffer, and the @hid[Draft] buffer is displayed
|
|---|
| 774 | in the current window. The @hid[Draft] buffer's point is moved to the end of
|
|---|
| 775 | the line containing @f[To:] if it exists. The name of the draft message file
|
|---|
| 776 | is used to produce the buffer's name. A pathname is associated with the
|
|---|
| 777 | @hid[Draft] buffer so that @hid[Save File] can be used to incrementally save a
|
|---|
| 778 | composition before delivering it. The @f[comp] utility will be used to
|
|---|
| 779 | allocate a draft message in the user's @mh draft folder and to insert the
|
|---|
| 780 | proper header components into the draft message. Both the @hid[Draft] and
|
|---|
| 781 | @hid[Message] buffers are associated with the @hid[Headers] buffer, and the
|
|---|
| 782 | @hid[Draft] buffer is associated with the @hid[Message] buffer.
|
|---|
| 783 |
|
|---|
| 784 | When invoked in a @hid[Message] buffer, a unique @hid[Draft] buffer is created,
|
|---|
| 785 | and these two buffers are associated. If the @hid[Message] buffer is
|
|---|
| 786 | associated with a @hid[Headers] buffer, this association is propagated to the
|
|---|
| 787 | @hid[Draft] buffer. Showing other messages while in this @hid[Headers] buffer
|
|---|
| 788 | will not affect this @hid[Message] buffer.
|
|---|
| 789 |
|
|---|
| 790 | When not in a @hid[Headers] or @hid[Message] buffer, this command does the same
|
|---|
| 791 | thing as described in the previous two cases, but there are no @hid[Message] or
|
|---|
| 792 | @hid[Headers] buffer manipulations.
|
|---|
| 793 |
|
|---|
| 794 | @hid[Deliver Message] will deliver the draft to its intended recipient(s).
|
|---|
| 795 |
|
|---|
| 796 | The @hid[Goto Headers Buffer] command, when invoked in a @hid[Draft] or
|
|---|
| 797 | @hid[Message] buffer, makes the associated @hid[Headers] buffer current. The
|
|---|
| 798 | @hid[Goto Message Buffer] command, when invoked in a @hid[Draft] buffer, makes
|
|---|
| 799 | the associated @hid[Message] buffer current.
|
|---|
| 800 | @enddefcom
|
|---|
| 801 |
|
|---|
| 802 | @defcom[com "Reply to Message", stuff (bound to @bf[r] in @hid[Headers] mode) ]
|
|---|
| 803 | @defcom1[com "Reply to Message in Other Window", stuff (bound to @bf[r] in @hid[Message] mode) ]
|
|---|
| 804 | @defhvar1[var "Reply to Message Prefix Action"]
|
|---|
| 805 | @hid[Reply to Message], when invoked in a @hid[Headers] buffer, creates a
|
|---|
| 806 | unique @hid[Draft] buffer and a unique @hid[Message] buffer. The current
|
|---|
| 807 | message is inserted in the @hid[Message] buffer, and the @hid[Draft] buffer is
|
|---|
| 808 | displayed in the current window. The draft components are set up in reply to
|
|---|
| 809 | the message, and the @hid[Draft] buffer's point is moved to the end of the
|
|---|
| 810 | buffer. The name of the draft message file is used to produce the buffer's
|
|---|
| 811 | name. A pathname is associated with the @hid[Draft] buffer so that @hid[Save
|
|---|
| 812 | File] can be used to incrementally save a composition before delivering it.
|
|---|
| 813 | The @f[repl] utility will be used to allocate a draft message file in the
|
|---|
| 814 | user's @mh draft folder and to insert the proper header components into the
|
|---|
| 815 | draft message. Both the @hid[Draft] and @hid[Message] buffers are associated
|
|---|
| 816 | with the @hid[Headers] buffer, and the @hid[Draft] buffer is associated with
|
|---|
| 817 | the @hid[Message] buffer.
|
|---|
| 818 |
|
|---|
| 819 | When invoked in a @hid[Message] buffer, a unique @hid[Draft] buffer is set up
|
|---|
| 820 | using the message in the buffer as the associated message. Any previous
|
|---|
| 821 | association between the @hid[Message] buffer and a @hid[Draft] buffer is
|
|---|
| 822 | removed. Any association of the @hid[Message] buffer with a @hid[Headers]
|
|---|
| 823 | buffer is propagated to the @hid[Draft] buffer.
|
|---|
| 824 |
|
|---|
| 825 | When not in a @hid[Headers] buffer or @hid[Message] buffer, this command
|
|---|
| 826 | prompts for a folder and message to reply to. This message is inserted into a
|
|---|
| 827 | unique @hid[Message] buffer, and a unique @hid[Draft] buffer is created as in
|
|---|
| 828 | the previous two cases. There is no association of either the @hid[Message]
|
|---|
| 829 | buffer or the @hid[Draft] buffer with a @hid[Headers] buffer.
|
|---|
| 830 |
|
|---|
| 831 | When a prefix argument is supplied, @hid[Reply to Message Prefix Action] is
|
|---|
| 832 | considered with respect to supplying carbon copy switches to @f[repl]. This
|
|---|
| 833 | variable's value is one of @b[:cc-all], :@b[no-cc-all], or @nil. See section
|
|---|
| 834 | @ref[Styles] for examples of how to use this.
|
|---|
| 835 |
|
|---|
| 836 | @hid[Reply to Message in Other Window] is identical to @hid[Reply to Message],
|
|---|
| 837 | but the current window is split showing the @hid[Draft] buffer in the new
|
|---|
| 838 | window. The split window displays the @hid[Message] buffer.
|
|---|
| 839 |
|
|---|
| 840 | @hid[Deliver Message] will deliver the draft to its intended recipient(s).
|
|---|
| 841 |
|
|---|
| 842 | The @hid[Goto Headers Buffer] commmand, when invoked in a @hid[Draft] or
|
|---|
| 843 | @hid[Message] buffer, makes the associated @hid[Headers] buffer current. The
|
|---|
| 844 | @hid[Goto Message Buffer] command, when invoked in a @hid[Draft] buffer, makes
|
|---|
| 845 | the associated @hid[Message] buffer current.
|
|---|
| 846 | @enddefcom
|
|---|
| 847 |
|
|---|
| 848 | @defcom[com "Forward Message", stuff (bound to @bf[f] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 849 | This command, when invoked in a @hid[Headers] buffer, creates a unique
|
|---|
| 850 | @hid[Draft] buffer. The current message is inserted in the draft by using the
|
|---|
| 851 | @f[forw] utility, and the @hid[Draft] buffer is shown in the current window.
|
|---|
| 852 | The name of the draft message file is used to produce the buffer's name. A
|
|---|
| 853 | pathname is associated with the @hid[Draft] buffer so that @hid[Save File] can
|
|---|
| 854 | be used to incrementally save a composition before delivering it. The
|
|---|
| 855 | @hid[Draft] buffer is associated with the @hid[Headers] buffer, but no
|
|---|
| 856 | @hid[Message] buffer is created since the message is already a part of the
|
|---|
| 857 | draft.
|
|---|
| 858 |
|
|---|
| 859 | When invoked in a @hid[Message] buffer, a unique @hid[Draft] buffer is set up
|
|---|
| 860 | inserting the message into the @hid[Draft] buffer. The @hid[Message] buffer is
|
|---|
| 861 | not associated with the @hid[Draft] buffer because the message is already a
|
|---|
| 862 | part of the draft. However, any association of the @hid[Message] buffer with a
|
|---|
| 863 | @hid[Headers] buffer is propagated to the @hid[Draft] buffer.
|
|---|
| 864 |
|
|---|
| 865 | When not in a @hid[Headers] buffer or @hid[Message] buffer, this command
|
|---|
| 866 | prompts for a folder and message to forward. A @hid[Draft] buffer is created
|
|---|
| 867 | as described in the previous two cases.
|
|---|
| 868 |
|
|---|
| 869 | @hid[Deliver Message] will deliver the draft to its intended recipient(s).
|
|---|
| 870 | @enddefcom
|
|---|
| 871 |
|
|---|
| 872 | @defcom[com "Deliver Message", stuff (bound to @bf[H-s] and @bf[H-c] in @hid[Draft] mode) ]
|
|---|
| 873 | @defhvar1[var "Deliver Message Confirm", val {nil}]
|
|---|
| 874 | This command, when invoked in a @hid[Draft] buffer, saves the file and uses
|
|---|
| 875 | the @mh @f[send] utility to deliver the draft. If the draft is a reply to some
|
|---|
| 876 | message, then @f[anno] is used to annotate that message with a "@f[replied]"
|
|---|
| 877 | component. Any @hid[Headers] buffers containing the replied-to message are
|
|---|
| 878 | updated with an "@b[A]" placed in the appropriate headers line two characters
|
|---|
| 879 | after the message ID. Before doing any of this, confirmation is asked for
|
|---|
| 880 | based on @hid[Deliver Message Confirm].
|
|---|
| 881 |
|
|---|
| 882 | When not in a @hid[Draft] buffer, this prompts for a draft message ID and
|
|---|
| 883 | invokes @f[send] on that draft message to deliver it. Sending a draft in this
|
|---|
| 884 | way severs any association that draft may have had with a message being replied
|
|---|
| 885 | to, so no annotation will occur.
|
|---|
| 886 | @enddefcom
|
|---|
| 887 |
|
|---|
| 888 | @defcom[com "Delete Draft and Buffer", stuff (bound to @bf[H-q] in @hid[Draft] mode) ]
|
|---|
| 889 | This command, when invoked in a @hid[Draft] buffer, deletes the draft message
|
|---|
| 890 | file and the buffer. This also deletes any associated message buffer unless
|
|---|
| 891 | the user preserved it with @hid[Keep Message].
|
|---|
| 892 | @enddefcom
|
|---|
| 893 |
|
|---|
| 894 | @defcom[com "Remail Message", stuff (bound to @bf[H-r] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 895 | This command, when invoked in a @hid[Headers] or @hid[Message] buffer, prompts
|
|---|
| 896 | for resend @f[To:] and resend @f[Cc:] addresses, remailing the current message.
|
|---|
| 897 | When invoked in any other kind of buffer, this command prompts for a folder and
|
|---|
| 898 | message as well. @mh@comment{}'s @f[dist] sets up a draft folder message which is then
|
|---|
| 899 | modified. The above mentioned addresses are inserted on the @f[Resent-To:] and
|
|---|
| 900 | @f[Resent-Cc:] lines. Then the message is delivered.
|
|---|
| 901 |
|
|---|
| 902 | There is no mechanism for annotating messages as having been remailed.
|
|---|
| 903 | @enddefcom
|
|---|
| 904 |
|
|---|
| 905 | @defcom[com "Draft Help", bind (Draft: H-?)]
|
|---|
| 906 | This command displays documentation on @hid[Draft] mode.
|
|---|
| 907 | @enddefcom
|
|---|
| 908 |
|
|---|
| 909 |
|
|---|
| 910 | @section[Convenience Commands for Message and Draft Buffers]
|
|---|
| 911 | @index[message buffer commands]
|
|---|
| 912 | @index[draft buffer commands]
|
|---|
| 913 | @index[convenience commands for mail interface]
|
|---|
| 914 | @label[convenience-coms]
|
|---|
| 915 | This section describes how to switch from a @hid[Message] or @hid[Draft] buffer
|
|---|
| 916 | to its associated @hid[Headers] buffer, or from a @hid[Draft] buffer to its
|
|---|
| 917 | associated @hid[Message] buffer. There are also commands for various styles of
|
|---|
| 918 | inserting text from a @hid[Message] buffer into a @hid[Draft] buffer.
|
|---|
| 919 |
|
|---|
| 920 | @defcom[com "Goto Headers Buffer", stuff (bound to @bf[^] in @hid[Message] mode and @bf[H-^] in @hid[Draft] mode) ]
|
|---|
| 921 | This command, when invoked in a @hid[Message] or @hid[Draft] buffer with an
|
|---|
| 922 | associated @hid[Headers] buffer, places the associated @hid[Headers] buffer in
|
|---|
| 923 | the current window.
|
|---|
| 924 |
|
|---|
| 925 | The cursor is moved to the headers line of the associated message.
|
|---|
| 926 | @enddefcom
|
|---|
| 927 |
|
|---|
| 928 | @defcom[com "Goto Message Buffer", stuff (bound to @bf[H-m] in @hid[Draft] mode) ]
|
|---|
| 929 | This command, when invoked in a @hid[Draft] buffer with an associated
|
|---|
| 930 | @hid[Message] buffer, places the associated @hid[Message] buffer in the current
|
|---|
| 931 | window.
|
|---|
| 932 | @enddefcom
|
|---|
| 933 |
|
|---|
| 934 | @defcom[com "Insert Message Region", stuff (bound to @bf[H-y] in appropriate modes) ]
|
|---|
| 935 | @defhvar1[var "Message Insertion Prefix", val {" "}]
|
|---|
| 936 | @defhvar1[var "Message Insertion Column", val {75}]
|
|---|
| 937 | This command, when invoked in a @hid[Message] or @hid[News-Message] (where it
|
|---|
| 938 | is bound) buffer that has an associated @hid[Draft] or @hid[Post] buffer,
|
|---|
| 939 | copies the current active region into the @hid[Draft] or @hid[Post] buffer. It
|
|---|
| 940 | is filled using @hid[Message Insertion Prefix] (which defaults to three spaces)
|
|---|
| 941 | and @hid[Message Insertion Column]. If an argument is supplied, the filling is
|
|---|
| 942 | inhibited.
|
|---|
| 943 | @enddefcom
|
|---|
| 944 |
|
|---|
| 945 | @defcom[com "Insert Message Buffer", stuff (bound to @bf[H-y] in appropriate modes) ]
|
|---|
| 946 | @defhvar1[var "Message Buffer Insertion Prefix", val {" "}]
|
|---|
| 947 | This command, when invoked in a @hid[Draft] or @hid[Post] (where it is bound)
|
|---|
| 948 | buffer with an associated @hid[Message] or @hid[News-Message] buffer, or when
|
|---|
| 949 | in a @hid[Message] (or @hid[News-Message]) buffer that has an associated
|
|---|
| 950 | @hid[Draft] buffer, inserts the @hid[Message] buffer into the @hid[Draft] (or
|
|---|
| 951 | @hid[Post]) buffer. Each inserted line is modified by prefixing it with
|
|---|
| 952 | @hid[Message Buffer Insertion Prefix] (which defaults to four spaces) . If an
|
|---|
| 953 | argument is supplied, the prefixing is inhibited.
|
|---|
| 954 | @enddefcom
|
|---|
| 955 |
|
|---|
| 956 | @defcom[com "Edit Message Buffer", stuff (bound to @bf[e] in @hid[Message] mode) ]
|
|---|
| 957 | This command puts the current @hid[Message] buffer in @hid[Text] mode and makes
|
|---|
| 958 | it writable (@hid[Message] buffers are normally read-only). The pathname of
|
|---|
| 959 | the file which the message is in is associated with the buffer making saving
|
|---|
| 960 | possible. A recursive edit is entered, and the user is allowed to make changes
|
|---|
| 961 | to the message. When the recursive edit is exited, if the buffer is modified,
|
|---|
| 962 | the user is asked if the changes should be saved. The buffer is marked
|
|---|
| 963 | unmodified, and the pathname is disassociated from the buffer. The buffer
|
|---|
| 964 | otherwise returns to its previous state as a @hid[Message] buffer. If the
|
|---|
| 965 | recursive edit is aborted, the user is not asked to save the file, and the
|
|---|
| 966 | buffer remains changed though it is marked unmodified.
|
|---|
| 967 | @enddefcom
|
|---|
| 968 |
|
|---|
| 969 |
|
|---|
| 970 | @section[Deleting Messages]
|
|---|
| 971 | @index[deleting messages]
|
|---|
| 972 | @label[deleting]
|
|---|
| 973 | The main command described in this section is @hid[Headers Delete Message]
|
|---|
| 974 | (bound to @bf[k] in @hid[Headers] and @hid[Message] modes). A useful command
|
|---|
| 975 | for reading new mail is @hid[Delete Message and Show Next] (bound to @bf[d] in
|
|---|
| 976 | @hid[Message] mode) which deletes the current message and shows the next
|
|---|
| 977 | undeleted message.
|
|---|
| 978 |
|
|---|
| 979 | Since messages are by default deleted using a virtual message deletion
|
|---|
| 980 | mechanism, @hid[Expunge Messages] (bound to @bf[!] in @hid[Headers] mode)
|
|---|
| 981 | should be mentioned here. This is described in section @ref[terminating].
|
|---|
| 982 |
|
|---|
| 983 |
|
|---|
| 984 | @defhvar[var "Virtual Message Deletion", val {t}]
|
|---|
| 985 | When set, @hid[Delete Message] adds a message to the "@f[hemlockdeleted]"
|
|---|
| 986 | sequence; otherwise, @f[rmm] is invoked on the message immediately.
|
|---|
| 987 | @enddefhvar
|
|---|
| 988 |
|
|---|
| 989 | @defcom[com "Delete Message" ]
|
|---|
| 990 | This command prompts for a folder, messages, and an optional @f[pick]
|
|---|
| 991 | expression. When invoked in a @hid[Headers] buffer of the specified folder,
|
|---|
| 992 | the prompt for a message specification will default to the those messages in
|
|---|
| 993 | that @hid[Headers] buffer.
|
|---|
| 994 |
|
|---|
| 995 | When the variable @hid[Virtual Message Deletion] is set, this command merely
|
|---|
| 996 | flags the messages for deletion by adding them to the "@f[hemlockdeleted]"
|
|---|
| 997 | sequence. Then this updates any @hid[Headers] buffers representing the folder.
|
|---|
| 998 | It notates each headers line referring to a deleted message with a "@b[D]" in
|
|---|
| 999 | the third character position after the message ID.
|
|---|
| 1000 |
|
|---|
| 1001 | When @hid[Virtual Message Deletion] is not set, @f[rmm] is invoked on the
|
|---|
| 1002 | message, and each headers line referring to the deleted message is deleted from
|
|---|
| 1003 | its buffer
|
|---|
| 1004 | @enddefcom
|
|---|
| 1005 |
|
|---|
| 1006 | @defcom[com "Headers Delete Message", stuff (bound to @bf[k] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 1007 | This command, when invoked in a @hid[Headers] buffer, deletes the message on
|
|---|
| 1008 | the current line as described in @hid[Delete Message].
|
|---|
| 1009 |
|
|---|
| 1010 | When invoked in a @hid[Message] buffer, the message displayed in it is deleted
|
|---|
| 1011 | as described in @hid[Delete Message].
|
|---|
| 1012 | @enddefcom
|
|---|
| 1013 |
|
|---|
| 1014 | @defcom[com "Delete Message and Show Next", stuff (bound to @bf[k] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 1015 | This command is only valid in a @hid[Headers] buffer or a @hid[Message] buffer
|
|---|
| 1016 | associated with some @hid[Headers] buffer. The current message is deleted as
|
|---|
| 1017 | with the @hid[Delete Message] command. Then the next message is shown as with
|
|---|
| 1018 | @hid[Next Undeleted Message].
|
|---|
| 1019 | @enddefcom
|
|---|
| 1020 |
|
|---|
| 1021 | @defcom[com "Delete Message and Down Line", stuff (bound to @bf[d] in @hid[Headers mode])]
|
|---|
| 1022 | This command, when invoked in a @hid[Headers] buffer, deletes the message on
|
|---|
| 1023 | the current line. Then the point is moved to the next non-blank line.
|
|---|
| 1024 | @enddefcom
|
|---|
| 1025 |
|
|---|
| 1026 | @defcom[com "Undelete Message" ]
|
|---|
| 1027 | This command is only meaningful when @hid[Virtual Message Deletion] is set.
|
|---|
| 1028 | This prompts for a folder, messages, and an optional @f[pick] expression. When
|
|---|
| 1029 | in a @hid[Headers] buffer of the specified folder, the messages prompt defaults
|
|---|
| 1030 | to those messages in the buffer. All @hid[Headers] buffers representing the
|
|---|
| 1031 | folder are updated. Each headers line referring to an undeleted message is
|
|---|
| 1032 | notated by replacing the "@b[D]" in the third character position after the
|
|---|
| 1033 | message ID with a space.
|
|---|
| 1034 | @enddefcom
|
|---|
| 1035 |
|
|---|
| 1036 | @defcom[com "Headers Undelete Message", stuff (bound to @bf[u] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 1037 | This command is only meaningful when @hid[Virtual Message Deletion] is set.
|
|---|
| 1038 | When invoked in a @hid[Headers] buffer, the message on the current line is
|
|---|
| 1039 | undeleted as described in @hid[Undelete Message].
|
|---|
| 1040 |
|
|---|
| 1041 | When invoked in a @hid[Message] buffer, the message displayed in it is
|
|---|
| 1042 | undeleted as described in @hid[Undelete Message].
|
|---|
| 1043 | @enddefcom
|
|---|
| 1044 |
|
|---|
| 1045 |
|
|---|
| 1046 | @section[Folder Operations]
|
|---|
| 1047 |
|
|---|
| 1048 | @index[folder operations]@label[folder]
|
|---|
| 1049 | @defcom[com "List Folders" ]
|
|---|
| 1050 | This command displays a list of all current mail folders in the user's
|
|---|
| 1051 | top-level mail directory in a @hemlock pop-up window.
|
|---|
| 1052 | @enddefcom
|
|---|
| 1053 |
|
|---|
| 1054 | @defcom[com "Create Folder"]
|
|---|
| 1055 | This command prompts for and creates a folder. If the folder already exists,
|
|---|
| 1056 | an error is signaled.
|
|---|
| 1057 | @enddefcom
|
|---|
| 1058 |
|
|---|
| 1059 | @defcom[com "Delete Folder" ]
|
|---|
| 1060 | This command prompts for a folder and uses @f[rmf] to delete it. Note that no
|
|---|
| 1061 | confirmation is asked for.
|
|---|
| 1062 | @enddefcom
|
|---|
| 1063 |
|
|---|
| 1064 |
|
|---|
| 1065 | @section[Refiling Messages]
|
|---|
| 1066 |
|
|---|
| 1067 | @index[refiling messages]@label[refiling]
|
|---|
| 1068 | @defcom[com "Refile Message" ]
|
|---|
| 1069 | This command prompts for a folder, messages, an optional @f[pick] expression,
|
|---|
| 1070 | and a destination folder. When invoked in a @hid[Headers] buffer of the
|
|---|
| 1071 | specified folder, the message prompt offers a default of those messages in the
|
|---|
| 1072 | buffer. If the destination folder does not exist, the user is asked to create
|
|---|
| 1073 | it. The resulting messages are refiled with the @f[refile] utility. All
|
|---|
| 1074 | @hid[Headers] buffers for the folder are updated. Each line referring to a
|
|---|
| 1075 | refiled message is deleted from its buffer.
|
|---|
| 1076 | @enddefcom
|
|---|
| 1077 |
|
|---|
| 1078 | @defcom[com "Headers Refile Message", stuff (bound to @bf[o] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 1079 | This command, when invoked in a @hid[Headers] buffer, prompts for a destination
|
|---|
| 1080 | folder, refiling the message on the current line with @f[refile]. If the
|
|---|
| 1081 | destination folder does not exist, the user is asked to create it. Any
|
|---|
| 1082 | @hid[Headers] buffers containing messages for that folder are updated. Each
|
|---|
| 1083 | headers line referring to the refiled message is deleted from its buffer.
|
|---|
| 1084 |
|
|---|
| 1085 | When invoked in a @hid[Message] buffer, that message is refiled as described
|
|---|
| 1086 | above.
|
|---|
| 1087 | @enddefcom
|
|---|
| 1088 |
|
|---|
| 1089 |
|
|---|
| 1090 | @section[Marking Messages]
|
|---|
| 1091 | @index[marking messages]
|
|---|
| 1092 | @label[marking]
|
|---|
| 1093 | @defcom[com "Mark Message" ]
|
|---|
| 1094 | This command prompts for a folder, message, and sequence and adds (deletes) the
|
|---|
| 1095 | message specification to (from) the sequence. By default this adds the
|
|---|
| 1096 | message, but if an argument is supplied, this deletes the message. When
|
|---|
| 1097 | invoked in a @hid[Headers] buffer or @hid[Message] buffer, this only prompts
|
|---|
| 1098 | for a sequence and uses the current message.
|
|---|
| 1099 | @enddefcom
|
|---|
| 1100 |
|
|---|
| 1101 |
|
|---|
| 1102 | @section[Terminating Headers Buffers]
|
|---|
| 1103 | @label[terminating]
|
|---|
| 1104 | The user never actually @i[exits] the mailer. He can leave mail buffers lying
|
|---|
| 1105 | around while conducting other editing tasks, selecting them and continuing his
|
|---|
| 1106 | mail handling whenever. There still is a need for various methods of
|
|---|
| 1107 | terminating or cleaning up @hid[Headers] buffers. The two most useful commands
|
|---|
| 1108 | in this section are @hid[Expunge Messages] and @hid[Quit Headers].
|
|---|
| 1109 |
|
|---|
| 1110 |
|
|---|
| 1111 | @defhvar[var "Expunge Messages Confirm", val {t}]
|
|---|
| 1112 | When this is set, @hid[Quit Headers] and @hid[Expunge Messages] will ask for
|
|---|
| 1113 | confirmation before expunging messages and packing the folder's message ID's.
|
|---|
| 1114 | @enddefhvar
|
|---|
| 1115 |
|
|---|
| 1116 | @defhvar[var "Temporary Draft Folder", val {nil}]
|
|---|
| 1117 | This is a folder name where @mh @f[fcc:] messages are kept with the intention
|
|---|
| 1118 | that this folder's messages will be deleted and expunged whenever messages from
|
|---|
| 1119 | any folder are expunged (for example, when @hid[Expunge Messages] or @hid[Quit
|
|---|
| 1120 | Headers] is invoked.
|
|---|
| 1121 | @enddefhvar
|
|---|
| 1122 |
|
|---|
| 1123 | @defcom[com "Expunge Messages", stuff (bound to @bf[!] in @hid[Headers] mode) ]
|
|---|
| 1124 | This command deletes messages @f[mark]'ed for deletion, and compacts the
|
|---|
| 1125 | folder's message ID's. If there are messages to expunge, ask the user for
|
|---|
| 1126 | confirmation, displaying the folder name. This can be inhibited by setting
|
|---|
| 1127 | @hid[Expunge Messages Confirm] to @nil. When @hid[Temporary Draft Folder] is
|
|---|
| 1128 | not @nil, this command deletes and expunges that folder's messages regardless
|
|---|
| 1129 | of the folder in which the user invokes it, and a negative response to the
|
|---|
| 1130 | request for confirmation inhibits this.
|
|---|
| 1131 |
|
|---|
| 1132 | When invoked in a @hid[Headers] buffer, the messages in that folder's
|
|---|
| 1133 | "@f[hemlockdeleted]" sequence are deleted by invoking @f[rmm]. Then the ID's
|
|---|
| 1134 | of the folder's remaining messages are compacted using the @f[folder] utility.
|
|---|
| 1135 | Since headers must be regenerated due to renumbering or reassigning message
|
|---|
| 1136 | ID's, and because @hid[Headers] buffers become inconsistent after messages are
|
|---|
| 1137 | deleted, @hemlock must regenerate all the headers for the folder. Multiple
|
|---|
| 1138 | @hid[Headers] buffers for the same folder are then collapsed into one buffer,
|
|---|
| 1139 | deleting unnecessary duplicates. Any @hid[Message] buffers associated with
|
|---|
| 1140 | these @hid[Headers] buffers are deleted.
|
|---|
| 1141 |
|
|---|
| 1142 | If there is an unseen @hid[Headers] buffer for the folder, it is handled
|
|---|
| 1143 | separately from the @hid[Headers] buffers described above. @hemlock tries to
|
|---|
| 1144 | update it by filling it only with remaining unseen message headers.
|
|---|
| 1145 | Additionally, any headers generated due to @hid[Unseen Headers Message Spec]
|
|---|
| 1146 | are inserted. If there are no headers, unseen or otherwise, the buffer is left
|
|---|
| 1147 | blank.
|
|---|
| 1148 |
|
|---|
| 1149 | Any @hid[Draft] buffer set up as a reply to a message in the folder is affected
|
|---|
| 1150 | as well since the associated message has possibly been deleted. When a draft
|
|---|
| 1151 | of this type is delivered, no message will be annotated as having been replied
|
|---|
| 1152 | to.
|
|---|
| 1153 |
|
|---|
| 1154 | When invoked in a @hid[Message] buffer, this uses its corresponding folder as
|
|---|
| 1155 | the folder argument. The same updating as described above occurs.
|
|---|
| 1156 |
|
|---|
| 1157 | In any other type of buffer, a folder is prompted for.
|
|---|
| 1158 | @enddefcom
|
|---|
| 1159 |
|
|---|
| 1160 | @defcom[com "Quit Headers", stuff (bound to @bf[q] in @hid[Headers] and @hid[Message] modes) ]
|
|---|
| 1161 | This command affects the current @hid[Headers] buffer. When there are deleted
|
|---|
| 1162 | messages, ask the user for confirmation on expunging the messages and packing
|
|---|
| 1163 | the folder's message ID's. This prompting can be inhibited by setting
|
|---|
| 1164 | @hid[Expunge Messages Confirm] to @nil. After deleting and packing, this
|
|---|
| 1165 | deletes the buffer and all its associated @hid[Message] buffers.
|
|---|
| 1166 |
|
|---|
| 1167 | Other @hid[Headers] buffers regarding the same folder are handled as described
|
|---|
| 1168 | in @hid[Expunge Messages], but the buffer this command is invoked in is always
|
|---|
| 1169 | deleted.
|
|---|
| 1170 |
|
|---|
| 1171 | When @hid[Temporary Draft Folder] is not @nil, this folder's messages are
|
|---|
| 1172 | deleted and expunged regardless of the folder in which the user invokes this
|
|---|
| 1173 | command. A negative response to the above mentioned request for confirmation
|
|---|
| 1174 | inhibits this.
|
|---|
| 1175 | @enddefcom
|
|---|
| 1176 |
|
|---|
| 1177 | @defcom[com "Delete Headers Buffer and Message Buffers" ]
|
|---|
| 1178 | This command prompts for a @hid[Headers] buffer to delete along with its
|
|---|
| 1179 | associated @hid[Message] buffers. Any associated @hid[Draft] buffers are left
|
|---|
| 1180 | intact, but their corresponding @hid[Message] buffers will be deleted. When
|
|---|
| 1181 | invoked in a @hid[Headers] buffer or a @hid[Message] buffer associated with a
|
|---|
| 1182 | @hid[Headers] buffer, that @hid[Headers] buffer is offered as a default.
|
|---|
| 1183 | @enddefcom
|
|---|
| 1184 |
|
|---|
| 1185 |
|
|---|
| 1186 | @section[Miscellaneous Commands]
|
|---|
| 1187 | @label[miscellaneous mail commands]
|
|---|
| 1188 | @label[miscellaneous]
|
|---|
| 1189 |
|
|---|
| 1190 | @defcom[com "List Mail Buffers", stuff (bound to @bf[l] in @hid[Headers] and @hid[Message] modes @bf[H-l] in @hid[Draft] mode) ]
|
|---|
| 1191 | This command shows a list of all mail @hid[Message], @hid[Headers], and
|
|---|
| 1192 | @hid[Draft] buffers.
|
|---|
| 1193 |
|
|---|
| 1194 | If a @hid[Message] buffer has an associated @hid[Headers] buffer, it is
|
|---|
| 1195 | displayed to the right of the @hid[Message] buffer's name.
|
|---|
| 1196 |
|
|---|
| 1197 | If a @hid[Draft] buffer has an associated @hid[Message] buffer, it is displayed
|
|---|
| 1198 | to the right of the @hid[Draft] buffer's name. If a @hid[Draft] buffer has no
|
|---|
| 1199 | associated @hid[Message] buffer, but it is associated with a @hid[Headers]
|
|---|
| 1200 | buffer, then the name of the @hid[Headers] buffer is displayed to the right of
|
|---|
| 1201 | the @hid[Draft] buffer.
|
|---|
| 1202 |
|
|---|
| 1203 | For each buffer listed, if it is modified, then an asterisk is displayed before
|
|---|
| 1204 | the name of the buffer.
|
|---|
| 1205 | @enddefcom
|
|---|
| 1206 |
|
|---|
| 1207 |
|
|---|
| 1208 | @section[Styles of Usage]
|
|---|
| 1209 | @index[styles of mail interface usage]
|
|---|
| 1210 | @label[Styles]
|
|---|
| 1211 | This section discusses some styles of usage or ways to make use of some of the
|
|---|
| 1212 | features of @hemlock@comment{}'s interface to @mh that might not be obvious. In each
|
|---|
| 1213 | case, setting some variables and/or remembering an extra side effect of a
|
|---|
| 1214 | command will lend greater flexibility and functionality to the user.
|
|---|
| 1215 |
|
|---|
| 1216 | @subsection[Unseen Headers Message Spec]
|
|---|
| 1217 | The unseen @hid[Headers] buffer by default only shows unseen headers which is
|
|---|
| 1218 | adequate for one folder, simple mail handling. Some people use their @hid[New
|
|---|
| 1219 | Mail Folder] only for incoming mail, refiling or otherwise dispatching a
|
|---|
| 1220 | message immediately. Under this mode it is easy to conceive of the user not
|
|---|
| 1221 | having time to respond to a message, but he would like to leave it in this
|
|---|
| 1222 | folder to remind him to take care of it. Using the @hid[Unseen Headers Message
|
|---|
| 1223 | Spec] variable, the user can cause all the messages the @hid[New Mail Folder] to
|
|---|
| 1224 | be inserted into the unseen @hid[Headers] buffer whenever just unseen headers
|
|---|
| 1225 | would be. This way he sees all the messages that require immediate attention.
|
|---|
| 1226 |
|
|---|
| 1227 | To achieve the above effect, @hid[Unseen Headers Message Spec] should be set to
|
|---|
| 1228 | the string @f["all"]. This variable can be set to any general @mh message
|
|---|
| 1229 | specification (see section @ref[mhcommands] of this chapter), so the user can
|
|---|
| 1230 | include headers of messages other than those that have not been seen without
|
|---|
| 1231 | having to insert all of them. For example, the user could set the variable to
|
|---|
| 1232 | @f["flagged"] and use the @hid[Mark Message] command to add messages he's
|
|---|
| 1233 | concerned about to the @f["flagged"] sequence. Then the user would see new
|
|---|
| 1234 | mail and interesting mail in his unseen @hid[Headers] buffer, but he doesn't
|
|---|
| 1235 | have to see everything in his @hid[New Mail Folder].
|
|---|
| 1236 |
|
|---|
| 1237 |
|
|---|
| 1238 | @subsection[Temporary Draft Folder]
|
|---|
| 1239 | Section @ref[components-files] of this chapter discusses how to make @mh keep
|
|---|
| 1240 | personal copies of outgoing mail. The method described will cause a copy of
|
|---|
| 1241 | every outgoing message to be saved forever and requires the user to go through
|
|---|
| 1242 | his @f[Fcc:] folder, weeding out those he does not need. The @hid[Temporary
|
|---|
| 1243 | Draft Folder] variable can name a folder whose messages will be deleted and
|
|---|
| 1244 | expunged whenever any folder's messages are expunged. By naming this folder in
|
|---|
| 1245 | the @mh profile and components files, copies of outgoing messages can be saved
|
|---|
| 1246 | temporarily. They will be cleaned up automatically, but the user still has a
|
|---|
| 1247 | time frame in which he can permanently save a copy of an outgoing message.
|
|---|
| 1248 | This folder can be visited with @hid[Message Headers], and messages can be
|
|---|
| 1249 | refiled just like any other folder.
|
|---|
| 1250 |
|
|---|
| 1251 |
|
|---|
| 1252 | @subsection[Reply to Message Prefix Action]
|
|---|
| 1253 | Depending on the kinds of messages one tends to handle, the user may find
|
|---|
| 1254 | himself usually replying to everyone who receives a certain message, or he may
|
|---|
| 1255 | find that this is only desired occasionally. In either case, the user
|
|---|
| 1256 | can set up his @mh profile to do one thing by default, using the @hid[Reply
|
|---|
| 1257 | to Message Prefix Action] variable in combination with a prefix argument to the
|
|---|
| 1258 | @hid[Reply to Message] command to get the other effect.
|
|---|
| 1259 |
|
|---|
| 1260 | For example, the following line in one's @mh profile will cause @mh to reply to
|
|---|
| 1261 | everyone receiving a certain message (except for the user himself since he
|
|---|
| 1262 | saves personal copies with the @f[-fcc] switch):
|
|---|
| 1263 | @begin[programexample]
|
|---|
| 1264 | repl: -cc all -nocc me -fcc out-copy
|
|---|
| 1265 | @end[programexample]
|
|---|
| 1266 | This user can set @hid[Reply to Message Prefix Action] to be @f[:no-cc-all].
|
|---|
| 1267 | Then whenever he invokes @hid[Reply to Message] with a prefix argument, instead
|
|---|
| 1268 | of replying to everyone, the draft will be set up in reply only to the person
|
|---|
| 1269 | who sent the mail.
|
|---|
| 1270 |
|
|---|
| 1271 | As an alternative example, not specifying anything in one's @mh profile and
|
|---|
| 1272 | setting this variable to @f[:cc-all] will have a default effect of replying
|
|---|
| 1273 | only to the sender of a piece of mail. Then invoking @hid[Reply to Message]
|
|---|
| 1274 | with a prefix argument will cause everyone who received the mail to get a copy
|
|---|
| 1275 | of the reply. If the user does not want a @f[cc:] copy, then he can add
|
|---|
| 1276 | @f[-nocc me] as a default switch and value in his @mh profile.
|
|---|
| 1277 |
|
|---|
| 1278 |
|
|---|
| 1279 | @newpage
|
|---|
| 1280 | @section[Wallchart]
|
|---|
| 1281 |
|
|---|
| 1282 | @tabclear
|
|---|
| 1283 | @tabdivide(3)
|
|---|
| 1284 |
|
|---|
| 1285 | @begin[format, spacing 1.5]
|
|---|
| 1286 |
|
|---|
| 1287 | @Begin[Center] @b[Global bindings:] @End[Center]
|
|---|
| 1288 |
|
|---|
| 1289 | @hid[Incorporate and Read New Mail]@\@\@bf[C-x i]
|
|---|
| 1290 | @hid[Send Message]@\@\@bf[C-x m]
|
|---|
| 1291 | @hid[Message Headers]@\@\@bf[C-x r]
|
|---|
| 1292 |
|
|---|
| 1293 |
|
|---|
| 1294 | @Begin[Center] @b[Headers and Message modes bindings:] @End[Center]
|
|---|
| 1295 |
|
|---|
| 1296 | @hid[Next Undeleted Message]@\@\@bf[n]
|
|---|
| 1297 | @hid[Previous Undeleted Message]@\@\@bf[p]
|
|---|
| 1298 | @hid[Send Message]@\@\@bf[s], @bf[m]
|
|---|
| 1299 | @hid[Forward Message]@\@\@bf[f]
|
|---|
| 1300 | @hid[Headers Delete Message]@\@\@bf[k]
|
|---|
| 1301 | @hid[Headers Undelete Message]@\@\@bf[u]
|
|---|
| 1302 | @hid[Headers Refile Message]@\@\@bf[o]
|
|---|
| 1303 | @hid[List Mail Buffers]@\@\@bf[l]
|
|---|
| 1304 | @hid[Quit Headers]@\@\@bf[q]
|
|---|
| 1305 | @hid[Incorporate and Read New Mail]@\@\@bf[i]
|
|---|
| 1306 | @hid[Next Message]@\@\@bf[M-n]
|
|---|
| 1307 | @hid[Previous Message]@\@\@bf[M-p]
|
|---|
| 1308 | @hid[Beginning of Buffer]@\@\@bf[<]
|
|---|
| 1309 | @hid[End of Buffer]@\@\@bf[>]
|
|---|
| 1310 |
|
|---|
| 1311 |
|
|---|
| 1312 | @Begin[Center] @b[Headers mode bindings:] @End[Center]
|
|---|
| 1313 |
|
|---|
| 1314 | @hid[Delete Message and Down Line]@\@\@bf[d]
|
|---|
| 1315 | @hid[Pick Headers]@\@\@bf[h]
|
|---|
| 1316 | @hid[Show Message]@\@\@bf[space], @bf[.]
|
|---|
| 1317 | @hid[Reply to Message]@\@\@bf[r]
|
|---|
| 1318 | @hid[Expunge Messages]@\@\@bf[!]
|
|---|
| 1319 |
|
|---|
| 1320 |
|
|---|
| 1321 | @Begin[Center] @b[Message mode bindings:] @End[Center]
|
|---|
| 1322 |
|
|---|
| 1323 | @hid[Delete Message and Show Next]@\@\@bf[d]
|
|---|
| 1324 | @hid[Goto Headers Buffer]@\@\@bf[^]
|
|---|
| 1325 | @hid[Scroll Message]@\@\@bf[space]
|
|---|
| 1326 | @hid[Scroll Message]@\@\@bf[C-v]
|
|---|
| 1327 | @hid[Scroll Window Up]@\@\@bf[backspace], @bf[delete]
|
|---|
| 1328 | @hid[Reply to Message in Other Window]@\@bf[r]
|
|---|
| 1329 | @hid[Edit Message Buffer]@\@\@bf[e]
|
|---|
| 1330 | @hid[Insert Message Region]@\@\@bf[H-y]
|
|---|
| 1331 |
|
|---|
| 1332 |
|
|---|
| 1333 | @Begin[Center] @b[Draft mode bindings:] @End[Center]
|
|---|
| 1334 |
|
|---|
| 1335 | @hid[Goto Headers Buffer]@\@\@bf[H-^]
|
|---|
| 1336 | @hid[Goto Message Buffer]@\@\@bf[H-m]
|
|---|
| 1337 | @hid[Deliver Message]@\@\@bf[H-s], @bf[H-c]
|
|---|
| 1338 | @hid[Insert Message Buffer]@\@\@bf[H-y]
|
|---|
| 1339 | @hid[Delete Draft and Buffer]@\@\@bf[H-q]
|
|---|
| 1340 | @hid[List Mail Buffers]@\@\@bf[H-l]
|
|---|
| 1341 |
|
|---|
| 1342 | @end[format]
|
|---|
| 1343 | @tabclear
|
|---|