5 .\" include the -mh macro file
8 .TH REFILE %manext1% MH.6.8 [%nmhversion%]
10 refile \- file message in other folders
17 \%[\-link] \%[\-nolink]
19 \%[\-preserve] \%[\-nopreserve]
20 \%[\-unlink] \%[\-nounlink]
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.
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
44 refile\0cur\0+jones\0+Map
46 would allow the message to be found in either of the two folders `jones'
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.
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,
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.
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.
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.
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
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.
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
96 rmmproc: /home/coleman/bin/rmm_msgs
98 then \fIrefile\fR will instead call the named program or script to
99 handle the message files.
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
106 The `\-draft' switch tells \fIrefile\fR to file the <mh\-dir>/draft.
108 ^$HOME/\&.mh\(ruprofile~^The user profile
110 ^Path:~^To determine the user's nmh directory
112 ^Current\-Folder:~^To find the default current folder
114 ^Folder\-Protect:~^To set mode when creating a new folder
116 ^rmmproc:~^Program to delete the message
118 folder(1), rmf(1), rmm(1)
120 `\-src\ +folder' defaults to the current folder
122 `msgs' defaults to cur
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.
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.
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.