Go backward to Mail and Post.
Go up to Composing Messages.
Archived Messages
=================
Gnus provides a few different methods for storing the mail you send.
The default method is to use the "archive virtual server" to store the
mail. If you want to disable this completely, you should set
`gnus-message-archive-group' to `nil'.
`gnus-message-archive-method' says what virtual server Gnus is to
use to store sent messages. It is `(nnfolder "archive"
(nnfolder-directory "~/Mail/archive/"))' by default, but you can use any
mail select method (`nnml', `nnmbox', etc.). However, `nnfolder' is a
quite likeable select method for doing this sort of thing. If you
don't like the default directory chosen, you could say something like:
(setq gnus-message-archive-method
'(nnfolder "archive"
(nnfolder-inhibit-expiry t)
(nnfolder-active-file "~/News/sent-mail/active")
(nnfolder-directory "~/News/sent-mail/")))
Gnus will insert `Gcc' headers in all outgoing messages that point
to one or more group(s) on that server. Which group to use is
determined by the `gnus-message-archive-group' variable.
This variable can be:
* a string Messages will be saved in that group.
* a list of strings Messages will be saved in all those groups.
* an alist of regexps, functions and forms When a key "matches", the
result is used.
Let's illustrate:
Just saving to a single group called `MisK':
(setq gnus-message-archive-group "MisK")
Saving to two groups, `MisK' and `safe':
(setq gnus-message-archive-group '("MisK" "safe"))
Save to different groups based on what group you are in:
(setq gnus-message-archive-group
'(("^alt" "sent-to-alt")
("mail" "sent-to-mail")
(".*" "sent-to-misc")))
More complex stuff:
(setq gnus-message-archive-group
'((if (message-news-p)
"misc-news"
"misc-mail")))
This is the default.
How about storing all news messages in one file, but storing all mail
messages in one file per month:
(setq gnus-message-archive-group
'((if (message-news-p)
"misc-news"
(concat "mail." (format-time-string
"%Y-%m" (current-time))))))
Now, when you send a message off, it will be stored in the
appropriate group. (If you want to disable storing for just one
particular message, you can just remove the `Gcc' header that has been
inserted.) The archive group will appear in the group buffer the next
time you start Gnus, or the next time you press `F' in the group
buffer. You can enter it and read the articles in it just like you'd
read any other group. If the group gets really big and annoying, you
can simply rename if (using `G r' in the group buffer) to something
nice - `misc-mail-september-1995', or whatever. New messages will
continue to be stored in the old (now empty) group.
That's the default method of archiving sent mail. Gnus also offers
two other variables for the people who don't like the default method.
In that case you should set `gnus-message-archive-group' to `nil'; this
will disable archiving.
XEmacs 19.13 doesn't have `format-time-string', so you'll have to
use a different value for `gnus-message-archive-group' there.
`gnus-outgoing-message-group'
All outgoing messages will be put in this group. If you want to
store all your outgoing mail and articles in the group
`nnml:archive', you set this variable to that value. This
variable can also be a list of group names.
If you want to have greater control over what group to put each
message in, you can set this variable to a function that checks the
current newsgroup name and then returns a suitable group name (or
list of names).