• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Running spamtrain for a single mailbox

PSi_101

Regular Pleskian
Spamtrain runs for all mailboxes on the server but often I want to put spam into the spam folder and then run spamtrain for a single mailbox.
Is this possible?
 
Hi PSi_101,

sure, this is possible. Let's assume, that you use the eMail - adress: [email protected] and you moved all SPAM into the current SPAM - folder and already marked them all as read, then you would use the following command to train SPAM:

/usr/bin/sa-learn --no-sync --spam --mbox /var/qmail/mailnames/YOUR-DOMAIN.com/test/Maildir/.Spam/cur

while you would use the following command to train HAM, for eMails you already marked as read:

/usr/bin/sa-learn --no-sync --ham --mbox /var/qmail/mailnames/YOUR-DOMAIN.com/test/Maildir/cur

Once you completed you trainings, you would use the command "sa-learn --sync".


It is as well possible to use the string "/{cur,new}" instead of the single folder "/cur", so that you could train as well new, unread messages, but I still recommend the first examples.

 
Last edited by a moderator:
If I use the --mbox option it doesn't work (picks up 0 spam), but if I remove the option, it picks up the spam just fine.
 
If I use the --mbox option it doesn't work (picks up 0 spam), but if I remove the option, it picks up the spam just fine.
Yes, you are correct... I normally convert mailboxes into a mbox - format, because of compatibility/backup reasons. You would certainly use the provided commands without the "--mbox" - option when you use standart settings.
 
Back
Top