remove unused defines in uip/pick.c
[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 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 address to use, if the draft dosn't contain a
309 .RI ` From '
310 Header or the draft is not from the user.
311 (profile, no default)
312 .RE
313 .PP
314 .BR Aliasfile :
315 aliases
316 .I other-alias
317 .RS 5
318 Indicates aliases files for
319 .BR ali ,
320 .BR send .
321 and
322 .BR spost .
323 (profile, no default)
324 .RE
325 .PP
326 .BR Draft\-Folder :
327 drafts
328 .RS 5
329 Changes the default draft folder.  Read the
330 .BR mh\-draft (7)
331 man page for details. (profile, default: +drafts)
332 .RE
333 .PP
334 .BR Trash\-Folder :
335 trash
336 .RS 5
337 Changes the default folder for removed messages.  Read the
338 .BR rmm (1)
339 man page for details.
340 (profile, default: +trash)
341 .RE
342 .PP
343 .BI digest\-issue\- list :
344 1
345 .RS 5
346 Tells
347 .B forw
348 the last issue of the last volume sent for the digest
349 .IR list .
350 (context, no default)
351 .RE
352 .PP
353 .BI digest\-volume\- list :
354 1
355 .RS 5
356 Tells
357 .B forw
358 the last volume sent for the digest
359 .IR list .
360 (context, no default)
361 .RE
362 .PP
363 .BR MailDrop :
364 \&.mail
365 .RS 5
366 Tells
367 .B inc
368 your maildrop, if different from the default.  This is
369 superseded by the environment variable
370 .BR $MAILDROP .
371 (profile, default: %mailspool%/$USER)
372 .RE
373 .PP
374 .BR Signature :
375 RAND MH System (agent: Marshall Rose)
376 .RS 5
377 Tells
378 .B send
379 your mail signature.  This is superseded by the
380 environment variable
381 .BR $SIGNATURE .
382 If
383 .B $SIGNATURE
384 is not set and this profile entry is not present, the `gcos' field of
385 the \fI/etc/passwd\fP file will be used.
386 Your signature will be added to the address
387 .B send
388 puts in the `From:' header; do not include an address in the
389 signature text.  (profile, no default)
390 .RE
391 .PP
392 .BR Metafile-Extention :
393 \&.meta
394 .RS 5
395 This extions will be used to store meta information about a mail or a draft.
396 Currently only implemented by whatnow2.  (profile, no default)
397 .RE
398
399 .SS "Process Profile Entries"
400 The following profile elements are used whenever an
401 .B mmh
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 listproc :
409 show
410 .RS 5
411 This program is used to list the contents of a message in response
412 to the
413 .B list
414 and
415 .B display
416 directive at the `What now?' prompt.
417 The absolute pathname of the message to list will be appended to
418 the command line given.
419 .RE
420 .PP
421 .BR whatnowproc :
422 %bindir%/whatnow
423 .RS 5
424 This is the program invoked by
425 .BR comp ,
426 .BR forw ,
427 .BR dist ,
428 and
429 .B repl
430 to query about the disposition of a composed draft message.
431 .RE
432
433 .SS "Environment Variables"
434 The operation of
435 .B mmh
436 and its commands it also controlled by the
437 presence of certain environment variables.
438 .PP
439 Many of these environment variables are used internally by the
440 `What now?' interface.  It's amazing all the information
441 that has to get passed via environment variables to make the
442 `What now?' interface look squeaky clean to the
443 .B mmh
444 user, isn't it?  The reason for all this is that the
445 .B mmh
446 user
447 can select
448 .B any
449 program as the
450 .IR whatnowproc ,
451 including
452 one of the standard shells.  As a result, it's not possible to pass
453 information via an argument list. The convention is that environment
454 variables whose names are all upper-case are user-settable; those
455 whose names are lower-case only are used internally by mmh and should
456 not generally be set by the user.
457 .PP
458 If the
459 .B WHATNOW
460 option was set during
461 .B mmh
462 configuration, and
463 if this environment variable is set, then if the commands
464 .BR refile\ ,
465 .BR send
466 or
467 .BR show
468 are not given any `msgs'
469 arguments, then they will default to using the file indicated by
470 .BR mh\-draft (7).
471 This is useful for getting the default behavior
472 supplied by the default
473 .IR whatnowproc .
474 .PP
475 .B $MMH
476 .RS 5
477 With this environment variable, you can specify an alternative
478 mmh directory. Personal mmh configuration files are located relative to
479 the mmh directory.
480 Non-absolute values are relative to the home directory.
481 This is one of the very few exceptions in
482 .B mmh
483 where non-absolute pathnames are not considered relative to the user's
484 mmh directory.
485 .RE
486 .PP
487 .B $MMHP
488 .RS 5
489 With this environment variable, you can specify a profile
490 other than
491 .I $HOME/.mmh/profile
492 to be read by the
493 .B mmh
494 programs
495 that you invoke.  If the value of
496 .B $MMHP
497 is not absolute, it will be presumed to start from the mmh directory.
498 .RE
499 .PP
500 .B $MMHC
501 .RS 5
502 With this environment variable, you can specify a
503 context other than the normal context file (as specified in
504 the profile).  As always, unless the value of
505 .B $MMHC
506 is absolute, it will be presumed to start from your mmh directory.
507 .RE
508 .PP
509 .B $MM_CHARSET
510 .RS 5
511 With this environment variable, you can specify
512 the native character set you are using.  You must be able to display
513 this character set on your terminal.
514 .PP
515 This variable is checked to see if a RFC-2047 header field should be
516 decoded (in
517 .BR inc ,
518 .BR scan ,
519 .BR mhl ).
520 This variable is
521 checked by
522 .B show
523 to see if the
524 .I showproc
525 or
526 .I showmimeproc
527 should
528 be called, since showmimeproc will be called if a text message uses
529 a character set that doesn't match
530 .BR $MM_CHARSET .
531 This variable is
532 checked by
533 .B show
534 for matches against the charset parameter
535 of text contents to decide it the text content can be displayed
536 without modifications to your terminal.  This variable is checked by
537 .B mhbuild
538 to decide what character set to specify in the charset
539 parameter of text contents containing 8\-bit characters.
540 .PP
541 When decoding text in such an alternate character set,
542 .B mmh
543 must be able to determine which characters are alphabetic, which
544 are control characters, etc.  For many operating systems, this
545 will require enabling the support for locales (such as setting
546 the environment variable
547 .B $LC_CTYPE
548 to iso_8859_1).
549 .RE
550 .PP
551 .B $MAILDROP
552 .RS 5
553 This variable tells
554 .B inc
555 the default maildrop. This supersedes the `MailDrop' profile entry.
556 .RE
557 .PP
558 .B $SIGNATURE
559 .RS 5
560 This variable tells
561 .B send
562 and
563 .B post
564 your mail signature. This supersedes the `Signature' profile entry.
565 .RE
566 .PP
567 .B $HOME
568 .RS 5
569 This variable tells all
570 .B mmh
571 programs your home directory
572 .RE
573 .PP
574 .B $SHELL
575 .RS 5
576 This variable tells
577 .B bbl
578 the default shell to run
579 .RE
580 .PP
581 .B $MMHEDITOR
582 .br
583 .B $VISUAL
584 .br
585 .B $EDITOR
586 .RS 5
587 These variables (in descending priority) define the default editor to use.
588 .RE
589 .PP
590 .B $MMHPAGER
591 .br
592 .B $PAGER
593 .RS 5
594 These variables (in descending priority) define the default pager to use.
595 .RE
596 .PP
597 .B $TERM
598 .RS 5
599 This variable tells
600 .B mmh
601 your terminal type.
602 .PP
603 The environment variable
604 .B $TERMCAP
605 is also consulted.  In particular,
606 these tell
607 .B scan
608 and
609 .B mhl
610 how many columns wide your terminal is.  They also tell
611 .B mhl
612 how many
613 lines long your terminal screen is.
614 .RE
615 .PP
616 .B $mhdraft
617 .RS 5
618 This is the path to the working draft.
619 .PP
620 This is set by
621 .BR comp ,
622 .BR dist ,
623 .BR forw ,
624 and
625 .B repl
626 to tell the
627 .I whatnowproc
628 which file to ask `What now?'
629 questions about.
630 .RE
631 .PP
632 .B $mhaltmsg
633 .RS 5
634 .B dist
635 and
636 .B repl
637 set
638 .B $mhaltmsg
639 to tell the
640 .I whatnowproc
641 about an alternate message associated with the
642 draft (the message being distributed or replied to).
643 It is also set during edit sessions so you can peruse the
644 message being distributed or replied to.
645 This variable replaces the older
646 .B $editalt
647 variable.
648 There used to be a link named `@' in the working directory, pointing
649 to the alternate message, there is no such link anymore.
650 .RE
651 .PP
652 .B $mhdist
653 .RS 5
654 .B dist
655 sets
656 .B $mhdist
657 to tell the
658 .I whatnowproc
659 that message re-distribution is occurring.
660 .RE
661 .PP
662 .B $mheditor
663 .RS 5
664 This is set by
665 .BR comp ,
666 .BR repl ,
667 .BR forw ,
668 and
669 .B dist
670 to tell the
671 .I whatnowproc
672 the user's choice of
673 editor (unless overridden by
674 .BR \-noedit ).
675 .RE
676 .PP
677 .B $mhuse
678 .RS 5
679 This may be set by
680 .BR comp .
681 .RE
682 .PP
683 .B $mhmessages
684 .RS 5
685 This is set by
686 .BR dist ,
687 .BR forw ,
688 and
689 .B repl
690 if annotations are to occur.
691 .RE
692 .PP
693 .B $mhannotate
694 .RS 5
695 This is set by
696 .BR dist ,
697 .BR forw ,
698 and
699 .B repl
700 if annotations are to occur.
701 .RE
702 .PP
703 .B $mhfolder
704 .RS 5
705 This is the folder containing the alternate message.
706 .PP
707 This is set by
708 .B dist
709 and
710 .B repl
711 during edit sessions so you
712 can peruse other messages in the current folder besides the one being
713 distributed or replied to.
714 .RE
715
716 .SH FILES
717 .fc ^ ~
718 .nf
719 .ta \w'%etcdir%/ExtraBigFileName  'u
720 ^$HOME/.mmh~^The user's mmh directory
721 ^or $MMH~^Rather than the standard mmh directory
722 .sp
723 ^$HOME/.mmh/profile~^The user's profile
724 ^or $MMHP~^Rather than the standard profile
725 .sp
726 ^$HOME/.mmh/context~^The user's context
727 ^or $MMHC~^Rather than the standard context
728 .sp
729 ^<folder>/.mh_sequences~^Public sequences for <folder>
730 .fi
731
732 .SH "SEE ALSO"
733 nmh(1), environ(5), mh-sequence(7)
734
735 .SH HISTORY
736 The
737 .I $HOME/.mmh/profile
738 contains only static information, which
739 .B mmh
740 programs will
741 .B NOT
742 update.  Changes in context are made to the
743 .I $HOME/.mmh/context
744 file.
745 This includes, but is not limited to: the `Current\-Folder' entry
746 and all private sequence information.  Public sequence information is
747 kept in each folder in the file determined by the `Mh\-Sequences'
748 profile entry (default is
749 .IR \&.mh_sequences ).
750 .PP
751 The profile may override the path of the
752 .I context
753 file, by specifying a `Context' entry.
754 As a result, you can actually have more than one set of
755 private sequences by using different context files.
756
757 .SH BUGS
758 The shell quoting conventions are not available in the profile.
759 Each token is separated by whitespace.
760 .PP
761 There is some question as to what kind of arguments should be placed
762 in the profile as options.  In order to provide a clear answer, recall
763 command line semantics of all
764 .B mmh
765 programs: conflicting switches
766 (e.g.
767 .B \-header
768 and
769 .BR \-noheader )
770 may occur more than one time on the
771 command line, with the last switch taking effect.  Other arguments, such
772 as message sequences, filenames and folders, are always remembered on
773 the invocation line and are not superseded by following arguments of
774 the same type.  Hence, it is safe to place only switches (and their
775 arguments) in the profile.
776 .PP
777 If one finds that an
778 .B mmh
779 program is being invoked again and again
780 with the same arguments, and those arguments aren't switches, then there
781 are a few possible solutions to this problem.  The first is to create a
782 (soft) link in your
783 .I $HOME/bin
784 directory to the
785 .B mmh
786 program
787 of your choice.  By giving this link a different name, you can create
788 a new entry in your profile and use an alternate set of defaults for
789 the
790 .B mmh
791 command.  Similarly, you could create a small shell script
792 which called the
793 .B mmh
794 program of your choice with an alternate set
795 of invocation line switches (using links and an alternate profile entry
796 is preferable to this solution).
797 .PP
798 Finally, the
799 .B csh
800 user could create an alias for the command of the form:
801 .PP
802 .RS 5
803 alias cmd 'cmd arg1 arg2 ...'
804 .RE
805 .PP
806 In this way, the user can avoid lengthy type-in to the shell, and still
807 give
808 .B mmh
809 commands safely.  (Recall that some
810 .B mmh
811 commands
812 invoke others, and that in all cases, the profile is read, meaning that
813 aliases are disregarded beyond an initial command invocation)