1 |
README for GNU Mailutils implementation of MH |
2 |
|
3 |
The primary aim of this implementation is to provide an interface |
4 |
between Mailutils and Emacs using mh-e module. |
5 |
|
6 |
To use Mailutils MH with Emacs, add the following line to your |
7 |
site-start.el or .emacs file: |
8 |
|
9 |
(load "mailutils-mh") |
10 |
|
11 |
Refer to the file TODO in this directory for information about the |
12 |
current state of Mailutils MH implementation. |
13 |
|
14 |
|
15 |
The list of differences between Mailutils and the RAND implementation of MH: |
16 |
|
17 |
* All programs use usual GNU long options. The support for MH single-dash |
18 |
options is provided for backward compatibility. |
19 |
|
20 |
* UUCP addresses are not supported |
21 |
|
22 |
* Format specifications |
23 |
|
24 |
** New functions |
25 |
|
26 |
*** decode |
27 |
Argument: string |
28 |
Return: string |
29 |
|
30 |
Decodes the input string as per RFC 2047. Useful in printing From:, |
31 |
To: and Subject: headers. |
32 |
|
33 |
Notice that, unlike the similar NMH function, decode checks the value |
34 |
of the global profile variable "Charset" to determine the charset |
35 |
to output the result in. If this variable is not set, decode returns |
36 |
its argument without any change. If this variable is set to "auto", |
37 |
decode tries to determine the charset name from the setting of |
38 |
LC_ALL environment variable. Otherwise, the value of "Charset" is |
39 |
taken to be the name of the character set. |
40 |
|
41 |
*** package |
42 |
Argument: none |
43 |
Return: string |
44 |
|
45 |
Returns package name (string "mailutils"). |
46 |
|
47 |
*** package_string |
48 |
Argument: none |
49 |
Return: string |
50 |
|
51 |
Returns full package string (e.g. "GNU Mailutils 2.1") |
52 |
|
53 |
*** version |
54 |
Argument: none |
55 |
Return: string |
56 |
|
57 |
Returns mailutils version. |
58 |
|
59 |
*** unre |
60 |
Argument: string |
61 |
Return: string |
62 |
|
63 |
The function removes any leading whitespace and eventual "Re:" prefix |
64 |
from its argument. Useful for creating subjects in reply messages: |
65 |
|
66 |
%<{subject}Subject: Re: %(unre{subject})\\n%> |
67 |
|
68 |
*** reply_regex |
69 |
Argument: string |
70 |
Return: none |
71 |
|
72 |
Sets the regular expression used to recognize reply messages. The |
73 |
argument should be a POSIX extended regular expression. The matching |
74 |
is case insensitive. |
75 |
|
76 |
For example, the following invocation |
77 |
|
78 |
%(reply_regex ^\(re|aw|ang|odp\)\(\\[[0-9]+\\]\)?:[[:blank:]]) |
79 |
|
80 |
corresponds to the English "Re", Polish "Odp", Norwegian "Aw" or |
81 |
German "Ang", optionally followed by a number in brackets, followed |
82 |
by colon and any amount of whitespace. Notice the quoting of the |
83 |
regex metacharacters. |
84 |
|
85 |
See also `Reply-Regex' and `isreply' below. |
86 |
|
87 |
*** isreply |
88 |
Argument: [OPTIONAL] string |
89 |
Return: boolean |
90 |
|
91 |
If argument is not given, the value of Subject: header is taken. |
92 |
|
93 |
The function returns true if its argument matches the "reply subject" |
94 |
regular expression. This expression is set via the global profile variable |
95 |
Reply-Regex or via the format function %(reply_regex). |
96 |
|
97 |
This function is useful for creating Subject: headers in reply |
98 |
messages. For example, consider the following construction: |
99 |
|
100 |
%<{subject}%(lit)%<(isreply)%?\ |
101 |
(profile reply-prefix)%(concat)%|%(concat Re:)%>\ |
102 |
%(concat{subject})%(printhdr Subject: )\n%> |
103 |
|
104 |
If the Subject: header already contained reply prefix, this construct |
105 |
leaves it unchanged. Otherwise it prepends to it the value of |
106 |
Reply-Prefix profile variable, or, if it is unset, the string "Re:". |
107 |
|
108 |
This expression is used in default replcomps and replgroupcomps files. |
109 |
|
110 |
*** rcpt |
111 |
Argument: string, one of "to", "cc", "me", "all" |
112 |
Return: boolean |
113 |
|
114 |
This function returns true if the given element is present in the |
115 |
recipient mask (as modified by any --cc and --nocc options) and |
116 |
false otherwise. It is used in default formats for repl and comp, e.g.: |
117 |
|
118 |
%(lit)%<(rcpt to)%(formataddr{to})%> |
119 |
|
120 |
Notice that this means that usual replcomps file will be ignoring |
121 |
--cc and --nocc options, unless it has been modified as shown above. |
122 |
|
123 |
*** concat |
124 |
Argument: string |
125 |
Return: none |
126 |
|
127 |
Appends whitespace + arg to string register. |
128 |
|
129 |
*** printhdr |
130 |
Argument: string |
131 |
Return: none |
132 |
|
133 |
Prints the value of string register, prefixed by the given |
134 |
argument. The output is formatted as RFC 822 header, i.e. |
135 |
it is split at whitespace characters nearest to the width boundary |
136 |
and each subsequent segment is prefixed with horizontal tabulation. |
137 |
|
138 |
*** in_reply_to |
139 |
Argument: none |
140 |
Return: string |
141 |
|
142 |
Generates the value for the In-reply-to: header according to RFC 2822. |
143 |
|
144 |
*** references |
145 |
Argument: none |
146 |
Return: string |
147 |
|
148 |
Generates the value for the References: header according to RFC 2822. |
149 |
|
150 |
* New profile variables: |
151 |
|
152 |
** Charset |
153 |
|
154 |
Controls the character set in which the components decoded via |
155 |
the `decode' format function should be output (see `decode' above). |
156 |
By default this variable is not set, which means that no decoding |
157 |
takes place. If it is set to "auto", `decode' tries to determine |
158 |
the charset name from the setting of LC_ALL environment variable. |
159 |
Otherwise, the value of "Charset" is taken to be the name of the |
160 |
character set. |
161 |
|
162 |
** Reply-Regex |
163 |
|
164 |
Sets the regular expression used to recognize reply messages. The |
165 |
argument should be a POSIX extended regular expression. The matching |
166 |
is case insensitive. |
167 |
|
168 |
For example, setting in your .mh_profile: |
169 |
|
170 |
Reply-Regex: ^(re|aw|ang|odp)(\[[0-9]+\])?:[[:blank:]] |
171 |
|
172 |
will make the default replcomps and replgroupcomps formats recognize |
173 |
usual English, Norwiegian, German and Polish reply subject prefixes. |
174 |
|
175 |
See also format functions `reply_regex' and `isreply'. |
176 |
|
177 |
* burst |
178 |
|
179 |
The utility is able to burst both RFC 934 digest messages and MIME |
180 |
multipart messages. It provides two additional command line options: |
181 |
--recurse and --length. |
182 |
|
183 |
The --recurse option instructs the utility to recursively expand the |
184 |
digest. |
185 |
|
186 |
The --length option can be used to set the minimal encapsulation |
187 |
boundary length for RFC 934 digests. Default length is 1, |
188 |
i.e. encountering one dash immediately following a newline triggers |
189 |
digest decoding. It is OK for messages that follow RFC 934 |
190 |
specification. However, many user agents do not precisely follow it, |
191 |
in particular, they often do not escape lines starting with a dash by |
192 |
"- " sequence. Mailman is one of such agents. To cope with such |
193 |
digests you can set encapsulation boundary length to a higher |
194 |
value. For example, `bounce --length=8' has been found to be |
195 |
sufficient for most Mailman-generated digests. |
196 |
|
197 |
* comp |
198 |
|
199 |
Understands --build option. |
200 |
|
201 |
* fmtdump command is not provided. Use fmtcheck instead. |
202 |
|
203 |
* mhl |
204 |
|
205 |
If the argument to 'ignores' contains more than one component name |
206 |
it must be enclosed in double-quotes. Dangling equal sign is an error, |
207 |
to set a string variable to the empty value use = "", e.g.: |
208 |
overflowtext="" (see the supplied mhl.format file). |
209 |
|
210 |
Ineractive prompting is not yet implemented. |
211 |
|
212 |
* mhn |
213 |
|
214 |
** New option --compose forces mhn editing mode. This is also the default |
215 |
mode. This differs from the standard mhn, which switches to the |
216 |
editing mode only if no other options were given and the input file |
217 |
name coincides with the value of "mhdraft" environment variable. |
218 |
|
219 |
** Show mode (--show) |
220 |
*** If an appropriate mhn-show-type[/subtype] was not found, GNU mhn |
221 |
prints the decoded message content using moreproc. Standard mhn in |
222 |
this case used to print "don't know how to display content" diagnostic. |
223 |
|
224 |
*** The default behaviour is to pipe the content to the standard input |
225 |
of the mhn-show-type[/subtype] command. This is altered to using a |
226 |
temporary file if the command contains %f or %F escapes. |
227 |
|
228 |
** Store mode (--store) |
229 |
*** If the Content-Disposition header contains "filename=", and mhn |
230 |
is invoked with --auto switch, it transforms the filename into |
231 |
the absolute notation and uses it only if it lies below the |
232 |
current mhn-storage directory. Standard mhn only requires that the |
233 |
filename do not begin with '/' |
234 |
|
235 |
*** Before saving a message part, GNU mhn checks if the file already |
236 |
exists. If so it asks whether the user wishes to rewrite it. This |
237 |
behaviour is disabled when --quiet option was given. |
238 |
|
239 |
* mhparam |
240 |
|
241 |
The -all mode does not display commented out entries. |
242 |
|
243 |
* repl |
244 |
|
245 |
Understands --use option. Disposition shell provides 'use' command. |
246 |
|
247 |
* rmm |
248 |
|
249 |
** Different behaviour if one of the messages in the list does not exist. |
250 |
|
251 |
Mailutils rmm does not delete any messages. Standard rmm in this case |
252 |
deletes all messages preceeding the non-existent one. |
253 |
|
254 |
** The rmmproc: profile component is not used. |
255 |
|
256 |
* pick |
257 |
|
258 |
** The non-standard command line syntax `--FIELD STRING' where `FIELD' is |
259 |
any string is deprecated. It is recognized only if pick is called from |
260 |
within another program, so that existing application continue to work. |
261 |
Please use the following syntax instead: `--component FIELD --pattern STRING' |
262 |
|
263 |
** New command line option --cflags allows to control the type of |
264 |
regular expressions used. The option must occur right before --pattern |
265 |
or --component option (or one of its aliases, like --cc, --from, etc.) |
266 |
The argument to this option is a string of type specifications: |
267 |
|
268 |
B Use basic regular expressions |
269 |
E Use extended regular expressions |
270 |
I Ignore case |
271 |
C Case sensitive. |
272 |
|
273 |
Default is "EI". |
274 |
|
275 |
The flags remain in effect until the next occurrence of --cflags |
276 |
option. |
277 |
|
278 |
Sample usage: |
279 |
|
280 |
pick --cflag BC --subject '*a string' |
281 |
|
282 |
** The date comparison options (--before and --after) accept date |
283 |
specifications in a wide variety of formats, e.g.: |
284 |
|
285 |
pick --after 20030301 |
286 |
pick --after 2003-03-01 |
287 |
pick --after 01-mar-2003 |
288 |
pick --after 2003-mar-01 |
289 |
pick --before '1 year ago' |
290 |
etc... |
291 |
|
292 |
* refile |
293 |
|
294 |
** Linking messages between folders goes against the logic of Mailutils, |
295 |
so refile never makes links even if called with --link option. The |
296 |
latter is actually a synonym for --copy, which preserves the original |
297 |
message. |
298 |
|
299 |
** --preserve option is not implemented. It is retained for backward |
300 |
compatibility only. |
301 |
|
302 |
** Message specs and folder names may be interspersed. |
303 |
|
304 |
* sortm |
305 |
|
306 |
** New option --numfield specifies numeric comparison for the given field. |
307 |
|
308 |
** Any number of --datefield, --textfield and --numfield options may be |
309 |
given, thus allowing to build sort criteria of arbitrary complexity. |
310 |
|
311 |
** The order of --.*field arguments sets the ordering priority. This |
312 |
differs from the behaviour of the standard sortm, which always orders |
313 |
datefield-major, textfield-minor. |
314 |
|
315 |
** Apart from sorting the mailfolder the following actions may be |
316 |
specified: |
317 |
--list list the ordered messages using a format string given |
318 |
by --form or --format option. |
319 |
--dry-run do not actually sort messages, rather print what would |
320 |
have been done. This is useful for debugging purposes. |
321 |
|
322 |
|
323 |
Local variables: |
324 |
mode: outline |
325 |
paragraph-separate: "[ ]*$" |
326 |
end: |