Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use nnimap-split-methods to split incoming mail into different groups, but it's not working. Even with this simple split rule:

(setq gnus-secondary-select-methods
      '((nnimap "MyMail"
        (nnimap-address "imap.example.com")
        (nnimap-server-port 993)
        (nnimap-stream-type ssl)
        (nnir-search-engine imap)
        (nnimap-inbox "INBOX")
        (nnimap-split-methods '(("mail.pizza" ".*"))))))

all my mail shows up in mail.misc. I also tried replacing ".*" with "" since the documentation says the last element should always be "". What am I doing wrong here??

share|improve this question
up vote 3 down vote accepted

Well, I never got this working with nnimap-split-methods directly, but I was able to get what I wanted by using nnmail-split-methods and then setting nnimap-split-methods to default, like so:

(setq gnus-secondary-select-methods
      '((nnimap "MyMail"
        (nnimap-address "imap.example.com")
        (nnimap-server-port 993)
        (nnimap-stream-type ssl)
        (nnir-search-engine imap)
        (nnimap-inbox "INBOX")
        (nnimap-split-methods default))))


(setq nnmail-split-methods
      '(("gerrit" "X-Gerrit-MessageType.*")
        ("list.\\1" "From:.* \\(.*\\)-list@majordomo.com")
        ("list.lkml.kernel" "X-Mailing-List:.*linux-kernel@vger\\.kernel\\.org")
        ("list.linux-arm-kernel" "Cc:.*linux-arm-kernel@lists\\.infradead\\.org")
        ("mail.other" "")))
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .