I have a complex problem that should have a simple solution; I just have myself confused.
I have Ubuntu Server 14.04 with a Virtualmin install and several virtual servers. One of these servers has a single mail user, and that user gets a huge amount of spam. I have created Ham and Spam folders on that mail account, and I’m trying to set up a cron job that runs sa-learn twice a day on them to continually train Spamassassin. I believe the commands should look like these (specifics have been removed):
sa-learn --spam /home/<server>/homes/<user>/Maildir/.Spam/cur
sa-learn --ham /home/<server>/homes/<user>/Maildir/.Ham/cur
I know training spamassassin on a systemwide basis is a bad idea. The problem is that I’m not sure how to make these commands applicable either to only the virtual server or to only the particular user (either solution would be acceptable). Should I run the command as sudoed to that user? Do I use the -u flag in sa-learn? In either case, do I specify user.server or just server? Or am I missing the correct method completely?
I’ve done some searching, but I can’t find an answer specific to a virtualmin installation. Any help would be appreciated.
Thanks in advance!