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