1 | .\" |
---|
2 | .\" %nmhwarning% |
---|
3 | .\" $Id: refile.man,v 1.1.1.1 1999-02-07 18:14:22 danw Exp $ |
---|
4 | .\" |
---|
5 | .\" include the -mh macro file |
---|
6 | .so %etcdir%/tmac.h |
---|
7 | .\" |
---|
8 | .TH REFILE %manext1% MH.6.8 [%nmhversion%] |
---|
9 | .SH NAME |
---|
10 | refile \- file message in other folders |
---|
11 | .SH SYNOPSIS |
---|
12 | .in +.5i |
---|
13 | .ti -.5i |
---|
14 | refile |
---|
15 | \%[msgs] |
---|
16 | \%[\-draft] |
---|
17 | \%[\-link] \%[\-nolink] |
---|
18 | .br |
---|
19 | \%[\-preserve] \%[\-nopreserve] |
---|
20 | \%[\-unlink] \%[\-nounlink] |
---|
21 | .br |
---|
22 | \%[\-src\ +folder] |
---|
23 | \%[\-file\ file] |
---|
24 | \%[\-rmmproc program] |
---|
25 | .br |
---|
26 | \%[\-normmproc] |
---|
27 | +folder1 ... |
---|
28 | \%[\-version] |
---|
29 | \%[\-help] |
---|
30 | .in -.5i |
---|
31 | .SH DESCRIPTION |
---|
32 | \fIRefile\fR moves (\fImv\fR\0(1)) or links (\fIln\fR\0(1)) messages |
---|
33 | from a source folder into one or more destination folders. |
---|
34 | |
---|
35 | If you think of a message as a sheet of paper, this operation is not |
---|
36 | unlike filing the sheet of paper (or copies) in file cabinet folders. |
---|
37 | When a message is filed, it is linked into the destination folder(s) |
---|
38 | if possible, and is copied otherwise. As long as the destination |
---|
39 | folders are all on the same file system, multiple filing causes little |
---|
40 | storage overhead. This facility provides a good way to cross\-file or |
---|
41 | multiply\-index messages. For example, if a message is received from |
---|
42 | Jones about the ARPA Map Project, the command |
---|
43 | |
---|
44 | refile\0cur\0+jones\0+Map |
---|
45 | |
---|
46 | would allow the message to be found in either of the two folders `jones' |
---|
47 | or `Map'. |
---|
48 | |
---|
49 | You may specify the source folder using `\-src\ +folder'. If this is |
---|
50 | not given, the current folder is used by default. If no message is |
---|
51 | specified, then `cur' is used by default. |
---|
52 | |
---|
53 | The option `\-file\ file' directs \fIrefile\fR to use the specified file |
---|
54 | as the source message to be filed, rather than a message from a folder. |
---|
55 | Note that the file should be a validly formatted message, just like |
---|
56 | any other \fInmh\fR message. It should \fBNOT\fR be in mail drop format |
---|
57 | (to convert a file in mail drop format to a folder of \fInmh\fR messages, |
---|
58 | see \fIinc\fR\0(1)). |
---|
59 | |
---|
60 | If a destination folder doesn't exist, \fIrefile\fR will ask if you want |
---|
61 | to create it. A negative response will abort the file operation. If the |
---|
62 | standard input for \fIrefile\fR is \fInot\fR a tty, then \fIrefile\fR |
---|
63 | will not ask any questions and will proceed as if the user answered |
---|
64 | \*(lqyes\*(rq to all questions. |
---|
65 | |
---|
66 | The option `\-link' preserves the source folder copy of the message (i.e., |
---|
67 | it does a \fIln\fR(1) rather than a \fImv\fR(1)), whereas, `\-nolink' |
---|
68 | (the default) deletes the filed messages from the source folder. |
---|
69 | |
---|
70 | Normally when a message is refiled, for each destination folder it |
---|
71 | is assigned the number which is one above the current highest message |
---|
72 | number in that folder. Use of the `\-preserve' switch will override |
---|
73 | this message renaming, and try to preserve the number of the message. |
---|
74 | If a conflict for a particular folder occurs when using the `\-preserve' |
---|
75 | switch, then \fIrefile\fR will use the next available message number |
---|
76 | which is above the message number you wish to preserve. |
---|
77 | |
---|
78 | If `\-link' is not specified (or `\-nolink' is specified), the filed |
---|
79 | messages will be removed from the source folder. The default is to |
---|
80 | remove these messages by renaming them with a site-dependent prefix |
---|
81 | (usually a comma). Such files will then need to be removed in some |
---|
82 | manner after a certain amount of time. Many sites arrange for |
---|
83 | \fIcron\fR\0(8) to remove these files once a day, so check with your |
---|
84 | system administrator. |
---|
85 | |
---|
86 | Alternately, if you wish for \fIrefile\fR to really remove the files |
---|
87 | representing these messages from the source folder, you can use the |
---|
88 | `-unlink' switch (not to be confused with the -link switch). But |
---|
89 | messages removed by this method cannot be later recovered. |
---|
90 | |
---|
91 | .ne 4 |
---|
92 | If you prefer a more sophisticated method of `removing' the messages |
---|
93 | from the source folder, you can define the \fIrmmproc\fR profile |
---|
94 | component. For example, you can add a profile component such as |
---|
95 | |
---|
96 | rmmproc: /home/coleman/bin/rmm_msgs |
---|
97 | |
---|
98 | then \fIrefile\fR will instead call the named program or script to |
---|
99 | handle the message files. |
---|
100 | |
---|
101 | The user may specify `\-rmmproc program' on the command line to |
---|
102 | override this profile specification. The `-normmproc' option forces |
---|
103 | the message files to be deleted by renaming or unlinking them as |
---|
104 | described above. |
---|
105 | |
---|
106 | The `\-draft' switch tells \fIrefile\fR to file the <mh\-dir>/draft. |
---|
107 | .Fi |
---|
108 | ^$HOME/\&.mh\(ruprofile~^The user profile |
---|
109 | .Pr |
---|
110 | ^Path:~^To determine the user's nmh directory |
---|
111 | .Ps |
---|
112 | ^Current\-Folder:~^To find the default current folder |
---|
113 | .Ps |
---|
114 | ^Folder\-Protect:~^To set mode when creating a new folder |
---|
115 | .Ps |
---|
116 | ^rmmproc:~^Program to delete the message |
---|
117 | .Sa |
---|
118 | folder(1), rmf(1), rmm(1) |
---|
119 | .De |
---|
120 | `\-src\ +folder' defaults to the current folder |
---|
121 | .Ds |
---|
122 | `msgs' defaults to cur |
---|
123 | .Ds |
---|
124 | `\-nolink' |
---|
125 | .Ds |
---|
126 | `\-nounlink' |
---|
127 | .Ds |
---|
128 | `\-nopreserve' |
---|
129 | .Co |
---|
130 | If `\-src\ +folder' is given, it will become the current folder. |
---|
131 | If neither `\-link' nor `all' is specified, the current message in the |
---|
132 | source folder will be set to the last message specified; otherwise, the |
---|
133 | current message won't be changed. |
---|
134 | |
---|
135 | If the Previous\-Sequence profile entry is set, in addition to defining |
---|
136 | the named sequences from the source folder, \fIrefile\fR will also define |
---|
137 | those sequences for the destination folders. See \fImh\-sequence\fR\0(5) |
---|
138 | for information concerning the previous sequence. |
---|
139 | .Bu |
---|
140 | Since \fIrefile\fR uses your \fIrmmproc\fP to delete the message, |
---|
141 | the \fIrmmproc\fP must \fBNOT\fP call \fIrefile\fP without specifying |
---|
142 | `\-normmproc', or you will create an infinite loop. |
---|
143 | .En |
---|