mbox: include messages added to an mbox before saving it
[neatmail.git] / README
blob700ca3e52d17af896c749176422ff870a842abc9
1 NEATMAIL
2 ========
4 Neatmail is a noninteractive mail client.  It generates a listing of
5 the messages in a mailbox in mbox format and executes a list of
6 ex-like commands on it.
8 Neatmail provides the following commands:
10 * mk: generate a listing of the mails in an mbox.
11 * ex: execute the specified commands on an mbox.
12 * pg: page a message in an mbox.
13 * ns: check for new messages among several mboxes.
15 The ex command reads a list of commands from the standard input and
16 executes them on a given mbox file.  It ignores all input lines except
17 those beginning with a colon or a capital letter.  Lines beginning
18 with a capital letter like "R100 ...", change the value of the status
19 header of the message whose number follows the letter.  It also marks
20 the current message.  Lines beginning with a colon are named commands.
21 The list of named commands are as follows:
23 * rm: remove the current message.
24 * cp: copy the current message to the given mbox.
25 * mv: move the current message to the given mbox.
26 * hd, set: change the value of the given header of the current message.
27 * ft, filt: filter the message through the given command.
28 * w: write the mbox.
29 * g, g!: ex-like global command.
30 * tj: join threads by modifying "Reply-To" headers.
32 These commands act on the current message by default (if applicable),
33 but different messages may be specified using ex-like addresses.  For
34 instance, "2,5rm" removes messages 2 through 5.  Addresses may contain
35 search statements, like "/pattern/rm", in which the pattern is a POSIX
36 extended regular expression (the same applies to global command
37 patterns like "%g/pattern/rm").  Search patterns are matched in the
38 subject field of message headers, except when the pattern is "^field:
39 value", in which it is matched against the specified header field
40 instead.
42 SUGGESTED USAGE
43 ===============
45 Generate a message listing (see mk options):
46 $ neatmail mk -st -r inbox >inbox.nm
48 Open inbox.nm in an editor, change the status field of
49 messages and append ex commands.
51 Page, reply, or forward messages (see pg options):
52 $ neatmail pg -m -h from:subject:to:cc: inbox 23 >mail
54 Execute the commands specified in inbox.nm:
55 $ (cat inbox.nm; echo ":w") | neatmail ex inbox