fd4adbff46704cd11693be10a7d4cdb715f2a0d4
[mmh] / man / mh-profile.man5
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MH-PROFILE %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 mh-profile \- user profile customization for the mmh message handler
7 .SH DESCRIPTION
8 Each user of
9 .B mmh
10 is expected to have a file named
11 .I $HOME/.mmh/profile
12 in his or her home directory.  This file contains
13 a set of user parameters used by some or all of the
14 .B mmh
15 family of programs.  Each entry in the file is of the format
16 .PP
17 .RS 5
18 .IR Profile\-Component ": " value
19 .RE
20 .PP
21 If the text of profile entry is long, you may extend it across several
22 real lines by indenting the continuation lines with leading spaces or tabs.
23
24 .SS "Standard Profile Entries"
25 The possible profile components are exemplified below.  The only mandatory
26 entry is `Path:'.  The others are optional; some have default values if
27 they are not present.  In the notation used below, (profile, default)
28 indicates whether the information is kept in the user's
29 .B mmh
30 profile or
31 .B mmh
32 context, and indicates what the default value is.
33 .PP
34 .BR Path :
35 Mail
36 .RS 5
37 Sets the user's mail storage to `Mail'.  This is the
38 only mandatory profile entry.  (profile, no default)
39 .RE
40 .PP
41 .BR Context :
42 context
43 .RS 5
44 Declares the location of the
45 .B mmh
46 context file.  This is overridden by the environment variable
47 .BR $MMHC .
48 See the
49 .B HISTORY
50 section below.
51 (profile, default: $HOME/.mmh/context)
52 .RE
53 .PP
54 .BR Current\-Folder :
55 inbox
56 .RS 5
57 Keeps track of the current open folder.
58 (context, default: folder specified by `Inbox')
59 .RE
60 .PP
61 .BR Inbox :
62 inbox
63 .RS 5
64 Defines the name of your default inbox.
65 (profile, default: inbox)
66 .RE
67 .PP
68 .BR Previous\-Sequence :
69 .I pseq
70 .RS 5
71 Names the sequence or sequences which should be defined as the `msgs' or
72 `msg' argument given to any
73 .B mmh
74 command.  If not present or empty,
75 no such sequences are defined.  Otherwise, for each name given, the
76 sequence is first zero'd and then each message is added to the sequence.
77 Read the
78 .BR mh\-sequence (7)
79 man page for the details about this sequence. (profile, no default)
80 .RE
81 .PP
82 .BR Sequence\-Negation :
83 \&!
84 .RS 5
85 Defines the string which, when prefixed to a sequence name, negates
86 that sequence.  Hence, `!foo' means all those messages that
87 are not a member of the sequence `foo'.
88 To deactivate this mechanism, define Sequence\-Negation to an empty value.
89 Read the
90 .BR mh\-sequence (7)
91 man page for the details.  (profile, default: !)
92 .RE
93 .PP
94 .BR Unseen\-Sequence :
95 u
96 .RS 5
97 Names the sequence or sequences which shall contain any unread messages.
98 The commands
99 .BR inc ,
100 .BR rcvstore ,
101 and
102 .B show
103 will add or remove messages from these
104 sequences when they are incorporated or read.  If defined with an empty
105 value, no such sequences are defined.  Otherwise, each message is
106 added to, or removed from, each sequence name given.  Read the
107 .BR mh\-sequence (7)
108 man page for the details about this sequence.
109 (profile, default: u)
110 .RE
111 .PP
112 .BR Mh\-Sequences :
113 \&.mh_sequences
114 .RS 5
115 The name of the file in each folder which defines public sequences.
116 To disable the use of public sequences, leave the value portion of this
117 entry blank.  (profile, default: \&.mh_sequences)
118 .RE
119 .PP
120 .BI atr\- seq \- folder :
121 172\0178\-181\0212
122 .RS 5
123 Keeps track of the private sequence called `seq' in the specified
124 folder.  Private sequences are generally used for read\-only folders.
125 See the
126 .BR mh\-sequence (7)
127 man page for details about private sequences.
128 (context, no default)
129 .RE
130 .PP
131 .BR Editor :
132 vi
133 .RS 5
134 Defines the editor to be used by the commands
135 .BR comp ,
136 .BR dist ,
137 .BR forw ,
138 and
139 .BR repl .
140 This profile entry overrides the $VISUAL and $EDITOR environment variables,
141 but gets overridden by the $MMHEDITOR environment variabel.
142 (profile, default: vi)
143 .RE
144 .PP
145 .BR Pager :
146 more
147 .RS 5
148 This is the program used by
149 .B mhl
150 to page the
151 .B mhl
152 formatted message when displaying to a terminal.  It is also the default
153 program used by
154 .B show
155 to display message bodies (or message parts) of type text/plain.
156 This profile entry overrides the $PAGER environment variable, but gets
157 overridden by the $MMHPAGER environment variable.
158 (profile, default: more)
159 .RE
160 .PP
161 .BR Sendmail :
162 /usr/sbin/sendmail
163 .RS 5
164 The path name to the
165 .B sendmail
166 program, used by
167 .BR spost
168 to send mail.
169 (profile, default: %sendmailpath%)
170 .RE
171 .PP
172 .BR Attachment-Header :
173 Attach
174 .RS 5
175 The (pseudo) header in draft messages, that contains files to be attached
176 to the message on sending.
177 If you like to type a lot, name it `X-MH-Attachment'.
178 (profile, default: `Attach')
179 .RE
180 .PP
181 .BR Sign-Header :
182 Sign
183 .RS 5
184 The (pseudo) header in draft messages, that requests the message to be
185 signed automatically by
186 .BR send ,
187 using
188 .BR mhsign .
189 If you like to type a lot, name it `X-MH-Sign-This-Message'.
190 (profile, default: `Sign')
191 .RE
192 .PP
193 .BR Enc-Header :
194 Enc
195 .RS 5
196 The (pseudo) header in draft messages, that requests the message to be
197 signed and encrypted by
198 .BR send ,
199 using
200 .BR mhsign .
201 If you like to type a lot, name it `X-MH-Encrypt-This-Message'.
202 (profile, default: `Enc')
203 .RE
204 .PP
205 .BR Mime-Type-Query :
206 file \-b \-\-mime
207 .RS 5
208 A command that prints the MIME type of a given file.
209 The file name is appended to the command line.
210 Note: Older versions of file(1) won't generate the desired output.
211 file-4.26, for instance, omits a required semicolon.
212 file-5.04 is known to work.
213 Alternatively, you can use
214 .BR print\-mimetype ,
215 which is part of mmh, but guesses MIME types by file name extensions only.
216 .RE
217 .PP
218 .BR Msg\-Protect :
219 0644
220 .RS 5
221 An octal number which defines the permission bits for new message files.
222 See
223 .BR chmod (1)
224 for an explanation of the octal number.
225 (profile, default: 0600)
226 .RE
227 .PP
228 .BR Folder\-Protect :
229 0750
230 .RS 5
231 An octal number which defines the permission bits for new folder
232 directories.  See
233 .BR chmod (1)
234 for an explanation of the octal number.
235 (profile, default: 0700)
236 .RE
237 .PP
238 .IR program :
239 .I default switches
240 .RS 5
241 Sets default switches to be used whenever the mmh program
242 .I program
243 is invoked.  For example, one could override the `Editor:' profile
244 component when replying to messages by adding a component such as:
245 .PP
246 .RS 5
247 repl: \-editor /bin/ed
248 .RE
249 .PP
250 (profile, no defaults)
251 .RE
252 .PP
253 .IB lasteditor "-next:"
254 .I nexteditor
255 .RS 5
256 Names `nexteditor' to be the default editor after using
257 `lasteditor'.  This takes effect at `What now?' prompt
258 in
259 .BR comp ,
260 .BR dist ,
261 .BR forw ,
262 and
263 .BR repl .
264 After editing
265 the draft with `lasteditor', the default editor is set to be
266 `nexteditor'.  If the user types `edit' without any
267 arguments to `What now?', then `nexteditor' is used.
268 (profile, no default)
269 .RE
270 .PP
271 .BR Folder\-Stack :
272 .I folders
273 .RS 5
274 The contents of the folder-stack for the
275 .B folder
276 command.
277 (context, no default)
278 .RE
279 .PP
280 .BR Alternate\-Mailboxes :
281 mh@uci\-750a, bug-mh*
282 .RS 5
283 Tells
284 .B repl
285 and
286 .B scan
287 which addresses are really yours.
288 In this way,
289 .B repl
290 knows which addresses should be included in the
291 reply, and
292 scan
293 knows if the message really originated from you.
294 Addresses must be separated by a comma, and the hostnames listed should
295 be the `official' hostnames for the mailboxes you indicate, as
296 local nicknames for hosts are not replaced with their official site names.
297 For each address, if a host is not given, then that address on any host is
298 considered to be you.  In addition, an asterisk (`*') may appear at either
299 or both ends of the mailbox and host to indicate wild-card matching.
300 (profile, default: your user-id)
301 .RE
302 .PP
303 .BR Default-From :
304 Philipp Takacs <philipp@bureaucracy.de>
305 .RS 5
306 Tells
307 .B spost
308 which addresse shall be used, if the draft dosn\'t contain a
309 .RI ` From '
310 Header or the draft is not from the user.
311 .RE
312 .PP
313 .BR Aliasfile :
314 aliases
315 .I other-alias
316 .RS 5
317 Indicates aliases files for
318 .BR ali ,
319 .BR send .
320 and
321 .BR spost .
322 (profile, no default)
323 .RE
324 .PP
325 .BR Draft\-Folder :
326 drafts
327 .RS 5
328 Changes the default draft folder.  Read the
329 .BR mh\-draft (7)
330 man page for details. (profile, default: +drafts)
331 .RE
332 .PP
333 .BR Trash\-Folder :
334 trash
335 .RS 5
336 Changes the default folder for removed messages.  Read the
337 .BR rmm (1)
338 man page for details.
339 (profile, default: +trash)
340 .RE
341 .PP
342 .BI digest\-issue\- list :
343 1
344 .RS 5
345 Tells
346 .B forw
347 the last issue of the last volume sent for the digest
348 .IR list .
349 (context, no default)
350 .RE
351 .PP
352 .BI digest\-volume\- list :
353 1
354 .RS 5
355 Tells
356 .B forw
357 the last volume sent for the digest
358 .IR list .
359 (context, no default)
360 .RE
361 .PP
362 .BR MailDrop :
363 \&.mail
364 .RS 5
365 Tells
366 .B inc
367 your maildrop, if different from the default.  This is
368 superseded by the environment variable
369 .BR $MAILDROP .
370 (profile, default: %mailspool%/$USER)
371 .RE
372 .PP
373 .BR Signature :
374 RAND MH System (agent: Marshall Rose)
375 .RS 5
376 Tells
377 .B send
378 your mail signature.  This is superseded by the
379 environment variable
380 .BR $SIGNATURE .
381 If
382 .B $SIGNATURE
383 is not set and this profile entry is not present, the `gcos' field of
384 the \fI/etc/passwd\fP file will be used.
385 Your signature will be added to the address
386 .B send
387 puts in the `From:' header; do not include an address in the
388 signature text.  (profile, no default)
389 .RE
390
391 .SS "Process Profile Entries"
392 The following profile elements are used whenever an
393 .B nmh
394 program invokes some other program such as
395 .BR more .
396 The profile can be used to select alternate programs if the
397 user wishes.  The default values are given in the examples.
398 .RE
399 .PP
400 .BR listproc :
401 show
402 .RS 5
403 This program is used to list the contents of a message in response
404 to the
405 .B list
406 and
407 .B display
408 directive at the `What now?' prompt.
409 The absolute pathname of the message to list will be appended to
410 the command line given.
411 .RE
412 .PP
413 .BR whatnowproc :
414 %bindir%/whatnow
415 .RS 5
416 This is the program invoked by
417 .BR comp ,
418 .BR forw ,
419 .BR dist ,
420 and
421 .B repl
422 to query about the disposition of a composed draft message.
423 .RE
424
425 .SS "Environment Variables"
426 The operation of
427 .B mmh
428 and its commands it also controlled by the
429 presence of certain environment variables.
430 .PP
431 Many of these environment variables are used internally by the
432 `What now?' interface.  It's amazing all the information
433 that has to get passed via environment variables to make the
434 `What now?' interface look squeaky clean to the
435 .B mmh
436 user, isn't it?  The reason for all this is that the
437 .B mmh
438 user
439 can select
440 .B any
441 program as the
442 .IR whatnowproc ,
443 including
444 one of the standard shells.  As a result, it's not possible to pass
445 information via an argument list. The convention is that environment
446 variables whose names are all upper-case are user-settable; those
447 whose names are lower-case only are used internally by mmh and should
448 not generally be set by the user.
449 .PP
450 If the
451 .B WHATNOW
452 option was set during
453 .B mmh
454 configuration, and
455 if this environment variable is set, then if the commands
456 .BR refile\ ,
457 .BR send
458 or
459 .BR show
460 are not given any `msgs'
461 arguments, then they will default to using the file indicated by
462 .BR mh\-draft (7).
463 This is useful for getting the default behavior
464 supplied by the default
465 .IR whatnowproc .
466 .PP
467 .B $MMH
468 .RS 5
469 With this environment variable, you can specify an alternative
470 mmh directory. Personal mmh configuration files are located relative to
471 the mmh directory.
472 Non-absolute values are relative to the home directory.
473 This is one of the very few exceptions in
474 .B mmh
475 where non-absolute pathnames are not considered relative to the user's
476 mmh directory.
477 .RE
478 .PP
479 .B $MMHP
480 .RS 5
481 With this environment variable, you can specify a profile
482 other than
483 .I $HOME/.mmh/profile
484 to be read by the
485 .B mmh
486 programs
487 that you invoke.  If the value of
488 .B $MMHP
489 is not absolute, it will be presumed to start from the mmh directory.
490 .RE
491 .PP
492 .B $MMHC
493 .RS 5
494 With this environment variable, you can specify a
495 context other than the normal context file (as specified in
496 the profile).  As always, unless the value of
497 .B $MMHC
498 is absolute, it will be presumed to start from your mmh directory.
499 .RE
500 .PP
501 .B $MM_CHARSET
502 .RS 5
503 With this environment variable, you can specify
504 the native character set you are using.  You must be able to display
505 this character set on your terminal.
506 .PP
507 This variable is checked to see if a RFC-2047 header field should be
508 decoded (in
509 .BR inc ,
510 .BR scan ,
511 .BR mhl ).
512 This variable is
513 checked by
514 .B show
515 to see if the
516 .I showproc
517 or
518 .I showmimeproc
519 should
520 be called, since showmimeproc will be called if a text message uses
521 a character set that doesn't match
522 .BR $MM_CHARSET .
523 This variable is
524 checked by
525 .B show
526 for matches against the charset parameter
527 of text contents to decide it the text content can be displayed
528 without modifications to your terminal.  This variable is checked by
529 .B mhbuild
530 to decide what character set to specify in the charset
531 parameter of text contents containing 8\-bit characters.
532 .PP
533 When decoding text in such an alternate character set,
534 .B mmh
535 must be able to determine which characters are alphabetic, which
536 are control characters, etc.  For many operating systems, this
537 will require enabling the support for locales (such as setting
538 the environment variable
539 .B $LC_CTYPE
540 to iso_8859_1).
541 .RE
542 .PP
543 .B $MAILDROP
544 .RS 5
545 This variable tells
546 .B inc
547 the default maildrop. This supersedes the `MailDrop' profile entry.
548 .RE
549 .PP
550 .B $SIGNATURE
551 .RS 5
552 This variable tells
553 .B send
554 and
555 .B post
556 your mail signature. This supersedes the `Signature' profile entry.
557 .RE
558 .PP
559 .B $HOME
560 .RS 5
561 This variable tells all
562 .B mmh
563 programs your home directory
564 .RE
565 .PP
566 .B $SHELL
567 .RS 5
568 This variable tells
569 .B bbl
570 the default shell to run
571 .RE
572 .PP
573 .B $MMHEDITOR
574 .br
575 .B $VISUAL
576 .br
577 .B $EDITOR
578 .RS 5
579 These variables (in descending priority) define the default editor to use.
580 .RE
581 .PP
582 .B $MMHPAGER
583 .br
584 .B $PAGER
585 .RS 5
586 These variables (in descending priority) define the default pager to use.
587 .RE
588 .PP
589 .B $TERM
590 .RS 5
591 This variable tells
592 .B mmh
593 your terminal type.
594 .PP
595 The environment variable
596 .B $TERMCAP
597 is also consulted.  In particular,
598 these tell
599 .B scan
600 and
601 .B mhl
602 how many columns wide your terminal is.  They also tell
603 .B mhl
604 how many
605 lines long your terminal screen is.
606 .RE
607 .PP
608 .B $mhdraft
609 .RS 5
610 This is the path to the working draft.
611 .PP
612 This is set by
613 .BR comp ,
614 .BR dist ,
615 .BR forw ,
616 and
617 .B repl
618 to tell the
619 .I whatnowproc
620 which file to ask `What now?'
621 questions about.
622 .RE
623 .PP
624 .B $mhaltmsg
625 .RS 5
626 .B dist
627 and
628 .B repl
629 set
630 .B $mhaltmsg
631 to tell the
632 .I whatnowproc
633 about an alternate message associated with the
634 draft (the message being distributed or replied to).
635 It is also set during edit sessions so you can peruse the
636 message being distributed or replied to.
637 This variable replaces the older
638 .B $editalt
639 variable.
640 There used to be a link named `@' in the working directory, pointing
641 to the alternate message, there is no such link anymore.
642 .RE
643 .PP
644 .B $mhdist
645 .RS 5
646 .B dist
647 sets
648 .B $mhdist
649 to tell the
650 .I whatnowproc
651 that message re-distribution is occurring.
652 .RE
653 .PP
654 .B $mheditor
655 .RS 5
656 This is set by
657 .BR comp ,
658 .BR repl ,
659 .BR forw ,
660 and
661 .B dist
662 to tell the
663 .I whatnowproc
664 the user's choice of
665 editor (unless overridden by
666 .BR \-noedit ).
667 .RE
668 .PP
669 .B $mhuse
670 .RS 5
671 This may be set by
672 .BR comp .
673 .RE
674 .PP
675 .B $mhmessages
676 .RS 5
677 This is set by
678 .BR dist ,
679 .BR forw ,
680 and
681 .B repl
682 if annotations are to occur.
683 .RE
684 .PP
685 .B $mhannotate
686 .RS 5
687 This is set by
688 .BR dist ,
689 .BR forw ,
690 and
691 .B repl
692 if annotations are to occur.
693 .RE
694 .PP
695 .B $mhfolder
696 .RS 5
697 This is the folder containing the alternate message.
698 .PP
699 This is set by
700 .B dist
701 and
702 .B repl
703 during edit sessions so you
704 can peruse other messages in the current folder besides the one being
705 distributed or replied to.
706 .RE
707
708 .SH FILES
709 .fc ^ ~
710 .nf
711 .ta \w'%etcdir%/ExtraBigFileName  'u
712 ^$HOME/.mmh~^The user's mmh directory
713 ^or $MMH~^Rather than the standard mmh directory
714 .sp
715 ^$HOME/.mmh/profile~^The user's profile
716 ^or $MMHP~^Rather than the standard profile
717 .sp
718 ^$HOME/.mmh/context~^The user's context
719 ^or $MMHC~^Rather than the standard context
720 .sp
721 ^<folder>/.mh_sequences~^Public sequences for <folder>
722 .fi
723
724 .SH "SEE ALSO"
725 nmh(1), environ(5), mh-sequence(7)
726
727 .SH HISTORY
728 The
729 .I $HOME/.mmh/profile
730 contains only static information, which
731 .B mmh
732 programs will
733 .B NOT
734 update.  Changes in context are made to the
735 .I $HOME/.mmh/context
736 file.
737 This includes, but is not limited to: the `Current\-Folder' entry
738 and all private sequence information.  Public sequence information is
739 kept in each folder in the file determined by the `Mh\-Sequences'
740 profile entry (default is
741 .IR \&.mh_sequences ).
742 .PP
743 The profile may override the path of the
744 .I context
745 file, by specifying a `Context' entry.
746 As a result, you can actually have more than one set of
747 private sequences by using different context files.
748
749 .SH BUGS
750 The shell quoting conventions are not available in the profile.
751 Each token is separated by whitespace.
752 .PP
753 There is some question as to what kind of arguments should be placed
754 in the profile as options.  In order to provide a clear answer, recall
755 command line semantics of all
756 .B mmh
757 programs: conflicting switches
758 (e.g.
759 .B \-header
760 and
761 .BR \-noheader )
762 may occur more than one time on the
763 command line, with the last switch taking effect.  Other arguments, such
764 as message sequences, filenames and folders, are always remembered on
765 the invocation line and are not superseded by following arguments of
766 the same type.  Hence, it is safe to place only switches (and their
767 arguments) in the profile.
768 .PP
769 If one finds that an
770 .B mmh
771 program is being invoked again and again
772 with the same arguments, and those arguments aren't switches, then there
773 are a few possible solutions to this problem.  The first is to create a
774 (soft) link in your
775 .I $HOME/bin
776 directory to the
777 .B mmh
778 program
779 of your choice.  By giving this link a different name, you can create
780 a new entry in your profile and use an alternate set of defaults for
781 the
782 .B mmh
783 command.  Similarly, you could create a small shell script
784 which called the
785 .B mmh
786 program of your choice with an alternate set
787 of invocation line switches (using links and an alternate profile entry
788 is preferable to this solution).
789 .PP
790 Finally, the
791 .B csh
792 user could create an alias for the command of the form:
793 .PP
794 .RS 5
795 alias cmd 'cmd arg1 arg2 ...'
796 .RE
797 .PP
798 In this way, the user can avoid lengthy type-in to the shell, and still
799 give
800 .B mmh
801 commands safely.  (Recall that some
802 .B mmh
803 commands
804 invoke others, and that in all cases, the profile is read, meaning that
805 aliases are disregarded beyond an initial command invocation)