Hmmm... not to good with SpamAssassin as I don't run my own mail server, but if all your users are user1, user2, user3, user[...] then this should do the trick:
# sa-learn /mail/user*/spam
if they're not, and they most likely aren't, try
# sa-learn /mail/*/spam
this should prevent you from having to modify the code. Now: if you have multiple directories in /mail, such as a /mail/etc (?) or something, you'll probably need to specifically exclude those directories if that's possible. Try the man pages for xarg, ls, and commands of that nature. Sorry if I couldn't be more help