On Tue, 26 Oct 2010 19:38:27 +0200 Tassilo Horn wrote: TH> I've tested it briefly: spam messages in spam groups aren't moved to the TH> training spam groups. Good. Marking messages as spam in my non-spam TH> groups moves them to my spam training group. Good. Great. TH> Hm, but then I unmarked a message in my Junk Mail group as non-spam and TH> it tried to move it to my ham training group, but that didn't seem to TH> work. > Copying to nnimap+Fastmail:INBOX: (11849)... > Copying to nnimap+Fastmail:INBOX.training.ham: (11849)... > Couldn't Copy article 11849: > 1 ham messages were registered by backend spam-use-move. TH> The message was copied to the first ham process destination (INBOX), but TH> not to the ham training group, most probably cause it tried to move a TH> then non-existing message. I see why that happened. The copy/move logic depends on the number of groups. All but the last group get a copy and the last one gets a move. But if we skip groups we break that logic. Try the attached patch, it just prefilters the groups list. The patch is pretty large because I fixed formatting issues with spam.el; sorry about that. Ted