]> diplodocus.org Git - nmh/blob - man/rmm.man
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / man / rmm.man
1 .TH RMM %manext1% 2013-03-19 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 rmm \- remove nmh messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B rmm
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RI [ +folder ]
14 .RI [ msgs ]
15 .RB [ \-unlink " | " \-nounlink ]
16 .RB [ \-rmmproc
17 .IR program ]
18 .RB [ \-normmproc ]
19 .ad
20 .SH DESCRIPTION
21 By default,
22 .B rmm
23 will remove the specified messages by renaming each of the message files
24 with a site-dependent prefix (usually a comma).
25 Such files will then need to be removed in some manner after a period of
26 time.
27 Many sites arrange for
28 .B cron
29 to remove these files once a day, so check with your system administrator.
30 .PP
31 Alternately, if you wish for
32 .B rmm
33 to really remove the files representing these messages, you can use the
34 .B \-unlink
35 switch.
36 But messages removed by this method cannot be later recovered.
37 .PP
38 If you prefer a more sophisticated method of `removing' messages, you
39 can define the
40 .I rmmproc
41 profile component.
42 For example, you can add a profile component such as
43 .PP
44 .RS 5
45 rmmproc: /home/foouser/bin/rmm_msgs
46 .RE
47 .PP
48 Then instead of simply renaming the message file,
49 .B rmm
50 will call the named program or script to handle the files that
51 represent the messages to be deleted.
52 The
53 .B \-rmmproc
54 switch may be used to override this profile component. The
55 .B \-normmproc
56 switch disables the use of any
57 .I rmmproc
58 profile component and negates all prior
59 .B \-rmmproc
60 switches.
61 .PP
62 An example of a
63 .I rmmproc
64 script that saves a message based in its Message-ID is provided in
65 %nmhetcdir%/rmmproc.messageid. To enable it, simply add an
66 .I rmmproc
67 component that names it, to your profile.
68 .PP
69 Some users of
70 .B csh
71 prefer the following:
72 .PP
73 .RS 5
74 alias rmm 'refile +d'
75 .RE
76 .PP
77 where folder `+d' is a folder for deleted messages, and
78 .PP
79 .RS 5
80 alias mexp 'rm `mhpath +d all`'
81 .RE
82 .PP
83 is used to \*(lqexpunge\*(rq deleted messages.
84 .PP
85 The current message is not changed by
86 .BR rmm ,
87 so a
88 .B next
89 will advance to the next message in the folder as expected.
90 .SH FILES
91 .fc ^ ~
92 .nf
93 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
94 ^$HOME/.mh_profile~^The user profile
95 .fi
96 .SH "PROFILE COMPONENTS"
97 .fc ^ ~
98 .nf
99 .ta 2.4i
100 .ta \w'ExtraBigProfileName 'u
101 ^Path:~^To determine the user's nmh directory
102 ^Current\-Folder:~^To find the default current folder
103 ^rmmproc:~^Program to delete the message
104 .fi
105 .SH "SEE ALSO"
106 .IR rmf (1)
107 .SH DEFAULTS
108 .nf
109 .RB ` +folder "' defaults to the current folder"
110 .RB ` msgs "' defaults to cur"
111 .RB ` -nounlink '
112 .fi
113 .SH CONTEXT
114 If a folder is given, it will become the current folder.
115 .SH BUGS
116 Since
117 .B rmm
118 and
119 .B refile
120 use your
121 .I rmmproc
122 to delete the message, the
123 .I rmmproc
124 must
125 .I not
126 call
127 .B rmm
128 or
129 .B refile
130 without specifying
131 .BR \-normmproc ,
132 or you will create an infinite loop.