sieve-manage-capability: Do not bug out when the server-value of the capability is nil
[gnus] / texi / message.texi
1 \input texinfo                  @c -*-texinfo-*-
2
3 @setfilename message
4 @settitle Message Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @copying
9 This file documents Message, the Emacs message composition mode.
10
11 Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
12 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
13
14 @quotation
15 Permission is granted to copy, distribute and/or modify this document
16 under the terms of the GNU Free Documentation License, Version 1.3 or
17 any later version published by the Free Software Foundation; with no
18 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
19 and with the Back-Cover Texts as in (a) below.  A copy of the license
20 is included in the section entitled ``GNU Free Documentation License''.
21
22 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
23 modify this GNU manual.  Buying copies from the FSF supports it in
24 developing GNU and promoting software freedom.''
25 @end quotation
26 @end copying
27
28 @dircategory Emacs
29 @direntry
30 * Message: (message).           Mail and news composition mode that
31                                   goes with Gnus.
32 @end direntry
33 @iftex
34 @finalout
35 @end iftex
36
37 @titlepage
38 @title Message Manual
39
40 @author by Lars Magne Ingebrigtsen
41 @page
42
43 @vskip 0pt plus 1filll
44 @insertcopying
45 @end titlepage
46
47 @summarycontents
48 @contents
49
50 @node Top
51 @top Message
52
53 @ifnottex
54 @insertcopying
55 @end ifnottex
56
57 All message composition from Gnus (both mail and news) takes place in
58 Message mode buffers.
59
60 @menu
61 * Interface::         Setting up message buffers.
62 * Commands::          Commands you can execute in message mode buffers.
63 * Variables::         Customizing the message buffers.
64 * Compatibility::     Making Message backwards compatible.
65 * Appendices::        More technical things.
66 * GNU Free Documentation License:: The license for this documentation.
67 * Index::             Variable, function and concept index.
68 * Key Index::         List of Message mode keys.
69 @end menu
70
71 @c Adjust ../Makefile.in if you change the following lines:
72 Message is distributed with Gnus.  The Gnus distribution
73 @c
74 corresponding to this manual is No Gnus v0.11.
75
76
77 @node Interface
78 @chapter Interface
79
80 When a program (or a person) wants to respond to a message---reply,
81 follow up, forward, cancel---the program (or person) should just put
82 point in the buffer where the message is and call the required command.
83 @code{Message} will then pop up a new @code{message} mode buffer with
84 appropriate headers filled out, and the user can edit the message before
85 sending it.
86
87 @menu
88 * New Mail Message::     Editing a brand new mail message.
89 * New News Message::     Editing a brand new news message.
90 * Reply::                Replying via mail.
91 * Wide Reply::           Responding to all people via mail.
92 * Followup::             Following up via news.
93 * Canceling News::       Canceling a news article.
94 * Superseding::          Superseding a message.
95 * Forwarding::           Forwarding a message via news or mail.
96 * Resending::            Resending a mail message.
97 * Bouncing::             Bouncing a mail message.
98 * Mailing Lists::        Send mail to mailing lists.
99 @end menu
100
101 You can customize the Message Mode tool bar, see @kbd{M-x
102 customize-apropos RET message-tool-bar}.  This feature is only available
103 in Emacs.
104
105 @node New Mail Message
106 @section New Mail Message
107
108 @findex message-mail
109 The @code{message-mail} command pops up a new message buffer.
110
111 Two optional parameters are accepted: The first will be used as the
112 @code{To} header and the second as the @code{Subject} header.  If these
113 are @code{nil}, those two headers will be empty.
114
115
116 @node New News Message
117 @section New News Message
118
119 @findex message-news
120 The @code{message-news} command pops up a new message buffer.
121
122 This function accepts two optional parameters.  The first will be used
123 as the @code{Newsgroups} header and the second as the @code{Subject}
124 header.  If these are @code{nil}, those two headers will be empty.
125
126
127 @node Reply
128 @section Reply
129
130 @findex message-reply
131 The @code{message-reply} function pops up a message buffer that's a
132 reply to the message in the current buffer.
133
134 @vindex message-reply-to-function
135 Message uses the normal methods to determine where replies are to go
136 (@pxref{Responses}), but you can change the behavior to suit your needs
137 by fiddling with the @code{message-reply-to-function} variable.
138
139 If you want the replies to go to the @code{Sender} instead of the
140 @code{From}, you could do something like this:
141
142 @lisp
143 (setq message-reply-to-function
144       (lambda ()
145        (cond ((equal (mail-fetch-field "from") "somebody")
146                (list (cons 'To (mail-fetch-field "sender"))))
147              (t
148               nil))))
149 @end lisp
150
151 This function will be called narrowed to the head of the article that is
152 being replied to.
153
154 As you can see, this function should return a list.  In this case, it
155 returns @code{((To . "Whom"))} if it has an opinion as to what the To
156 header should be.  If it does not, it should just return @code{nil}, and
157 the normal methods for determining the To header will be used.
158
159 Each list element should be a cons, where the @sc{car} should be the
160 name of a header (e.g. @code{Cc}) and the @sc{cdr} should be the header
161 value (e.g. @samp{larsi@@ifi.uio.no}).  All these headers will be
162 inserted into the head of the outgoing mail.
163
164
165 @node Wide Reply
166 @section Wide Reply
167
168 @findex message-wide-reply
169 The @code{message-wide-reply} pops up a message buffer that's a wide
170 reply to the message in the current buffer.  A @dfn{wide reply} is a
171 reply that goes out to all people listed in the @code{To}, @code{From}
172 (or @code{Reply-to}) and @code{Cc} headers.
173
174 @vindex message-wide-reply-to-function
175 Message uses the normal methods to determine where wide replies are to go,
176 but you can change the behavior to suit your needs by fiddling with the
177 @code{message-wide-reply-to-function}.  It is used in the same way as
178 @code{message-reply-to-function} (@pxref{Reply}).
179
180 @vindex message-dont-reply-to-names
181 Addresses that match the @code{message-dont-reply-to-names} regular
182 expression (or list of regular expressions) will be removed from the
183 @code{Cc} header. A value of @code{nil} means exclude your name only.
184
185 @vindex message-prune-recipient-rules
186 @code{message-prune-recipient-rules} is used to prune the addresses
187 used when doing a wide reply.  It's meant to be used to remove
188 duplicate addresses and the like.  It's a list of lists, where the
189 first element is a regexp to match the address to trigger the rule,
190 and the second is a regexp that will be expanded based on the first,
191 to match addresses to be pruned.
192
193 It's complicated to explain, but it's easy to use.
194
195 For instance, if you get an email from @samp{foo@@example.org}, but
196 @samp{foo@@zot.example.org} is also in the @code{Cc} list, then your
197 wide reply will go out to both these addresses, since they are unique.
198
199 To avoid this, do something like the following:
200
201 @lisp
202 (setq message-prune-recipient-rules
203       '(("^\\([^@@]+\\)@@\\(.*\\)" "\\1@@.*[.]\\2")))
204 @end lisp
205
206 If, for instance, you want all wide replies that involve messages from
207 @samp{cvs@@example.org} to go to that address, and nowhere else (i.e.,
208 remove all other recipients if @samp{cvs@@example.org} is in the
209 recipient list:
210
211 @lisp
212 (setq message-prune-recipient-rules
213       '(("cvs@@example.org" ".")))
214 @end lisp
215
216 @vindex message-wide-reply-confirm-recipients
217 If @code{message-wide-reply-confirm-recipients} is non-@code{nil} you
218 will be asked to confirm that you want to reply to multiple
219 recipients.  The default is @code{nil}.
220
221 @node Followup
222 @section Followup
223
224 @findex message-followup
225 The @code{message-followup} command pops up a message buffer that's a
226 followup to the message in the current buffer.
227
228 @vindex message-followup-to-function
229 Message uses the normal methods to determine where followups are to go,
230 but you can change the behavior to suit your needs by fiddling with the
231 @code{message-followup-to-function}.  It is used in the same way as
232 @code{message-reply-to-function} (@pxref{Reply}).
233
234 @vindex message-use-followup-to
235 The @code{message-use-followup-to} variable says what to do about
236 @code{Followup-To} headers.  If it is @code{use}, always use the value.
237 If it is @code{ask} (which is the default), ask whether to use the
238 value.  If it is @code{t}, use the value unless it is @samp{poster}.  If
239 it is @code{nil}, don't use the value.
240
241
242 @node Canceling News
243 @section Canceling News
244
245 @findex message-cancel-news
246 The @code{message-cancel-news} command cancels the article in the
247 current buffer.
248
249 @vindex message-cancel-message
250 The value of @code{message-cancel-message} is inserted in the body of
251 the cancel message.  The default is @samp{I am canceling my own
252 article.}.
253
254 @cindex Cancel Locks
255 @vindex message-insert-canlock
256 @cindex canlock
257 When Message posts news messages, it inserts @code{Cancel-Lock}
258 headers by default.  This is a cryptographic header that ensures that
259 only you can cancel your own messages, which is nice.  The downside
260 is that if you lose your @file{.emacs} file (which is where Gnus
261 stores the secret cancel lock password (which is generated
262 automatically the first time you use this feature)), you won't be
263 able to cancel your message.  If you want to manage a password yourself,
264 you can put something like the following in your @file{~/.gnus.el} file:
265
266 @lisp
267 (setq canlock-password "geheimnis"
268       canlock-password-for-verify canlock-password)
269 @end lisp
270
271 Whether to insert the header or not is controlled by the
272 @code{message-insert-canlock} variable.
273
274 Not many news servers respect the @code{Cancel-Lock} header yet, but
275 this is expected to change in the future.
276
277
278 @node Superseding
279 @section Superseding
280
281 @findex message-supersede
282 The @code{message-supersede} command pops up a message buffer that will
283 supersede the message in the current buffer.
284
285 @vindex message-ignored-supersedes-headers
286 Headers matching the @code{message-ignored-supersedes-headers} are
287 removed before popping up the new message buffer.  The default is@*
288 @samp{^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|@*
289 ^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|@*
290 Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|@*
291 ^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|@*
292 ^X-Payment:\\|^Approved:}.
293
294
295
296 @node Forwarding
297 @section Forwarding
298
299 @findex message-forward
300 The @code{message-forward} command pops up a message buffer to forward
301 the message in the current buffer.  If given a prefix, forward using
302 news.
303
304 @table @code
305 @item message-forward-ignored-headers
306 @vindex message-forward-ignored-headers
307 All headers that match this regexp will be deleted when forwarding a message.
308
309 @item message-make-forward-subject-function
310 @vindex message-make-forward-subject-function
311 A list of functions that are called to generate a subject header for
312 forwarded messages.  The subject generated by the previous function is
313 passed into each successive function.
314
315 The provided functions are:
316
317 @table @code
318 @item message-forward-subject-author-subject
319 @findex message-forward-subject-author-subject
320 Source of article (author or newsgroup), in brackets followed by the
321 subject.
322
323 @item message-forward-subject-fwd
324 Subject of article with @samp{Fwd:} prepended to it.
325 @end table
326
327 @item message-wash-forwarded-subjects
328 @vindex message-wash-forwarded-subjects
329 If this variable is @code{t}, the subjects of forwarded messages have
330 the evidence of previous forwards (such as @samp{Fwd:}, @samp{Re:},
331 @samp{(fwd)}) removed before the new subject is
332 constructed.  The default value is @code{nil}.
333
334 @item message-forward-as-mime
335 @vindex message-forward-as-mime
336 If this variable is @code{t} (the default), forwarded messages are
337 included as inline @acronym{MIME} RFC822 parts.  If it's @code{nil}, forwarded
338 messages will just be copied inline to the new message, like previous,
339 non @acronym{MIME}-savvy versions of Gnus would do.
340
341 @item message-forward-before-signature
342 @vindex message-forward-before-signature
343 If non-@code{nil}, put forwarded message before signature, else after.
344
345 @end table
346
347
348 @node Resending
349 @section Resending