1

Hope to try to filter some mail from "[email protected]" and the subject contains "sw-report".

I tried to put this configure to my init.el:

   (setq nnmail-split-methods 'nnmail-split-fancy
         nnmail-split-fancy
         '(any "sw-report"
               (from "[email protected]" "nnmaildir+COMPANY:INBOX.SWREPORT")))

But it doesn't work. Nothing is filtered.

My inbox is locate at nnmaildir+COMPANY:INBOX.

1 Answer 1

1

nnimap-split-fancy is actually a server variable rather than a global variable, so the right place to set it is as part of gnus-secondary-select-methods. So something like this:

(setq gnus-secondary-select-methods
      '((nnimap
        "Work"
        (nnimap-user "[email protected]")
        ;; Other server vars
        (nnimap-split-fancy
         (| (any "sw-report"
                 (from "[email protected]" "INBOX.SWREPORT"))
            ;; other rules
            )))))

(This is untested, and I always have trouble with splitting syntax, so it will probably require tweaking before it works.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.