Assuming the users are vhost users, using postfix and mysql. Root home users emailas are in /var/mail/vhosts.
find /var/mail/vhosts/ -type d -name ".Junk" -exec sa-learn --spam {} \;
find /var/mail/vhosts/ -type d -name ".Junk" -exec sa-learn --spam {} \;