Using spam.el and spam-stat.el with an nnimap backend. I previously had a group called "spam", which is the default spam group for spam.el. Otherwise I guess you need to create this. All my mails start in INBOX, I then split mails with nnimap-split-fancy to email list groups and to the "spam" group based on a corporate spam filter. The emails that are left are put in "incoming". I did the following changes in .emacs: (load "spam") in gnus.el add this rule to nnimap-split-fancy: (: spam-split) Customize: '(spam-use-stat t) '(gnus-spam-process-destinations (quote (("incoming" "spam")))) Train spam-stat: Start from scratch: (spam-stat-reset) Reset:(setq spam-stat (make-hash-table :test 'equal)) Learn spam: (spam-stat-process-spam-directory "~/News/agent/nnimap/mailse01.axis.se/spam") Learn non-spam: (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/incoming") (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/INBOX_Archive") (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/INBOX_Personal") (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/lists_ding") Reduce table size: (spam-stat-reduce-size) Save table: (spam-stat-save) Then I customized group parameters for the "incoming" group containing ham mails as such: (spam-contents gnus-group-spam-classification-ham) (spam-process (gnus-group-ham-exit-processor-stat)) and for the spam group: (spam-contents gnus-group-spam-classification-spam) (spam-process (gnus-group-spam-exit-processor-stat)) (ham-process-destination . "incoming") and that's it. When spam end up in ham groups I just press M-d and the stats are updated when exiting the group.