[mew-int 01493] Re: refiling question

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
Tue Jul 22 20:16:48 JST 2003


From: Arnaud Vandyck <arnaud.vandyck at example.com>
Subject: [mew-int 01492] Re: refiling question

> And what is mew-inbox-action-alist?

It's document says as follows:

--Kazu

*This variable controls actions when retrieving messages.
Currently this works only when 'i' with POP or 'mewl/incm'.
You can put any marks, typically 'o' and 'D' according to message
headers.

This value must be a list of entries. An entry is a list whose first
element is a field defined in 'mew-scan-fields'. 

If the second element is a list, the first element of the list must be
a mark (e.g. ?D) or a string which is a comma separated folders (e.g
"+foo,+bar" for ?o). Other elements of the list are regular
expressions to be matched to the value of the field.

With the following configuration, Mew marks messages whose Subject:
matches "adult" or "money" with 'D'. And Mew marks messages whose
Subject is "daily log" with 'o' to be refiled "+log". Also Mew
marks messages whose Content-Type: contains "gb2312" with 'D'.

(setq mew-inbox-action-alist
      '(("Subject:"
	 (?D "adult" "money")
	 ("+log" "daily log"))
	("Content-Type:"
	 (?D "gb2312"))))

If the second element of the entry is a symbol, it will be called as a
function which returns nil or a mark or a string.

If you are using 'spamassassin' which adds the "X-Spam-Flag:" field
to messages and puts them in your mailbox, configure as follows:

(defun mew-spam-assassin (val)
  (let ((case-fold-search t))
    (if (string-match "yes" val) ?D)))

(setq mew-inbox-action-alist
      '(("X-Spam-Flag:" mew-spam-assassin)))

With this configuration, messages with the "X-Spam-Flag:" whose
value is "Yes" are automatically marked with 'D' since the
'mew-spam-assassin' function returns 'D' marks when the value is
"Yes".

If you are using 'bogofilter' which adds the "X-Bogosity:" field
to messages and puts them to your mailbox, configure as follows:

(setq mew-spam: "X-Bogosity:")

(defun mew-spam-bogofilter (val)
  (let ((case-fold-search t))
    (if (string-match "yes" val) ?D)))

(setq mew-inbox-action-alist
      '(("X-Bogosity:" mew-spam-bogofilter)))



More information about the Mew-int mailing list