Go to the first, previous, next, last section, table of contents.

Auto Refile

You can refile messages automatically, by typing C-o (wl-summary-auto-refile). It decides destination of refile by the content of the message header information (information in the msgdb).

By default, `From:', `Subject:', `To:' and `Cc:' is available. If you want to decide destination by other header fields, set the variable elmo-msgdb-extra-fields like following.

(setq elmo-msgdb-extra-fields

By this setting, Wanderlust saves extra fields in the msgdb. You have to type s all to get extra fields for the messages that are already exists in the summary.

Then, specify the refile rule. The refile target folder of auto refiling is decided by the value of wl-refile-rule-alist. wl-refile-rule-alist is a list of a rule:

(field (regexp . target)
       (regexp . target)

Each rule means `if field value matches regexp, then refile to target folder'. The rule matched first is applied.

field is a string of field name. You can specify a list of field name string, too. In this case, if one of these fields is matched, then the rule is fired (i.e. OR condition).

regexp is a regular expression for field value. target is a target folder string. You can specify a rule at target part, too. In this case, If the field value of the rule and the current rule is matched, then the current rule is fired (i.e. AND condition).

In target part, you can refer matched substring of regexp. To refer substring, specify following in target:

means substitute original matched text.
means substitute what matched the Nth `\(...\)'. (N is a number.)

Following is an example of wl-refile-rule-alist.

(setq wl-refile-rule-alist
         ("^Wanderlust" . "+wl")
         ("^Elisp" . "+elisp"))
        (("To" "Cc")
         ("\\([a-z]+\\)@gohome\\.org" . "+\\1"))
         ("me@gohome\\.org" . ("To" ("you@gohome\\.org" .

After these settings, refile marks are automatically put on the condition matched messages by typing C-o (wl-summary-auto-refile).

Messages which have wl-summary-auto-refile-skip-marks is skipped auto refiling. By default, `N', `U' and `!' is specified, so the messages with these persistent marks are not automatically refiled. It means Wanderlust does not execute auto refile on unread messages by the default setting. To execute auto refile on all messages, set following.

(setq wl-summary-auto-refile-skip-marks nil)

Go to the first, previous, next, last section, table of contents.