send: read reply-to header
[mailx.git] / README
blob0fdf2424bb79fe9e784e54d57732abe1033b6fba
1 MAILX
2 =====
4 Mailx is a small mail client optimized to handle large mbox files.
5 It should not be confused with the original mailx program; to prevent
6 that you can call this program neatmailx (just like my other neat*
7 programs).  After trying many different programs, I wrote mailx
8 together with my pop3 and smtp clients, all of which are available at
9 http://litcave.berlios.de/, and now I'm quite satisfied.
11 Mailx may not be suitable for everyone.  But it does address most of
12 my needs:
14 * can handle large mboxes fast (at the cost of memory)
15 * uses external pagers (see mailpg at my litcave page) and editors
16 * can monitor mailboxes for new mails based on file timestamps
17 * gives the power to edit any header field of mails before sending
18 * is simple and easy to change
20 But it lacks many features like customizable sorting, regular
21 expression searches, and handling mime attachments (it can decode mime
22 messages, though).  It also assumes mboxes are not edited concurrently
23 unless for appending messages.
25 SETTING UP
26 ==========
28 mailx is configured solely by editing config.h.
30 * PAGER: used in page command for showing messages
31 * EDITOR: editor (~e command when sending mails)
32 * VISUAL: visual editor (~v command when sending mails)
33 * SENDMAIL: the command used for sending mails
34 * FOLDER: folder containing mboxes
35 * RECORD: the mbox to append sent mails
36 * FROM: the address to be used for sending mails
37 * DRAFT: address of mail draft
38 * HOSTNAME: hostname used for creating message ID header field
39 * hdr_filt[]: list of headers to include before piping to PAGER
40 * boxes[]: the list of incoming mboxes
42 * NHEAD: the number of messages to show in head command
43 * WIDTH: screen width
44 * DIGITS: the number of digits in head command
45 * THREADED: show messages in thread
46 * TRIM_RE: strip "Re:" for replied messages in head command
47 * COLORS: if nonzero, use colors in head command
48 * MAXMIME: the maximum number of decoded mime messages in memory
50 STARTING
51 ========
53 Mailx has two modes.  In mbox browsing mode, mails in an mbox can be
54 read or replied to.  To start in this mode, you can give mailbox name
55 after -f argument (see mailboxes section for specifying mbox names):
57   mailx -f +inbox
59 In sending mode, new mails can be composed and sent; mailx exits as soon
60 as the mail is sent or discarded (see writing mails section):
62   mailx address
64 Note that using 'mail' command, mails can be composed even in mbox
65 browsing mode.
67 COMMANDS
68 ========
70 Most mailx commands follow this pattern:
72   [messages]cmd [arguments]
74 Arguments are command specific.  Messages specify which messages the
75 command should be applied on:
77 * '3': third message
78 * '$': the last message
79 * '.': current message
80 * ',': the next new message
81 * '-': the previous message
82 * '+': the next message
83 * '-3': the third previous message
84 * '/(subject Hello)': all messages which have "Hello" in their subject
85 * '/(hdr word)': all messages which have "word" in their "hdr" header
86 * '/n(hdr word)': like "/(hdr word)" but include only new messages
87   (same could be used 'u' or ' ')
88 * '?(subject Hello)': search in the reverse direction
89 * 'X,Y': all messages between X and Y (X and Y can be any single message
90   specification
91 * '%': all messages in current mbox
93 By default, all messages work on the current message which is marked with
94 '>' in the head command output.
96 Mailx commands:
97 * [msg]p/page: pipe current message to PAGER
98 * [msg]n/next/[ret]: pipe next message to PAGER
99 * [msg]h/ls/head/header: show message list; set the first specified
100   message as current (marked with '>' in the first column)
101 * cd/file [mbox]:
102   If invoked with no arguments, show current mbox statistics, otherwise
103   switch current mbox (see mbox names sections).
104 * inc:
105   Check for new messages in current mbox and load them if available.
106 * [page]z:
107   Show the next page of mail listing.  A prefix could specify which page
108   to show.
109   * 2z: show the second page
110   * -z: show previous page
111   * +2z: show the 2nd next page
112 * m/mail [address]:
113   Start a new mail; see writing mail section.
114 * [msgs]cp/copy [mbox]:
115   Copy the specified messages to the given mbox.
116 * [msgs]mv/move [mbox]:
117   Move the specified messages to the given mbox.
118 * [msg]r/reply:
119   Reply the specified message.
120 * [msg]cat:
121   Like page, pipes a message to PAGER except that all headers are present.
122 * [msgs]rm/d/delete:
123   Remove specified messages.
124 * [msgs]u/undel/undelete:
125   Clear specified messages if marked for deletion.
126 * q/quit:
127   Save current mbox and exit.
128 * x/exit/xit:
129   Exit mailx without saving current mbox.
130 * new/news:
131   Show the list of mboxes that have new mails.
132 * [msgs]mime:
133   Decode mime messages.
135 MAILBOXES
136 =========
138 Commands like cp, mv and cd take an mbox as argument.  The valid
139 values are:
141 * ',': The first mbox in "boxes" list that has new mails (see "news" command).
142 * '.': Current mbox.
143 * 'path/mbox': mbox with the given path.
144 * '+mbox': FOLDER/mbox
146 WRITING MAILS
147 =============
149 When mailx is invoked as "mailx address" or after mail or reply commands
150 mailx enters send mode.  In this mode the mail is written to and edited
151 in DRAFT file (that means no concurrent mail composition is allowed,
152 but that could be overcome easily if one needs to do so).  Commands are
153 specified after a tilde:
155 * ~e: edit the message in EDITOR
156 * ~v: edit the message in VISUAL
157 * ~x/~q: discard current message
158 * ~.: send current message (pipe into SENDMAIL) and append it to RECORD
159 * ~p: pipe current message into PAGER