| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
wl-expire-alist
An example configuration of wl-expire-alist is shown below.
Everything in this wl-expire-alist makes a great difference in
expiration, so be careful. I advise you to set wl-expire-use-log
to t, especially in the initial stage.
(setq wl-expire-alist
'(("^\\+trash$" (date 14) remove)
;; delete
("^\\+tmp$" (date 7) trash)
;; re-file to |
Items in the list has the format of:
(regexp-for-folders specification-of-messages-to-be-deleted destination) |
The folder is examined if it matches regexp-for-folders from the
beginning of the list. If you invoke expiration on the folder that does
not match any of them, nothing will happen. And if either the second or
the third element of the item is nil, expiration will not take
place.
You can use any one of the following for specification-of-message-to-be-deleted:
(number n1 [n2])
n1 is the number of messages which should survive deletion, for example if its value is 500, the newest 500 messages survive and the rests are deleted.
n2 is the number of messages in the folder on which expiration should take place, which defaults to n1 + 1. For example if its value is 510, folders with 510 or more messages are expired. If you configured automatic expiration, frequently used folders may expire every time it receive messages, and you may be annoyed with the long delay in reading mail. In that case, you can set a wide margin between n2 and n1, so that expiration would not take place until a certain number of messages accumulate.
Messages with marks in wl-summary-expire-reserve-marks (marked
with important/new/unread) are not deleted.
If wl-expire-number-with-reserve-marks is non-nil, the folder
will expire so as to have 500 messages including such ones.
Otherwise, it will have 500 messages except such ones.
(date d1)
Messages dated d1 or more days ago are deleted, for example if its value is seven, messages seven days old or more are deleted. Note that the date is the one in the `Date:' field of the message, not when the message entered the folder.
Messages with no or invalid `Date:' field does not expire; you might have to delete them by hand.
You can use any one of the following in the place of destination:
remove
hide
trash
wl-trash-folder.
It would be useful for specifying an archiving folder, but because this does not move important messages, it might be better to use the standard functions described below.
To the function, three arguments are passed: a folder name, a list
of messages to be deleted, and msgdb information of the summary. You
can specify function-specific arguments after the name of the
function. Note that the list contains messages with marks in
wl-summary-expire-reserve-marks, be careful in writing your own
function.
These are four standard functions; three of them move messages to an archive folder in the specified way. This means old messages can be compressed and saved in a file, being deleted from the original folder. The last one divides messages to some MH folders.
wl-expire-archive-number1
wl-expire-archive-files is 200, messages will be re-filed to
`wl-00000.zip', `wl-00200.zip', `wl-00400.zip', ....
The archiving folders to which messages are re-filed are determined by
the name of the folder as follows (in this case, archiving folders are
handled as if elmo-archive-treat-file were non-nil).
For example, `+ml/wl' corresponds to `$ml/wl;zip' (`~/Mail/ml/wl-00100.zip').
For example, `%#mh/ml/wl' corresponds to `$imap4/#mh/ml/wl;zip' (`~/Mail/imap4/#mh/ml/wl-00100.zip').
As you can see, in the case of localdir, the folder type is not included
in the path name, but otherwise it is included.
And you can control the prefix to the archiving folder name by
wl-expire-archive-folder-prefix.
Refer to wl-expire-archive-folder-prefix for details.
wl-expire-archive-number2
This differs from `wl-expire-archive-number1' in that this re-files
to the folder up to the specified number regardless of message numbers.
The archiving folders to which messages are re-filed are determined in the
same way as wl-expire-archive-number1.
wl-expire-archive-date
For example, a message dated December 1998 is re-filed to
$folder-199812;zip. The name of the archiving folders except the
date part are determined in the same way as
wl-expire-archive-number1.
You can set the first argument to these three standard functions to non-nil
in wl-expire-alist so as to retain message numbers in the folder.
For example, it can be specified just after the name of the function:
("^\\+ml/wl$" (number 300 310) wl-expire-archive-number1 t)
|
If you omit the argument, consecutive numbers from 1 are assigned for each archiving folder.
wl-expire-localdir-date
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |