I'm trying to setup fancy splitting on an imap server and I can't get
spam-split to work:

Here are what I think are the relevant parts of my .gnus.el

--8<---------------cut here---------------start------------->8---
(setq gnus-ignored-from-addresses (regexp-opt '("[email protected]" 
"[email protected]")))

(spam-initialize 'spam-use-move)

(setq spam-use-bogofilter t)

(require 'spam)

(setq spam-mark-ham-unread-before-move-from-spam-group t)
(setq spam-mark-only-unseen-as-spam t)

(setq spam-split-group "Junk") ;unqualified group name

(setq nnmail-split-methods 'nnmail-split-fancy)

(setq nnmail-split-fancy
      `(|
        ("from" ,gnus-ignored-from-addresses "sent-mail")
        (: (lambda ()
                (car (bbdb/gnus-split-method))))
        ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
        ;; all the rest
        "General"
        ))

(setq nnimap-split-fancy
      `(|
        ("from" ,gnus-ignored-from-addresses "sent-mail")
        (: (lambda ()
                (car (bbdb/gnus-split-method))))
        ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
        (: spam-split 'spam-use-bogofilter)
        ;; all the rest
        "General"
        ))

(setq gnus-secondary-select-methods
      '(
        (nnimap "gmail"
                (nnimap-address "imap.gmail.com")
                (nnimap-stream ssl)
                (nnir-search-engine imap)
                (nnimap-split-methods 'nnimap-split-fancy)
                (nnimap-inbox "INBOX"))
        (nnimap "free"
                (nnimap-address "imap.free.fr")
                (nnir-search-engine imap)
                (nnimap-split-methods 'nnimap-split-fancy)
                (nnimap-inbox "INBOX")
                )
        )
)
--8<---------------cut here---------------end--------------->8---

On a given spam mail, in an imap INBOX, gnus-summary-respool-trace says:

--8<---------------cut here---------------start------------->8---
(: (lambda nil (car (bbdb/gnus-split-method))))
(: spam-split (quote spam-use-bogofilter))
"Junk"
--8<---------------cut here---------------end--------------->8---

but

gnus-summary-respool-article moves it to "General", the catchall group.

Any idea why the message isn't move where the trace (or the query for
that matter) says it would ?

Thanks for your help.


_______________________________________________
info-gnus-english mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to