I am migrating my email workflow to gnus. I want to use splitting to keep things organized and for the splits to take effect on the server. I think my splits are working for incoming mail, but I want to sort my old mail too.
(setq gnus-select-method '(nnimap "outlook.office365.com"
(nnir-search-engine imap)
(nnimap-stream starttls)
(nnimap-split-download-body t)
(nnimap-split-predicate "UNDELETED")
(nnimap-split-fancy (| ("MailScanner4-SpamCheck" "spam" "spam\.detected")
(from ".*@spammer.com" "mail\.custom\.spams")
(from ".*acm.org" "mail.acm")
"mail\.misc"))))