]> diplodocus.org Git - nmh/blob - docs/historical/beginners.txt
Cleaned up sendfiles(1) man page just a bit.
[nmh] / docs / historical / beginners.txt
1
2
3
4
5 MH for Beginners
6
7
8
9 Mary Hegardt Tim Morgan
10
11
12
13 April 12, 1990
14
15
16
17 This document is intended to be an introduction for new users to the MH
18
19 mail system. For more detailed information, users will want to read the
20
21 document called The Rand MH Message Handling System: User's Manual
22
23 by Marshall T. Rose and John L. Romine. It is available for Xeroxing in
24
25 suite CS408.
26
27
28
29 1 Using Electronic Mail
30
31
32
33 Electronic mail (e-mail) is a quick, convenient way to send a message to
34
35 another person (or persons). The message recipient can read and reply to
36
37 the message at his convenience. E-mail is much faster than a paper memo
38
39 and avoids inconveniences associated with the telephone such as unwanted
40
41 interruptions and "phone tag."
42
43
44 At UCI, one can send e-mail to people within the ICS department, people in
45
46 other units on campus, and to people at some other institutions off campus
47
48 (usually other universities).
49
50
51 An electronic mail message consists of two parts: the headers and the body.
52
53 The body comes after the headers and consists of the "message": whatever
54
55 the sender types in. The headers are the lines at the top of the message
56
57 including the subject and addresses of the people to whom the message is
58
59 addressed. It is similar to the top lines of a memo: To:, From:, Subject:,
60
61 and so on. The headers are separated from the body by a blank line. As in
62
63
64
65 1
66 \f
67
68
69
70 memos, the people listed in the Cc: field are not intended to be the primary
71
72 recipients of the message. The message is for their information only, and
73
74 they are not expected to reply.
75
76
77 E-mail is also useful for discussions among groups of people. This "bboards"
78
79 (electronic bulletin boards) facility will be discussed later.
80
81
82 An electronic mail address looks like "name @site ". The name is a person's
83
84 "mail handle" _ usually his first initial followed by his last name. For
85
86 example, Mary Hegardt's mail handle is "mhegardt". The site is the system
87
88 where the addressee receives mail. Within the ICS Department, you need
89
90 only know the person's mail handle; the mail system will automatically fill
91
92 in the "@site " part.
93
94
95
96 2 Why MH ?
97
98
99
100 The MH system is very different from most mail user agents. Instead of
101
102 running one large program which handles all mail functions and keeps mes-
103
104 sages in one large file, MH is a collection of smaller single-purpose programs
105
106 used to manipulate mail messages which are kept in individual files. MH
107
108 may seem to be more complicated or harder to use than other mail systems
109
110 (MM, for example), but MH has been designed to allow you to take full ad-
111
112 vantage of existing Unix1 commands and programs in connection with mail
113
114 messages. For example, you can use your usual text editor, spelling program,
115
116 and printer commands on individual messages.
117
118
119
120 3 The Basics
121
122
123
124 The first time you use an MH command (probably inc), MH will create a
125
126 directory called "Mail" in your home (login) directory. All your mail will be
127
128 stored in directories beneath this one. It will also create a file in your home
129
130 directory called .mh_profile. It is a file that allows you to tailor your MH
131
132 environment. We'll discuss this more later.
133 ________________________________________________
134 1 Unix is a trademark of AT&T Bell Laboratories
135
136
137
138 2
139 \f
140
141
142
143 3.1 Reading Mail
144
145
146
147 When someone sends a mail message to you, it is delivered to a file called
148
149 your "mail drop" file. When you are ready to read your mail, you have to
150
151 incorporate (or "inc") your mail messages from the mail drop area into your
152
153 account.
154
155
156 Everytime you log in to your Unix account, you will be told if you have
157
158 new mail messages. When you are ready to read them, type inc. The inc
159
160 program will copy your mail into your "inbox" and generate a "scan" listing
161
162 of the new messages. For example,
163
164
165
166 4.2 BSD UNIX #116: Mon Jul 15 14:03:21 PDT 1985
167 You have new ZOTnet mail, type "inc" (or mail)
168
169 TERM = (dm1520)
170
171 % inc
172
173 Incorporating new mail into inbox ...
174
175 1+ 10/29 1732-PST Tim Morgan new bboard! <<Please add us to the uni
176 2 11/12 0016-PST ROODE@uci-20b CP6 from the 20s <<What is (will be) t
177 4 11/15 1909-EDT tts@tts Hello, got a few questions
178 5 11/15 2134-PST Marshall Rose MH.6 on 750a <<Mary, I've left the dis
179 6 11/16 0808-PST Mail Delivery Su Returned mail: Host unknown
180 7 11/16 1021-PST Tim Morgan Unix-wizards/info-unix move
181 8 11/18 0952-PST freeman@icsd.UCI Re:New system wide aliases for ICS facu
182 9 11/18 1346-EDT tts@tts Have we got a problem?
183
184
185
186 This is what a typical "inc" session for the Postmaster looks like. Inc copies
187
188 my mail into my "inbox" folder, assigns a unique number to each message,
189
190 and scans them for me. The numbers allow you to refer to each message
191
192 individually. After the message number, you see the date and time the mes-
193
194 sage was sent, the name of the sender, and the subject of the message. The
195
196 "current" message is indicated by a "+" sign. To read it, type "show":
197
198
199
200 % show
201
202 (Message inbox:1)
203 Received: from localhost by UCI.EDU id a005369; 29 Oct 85 17:32 PST
204 To: postmaster@UCI.EDU
205 Subject: new bboard!
206 Date: 29 Oct 85 17:32:24 PST (Tue)
207 From: Tim Morgan <morgan@UCI.EDU>
208
209
210
211 3
212 \f
213
214
215
216 Please add us to the unix-sw list. Also, if RAJ hasn't mentioned it,
217 and if it still exists, we should get on the Astronomy bboard.
218
219 Tim
220
221
222
223 If the message is longer than one screenful, you will see the word "more" at
224
225 the bottom_of_the_screen.__When you are ready to see "more" of the message,______
226
227 press the __space_bar______ __to see another screenful, or press the __return____ _key to see
228
229 just one more line.
230
231
232 To see the next message, you could type a couple of different commands:
233
234
235 % next
236
237
238 or
239
240
241 % show next
242
243
244 or
245
246
247 % show 2
248
249
250 All of these commands would have the same effect: to type out the next
251
252 message in the list. The most efficient thing to do is to type "next". When
253
254 You do that, message number 2 will be shown and become the "current
255
256 message".
257
258
259
260 % next
261
262
263 (Message inbox:2)
264 Received: from UCI-20B by UCI-ICSA id aa01222; 12 Nov 85 0:23 PST
265 Date: 12 Nov 1985 0016-PST
266 From: ROODE@uci-20b
267 Subject: CP6 from the 20s
268 To: zotnet@uci-20b
269 cc: dana_roode%ucicp6@UCI.EDU
270
271
272 What is (will be) the prescribed method of addressing for sending
273 CP6 mail from the 20s? They dont seem to know about @CF, @UCICP6,
274 but "Name_Name%UCICP6"@ICSA seems to fly.
275
276
277 dana
278
279
280
281 4
282 \f
283
284
285
286 3.2 Selecting Messages
287
288
289
290 As you have seen, messages can be referred to by their message numbers.
291
292 Some MH commands, such as show, can act upon more than one message
293
294 at a time. A range of messages can be specified using the form "name1-
295
296 name2 " where name is a message number or one of the reserved message
297
298 names described below:
299
300
301
302 cur The current message (the last one that was handled)
303
304
305 next The next message (same as cur + 1)
306
307
308 prev The previous message (cur 1)
309
310
311 first The first message in the current folder
312
313
314 last The last message in the folder
315
316
317 all All messages (first last )
318
319
320
321 If you do not name a specific message, the command will act upon the "cur-
322
323 rent message".
324
325
326
327 3.3 Sending Messages
328
329
330
331 A mail message consists of two parts: the headers and the body. The headers
332
333 are the lines at the top of the message that say "To:" and so on. The body
334
335 is the actual text of the message (what you want to say). To send someone
336
337 a message, you start with the comp command. This will start up an editor
338
339 called prompter that will prompt you to fill in_the_headers._ You should type
340
341 the requested information for that header or a __return____ _to_omit_it._ You should
342
343 end the message by typing control-D (press down the key marked __ctrl__ __and
344
345 strike the D key) at the beginning of a new line. Here's an example:
346
347
348
349 % comp
350
351 To: morgan, raj
352
353 Cc:
354
355
356
357 5
358 \f
359
360
361
362 Subject: Lunch
363
364 ---------
365
366 Where are we going for lunch today ?
367
368
369
370 Mary
371
372 <control-D>
373
374 --------
375
376 What now ? send
377
378
379
380 At the "What now ?" prompt you can type a ? to see what commands you
381
382 can type next. One of the most useful options at this point is to edit the
383
384 draft of the message to correct any mistakes. To do this you type:
385
386
387 What now ? edit vi
388
389
390 This will put you in the vi editor to edit the message. If you use emacs or any
391
392 other editor, just type "edit emacs" or whatever. When you have finished
393
394 editing, just exit the editor as you would normally. You will then get another
395
396 "What now ?" prompt. Here are some of the "What now" options:
397
398
399
400 edit editor Edit the message using the specified editor. When you
401
402 exit, you will be back at What now.
403
404
405 list Shows the message you just typed
406
407
408 whom -check Verifies that the addresses you have used are valid as far
409
410 as our system can tell
411
412
413 send Sends the message to the recipients
414
415
416 push Sends the message in the background
417
418
419 quit Quits without sending the message. Saves the text of
420
421 the message as a "draft". Type comp -use to get back
422
423 to that draft later.
424
425
426 quit -delete Quit, throwing away the draft
427
428
429
430 Make sure you are happy with your message before typing send. There is no
431
432 way to recall a message once it has been sent.
433
434
435
436 6
437 \f
438
439
440
441 3.4 Replying to Messages
442
443
444
445 To reply to the current message type repl. When you do this, the reply
446
447 headers will be printed out and you will be put in the prompter editor to
448
449 type in your reply text. When you are replying to a message, the name of
450
451 the sender of the original message will appear in the "To:" field. Any people
452
453 on the "To:" or "Cc:" lists will also be copied on your reply message. As
454
455 with comp, when you have finished, type control-D and send (or whatever)
456
457 at What now ?.
458
459
460
461 3.5 Forwarding Messages
462
463
464
465 If you receive a particularly interesting message and can't resist sharing
466
467 it with others, you can forward it using the forw command. You will be
468
469 prompted to fill in the headers (the address to which the message is to be
470
471 forwarded, etc.). When you have done this, you will see the text of the mes-
472
473 sage which you are forwarding and will be given the opportunity to add some
474
475 enlightening text to the message. Exit with control-D and do whatever feels
476
477 good at the What now ? prompt.
478
479
480
481 3.6 The Advanced Features
482
483
484
485 You will probably want to master the beginning MH concepts before you
486
487 tackle the following. . .
488
489
490
491 3.7 Folders
492
493
494
495 Folders are really just directories for storing mail messages in an organized
496
497 way. To store a message in a folder named "inbox", type:
498
499
500 % refile 5 +inventory
501
502
503 If the folder doesn't exist yet, you will be asked if it should be created. To
504
505 access messages in another folder, you can change your current folder from
506
507
508
509 7
510 \f
511
512
513
514 "inbox" to something else. If you want to look at all the messages pertaining
515
516 to the inventory, you type:
517
518
519 % folder +inventory
520
521
522 and now you use scan, show, etc., to manipulate the messages in that folder.
523
524 To change back to inbox, type:
525
526
527 % folder +inbox
528
529
530 Using the inc command will change your current folder to be the "inbox"
531
532 automatically.
533
534
535
536 4 Mailing files
537
538
539
540 Mailing files is usually not a good idea, especially for large files. The mail
541
542 system was never designed for moving big files. You can use the cp file to
543
544 move the file to another account much more efficiently:
545
546
547 % cp "frated/desired-file "./newfile
548
549
550 This will copy the file from frated's account to the current directory and call
551
552 it "newfile".
553
554
555 You can also copy files across the network using rcp:
556
557
558 % rcp icsd:frated/desired-file ./newfile
559
560
561 This copies frated's file on the system icsd to the current directory.
562
563
564 If you really have to mail a file, you use the mhmail program. To mail a file
565
566 "myfile" to another user "frated", with "MyFile" as the subject type:
567
568
569 % mhmail frated -subject MyFile < myfile
570
571
572
573 5 Searching for messages
574
575
576
577 The pick program allows you to search your inbox (or any other) folder to
578
579 find messages which contain a certain word. If you want to list all messages
580
581
582
583 8
584 \f
585
586
587
588 from Smith you can type:
589
590
591 % pick -from smith -list
592
593
594 and it will list the numbers of all messages from Smith that are in the cur-
595
596 rent folder. You can pick messages according to any of the headers (-to
597
598 -from -subj -cc or -date) or just search all the messages for a given word
599
600 (-search).
601
602
603
604 6 The MH Profile
605
606
607
608 Each MH user has a file in his directory called .mh_profile. This file contains
609
610 a list of user-specified default options for MH programs. The only required
611
612 entry is the name of your MH directory:
613
614
615 Path: Mail
616
617
618 or
619
620
621 Path: mhbox
622
623
624 To make a change to your .mh_profile, you edit the file and add a line for
625
626 the applicable program. For example, if you would like to use vi instead of
627
628 prompter as your initial editor when composing messages, you would add
629
630 this line to your .mh_profile:
631
632
633 comp: -editor vi
634
635
636 or, if you want to have a format file for scan to use, you should have:
637
638
639 scan: -form formatfile
640
641
642 Almost all of the MH programs have options that can be set using the
643
644 .mh_profile. You should consult the MH User's Manual for more infor-
645
646 mation about this.
647
648
649 Many people will want to add a signature line to their .mh_profile. This
650
651 line will appear as your signature on the From: line in messages you send. It
652
653 looks like this:
654
655
656
657 9
658 \f
659
660
661
662 Signature: John Q. Public
663
664
665 Occasionally people express an interest in getting rid of some of the header
666
667 lines in their mail messages. They don't want to see the "Received from",
668
669 "Via" information, or some other header. It is possible to prevent these
670
671 and other annoying headers from being displayed by changing your show
672
673 processor to be mhless. To do this you must add this line
674
675
676 showproc: mhless
677
678
679 to your .mh_profile. You also must create a file called ".mhlessrc" contain-
680
681 ing the words which appear at the beginning of the lines you don't want to
682
683 see.
684
685
686 The typical ".mhlessrc" file will look like this:
687
688
689
690 Received
691
692 Via
693
694 BB-Posted
695
696 Return-Path
697
698
699
700 The ".mhlessrc" file must be in your home directory.
701
702
703
704 7 BBoards
705
706
707
708 Electronic bulletin boards (BBoards) are a convenient way for a group of peo-
709
710 ple to discuss a particular topic. Messages are sent to an address where they
711
712 can be read and replied to by all interested parties. In the ICS department
713
714 we have some "local" BBoards which involve only people in the department.
715
716 We also subscribe to many nationally distributed BBoards. BBoards are
717
718 read using the bbc program which will allow you to read the messages with
719
720 an MH-like interface.
721
722
723 One very important BBoard is "system". It contains vital news about
724
725 changes in software, system downtime, new programs, and other informa-
726
727 tion useful to all users.
728
729
730
731 10
732 \f
733
734
735
736 To read a BBoard, you type "bbc BBoard__name ". The bbc program will
737
738 check to see if there are new messages in the named BBoard and if there are,
739
740 it will start up msh so you can read them. The msh program allows you to
741
742 use regular MH commands when reading BBoards. Type "show" to see the
743
744 current message, "next" to see the next message, and so on. Type "quit" to
745
746 quit reading the current BBoard. If you have named more than one BBoard
747
748 on the command line or in your .mh_profile, bbc will continue processing
749
750 the next BBoard in the list.
751
752
753 Here is an example of using bbc to read the system BBoard:
754
755
756
757 11
758 \f
759
760
761
762 % bbc system
763 Reading system, currently at message 1 of 22
764 (msh) show
765
766
767 (Message 1, BBoard-ID: 1360)
768 BBoard-ID: 1360
769 BB-Posted: Wed, 29 Jan 86 15:36:39 PST
770 Received: from localhost by UCI.EDU id a006693; 29 Jan 86 15:20 PST
771 To: network@UCI.EDU
772 Subject: Imagen 24300
773 Date: Wed, 29 Jan 86 15:19:43 -0800
774 From: Tinh Tang <ttang@UCI.EDU>
775
776
777 The Imagen 24300 is now operating normally. It was broken down
778 due to the paper jammed in the drum. Luckily, it didn't cause
779 any damage.
780
781
782 /ttang
783
784
785 (msh) next
786
787
788 (Message 4, BBoard-ID: 1363)
789 BBoard-ID: 1363
790 BB-Posted: Fri, 31 Jan 86 13:33:37 PST
791 Received: from localhost by UCI.EDU id a001631; 31 Jan 86 13:30 PST
792 To: msgs@UCI.EDU
793 Subject: uci.edu down 2/7/86 17:10 - 2/7/86 20:30
794 Date: Fri, 31 Jan 86 13:30:27 -0800
795 From: root@UCI.EDU
796
797
798 The uci.edu will be down from
799 February 7,1986 17:10 till February 7,1986 20:30.
800 The reason for the downtime is:
801 Both, the Computing Facility and the Physical Sciences Dataswitches
802 will be unavailable from 5:10pm until 8:30pm on Friday, February 7th.
803 Therefore all the Computers attached to those switches and the
804 corresponding tandem link will be unavailable to users on
805 the specified time. (RJ).
806
807
808 Downtime Scheduler
809
810
811 (msh) quit
812 %
813
814
815
816 12
817 \f
818
819
820
821 You can see a list of all the available BBoards by typing:
822
823
824 % bbc -topics
825
826
827 You can also put a line in your ".mh_profile" listing all the BBoards you
828
829 want to read on a regular basis:
830
831
832 bboards: system movies mh-users events
833
834
835 Then you only need to type "bbc" to read all your BBoards.
836
837
838
839 8 Checking for Mail
840
841
842
843 Under Unix, there are many different ways to check for new mail. The easiest
844
845 way to do it is to set the csh variable named "mail" to tell csh to check for
846
847 new mail for you periodically. To do this, add the line
848
849
850 set mail=(60 /usr/spool/mail/$USER)
851
852
853 to the .login file in your home directory. This command says to check for
854
855 mail if csh is about to prompt you with a % sign, and if it has been at least
856
857 60 seconds since it last checked for mail. The advantage of this method of
858
859 mail notification, besides simplicity, is that you will never be interrupted by
860
861 a mail notification. You will only be notified about new mail when you are
862
863 between commands.
864
865
866 If you want asynchronous mail notification, which will print to your terminal
867
868 regardless of what you are currently doing, you may make use of a "receive
869
870 mail hook" called "rcvtty". To do this, create a file in your home directory
871
872 called ".maildelivery". In this file, put the line
873
874
875 * - pipe R /usr/uci/lib/mh/rcvtty
876
877
878 Then, each time mail arrives, you will receive a one-line "scan" listing of
879
880 the mail if your terminal is world-writable. For more information on mail
881
882 delivery files, type:
883
884
885 % man 5 maildelivery
886
887
888
889 13
890 \f
891
892
893
894 This will tell you about all the options available to you if you use maildelivery
895
896 files.
897
898
899
900 9 Aliases
901
902
903
904 Using MH, you may specify your own private mail aliases. This feature allows
905
906 you to store lists of addresses or long internet addresses of people with whom
907
908 you frequently correspond in one file, and then to address them using short
909
910 mnemonic names. Typically, you will call your alias file "aliases"; it must
911
912 be stored in your MH directory. The format of this file is simple. The alias
913
914 is given, followed by a colon, followed by one or more legal mail addresses
915
916 separated by commas. For example, you might for some reason have an alias
917
918 for all the users named "Rose" in the ICS department:
919
920
921 roses: prose, srose, mrose, drose
922
923
924 In addition to your "aliases" file, you will need to modify your
925
926 .mh_profile in order to use aliases. You should add the flag "-alias
927
928 aliases" to the entries for the commands ali, whom, send, and push, cre-
929
930 ating entries for these programs if they aren't already in your .mh_profile.
931
932 Now, messages addressed to "roses" will be distributed to all the people
933
934 listed in the alias.
935
936
937 The ali command is used to show you what an alias expands to. You just
938
939 type
940
941
942 % ali alias
943
944
945 and ali will respond with the expansion of the alias. Ali searches the system
946
947 aliases file in addition to your private ones.
948
949
950
951 10 Blind Lists
952
953
954
955 There are two different types of so-called "blind addressing" of messages.
956
957 The BCC: field allows you to add recipients to your message just like those
958
959 who are CC'd, but the normal recipients will not see that the BCC recipients
960
961
962
963 14
964 \f
965
966
967
968 were copied on the message, their replies will not go to the blind recipients,
969
970 and the blind recipients cannot (easily) reply to the message.
971
972
973 The second type of blind mailing is actually called a "group address list",
974
975 although it is commonly referred to as a "blind list". The format of this type
976
977 of address is
978
979
980 phrase : address__list ;
981
982
983 where the "phrase " is any English phrase of one or more words, and the
984
985 address__list consists of one or more addresses separated by commas. The
986
987 recipients of a message addressed in this fashion will see simply
988
989
990 phrase : ;
991
992
993 so when they reply to the message, their reply will come only to the sender
994
995 (or the Reply-To: field, if one was specified), rather than going to all the
996
997 recipients of the original list. For example, to use a group address list for the
998
999 "roses" alias you would type:
1000
1001
1002 To: People Named Rose: roses;
1003
1004
1005 This type of group address is very useful for making up lists of related people,
1006
1007 such as all the people working on a particular research project.
1008
1009
1010
1011 15