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