Command Line Interface Training
Administrators can perform Bayes training from the Warden command line interface using the command:
warden --task=antispam:train
The full documentation can be found here.
Examples
// train spam for all domains
warden --task=antispam:train --oper=train_spam --domains=all
// train ham for all domains
warden --task=antispam:train --oper=train_spam --domains=all
// train spam for specific domains
warden --task=antispam:train --oper=train_spam --domains=example1.com,example2.com
// train ham for specific domains
warden --task=antispam:train --oper=train_ham --domains=example1.com,example2.com
// train spam for specific mailboxes
warden --task=antispam:train --oper=train_spam --mailboxes=test@example1.com,test@example2.com
// train ham for specific mailboxes
warden --task=antispam:train --oper=train_ham --mailboxes=test@example1.com,test@example2.com
// train ham for a specific mailbox using the last 30 days of unread mail with a max size of 1000 KB.
warden --task=antispam:train --oper=train_ham --mailboxes=test@example.com --max_days=30 --max_size=1000
// force expire of old tokens out of the database
warden --task=antispam:train --oper=force_expire
// get training statistics
warden --task=antispam:train --oper=statistics
// delete all bayes training data from the database
warden --task=antispam:train --oper=reset_training
Scheduled Bayes Training
Administrators can also schedule Bayes training in Warden under Settings -> Anti-spam Training -> Training Settings or from the Warden command line interface using the command:
warden --task=antispam:training
The full documentation can be found here.
// set the training domains to specific domains only
warden --task=antispam:training --training_domains=example.com,example2.com
// turn off ham training
warden --task=antispam:training --train_ham=0
// set the training to daily at 3:00 AM
warden --task=antispam:training --training_interval=daily --training_hour=3
// set the training to weekly every Sunday at 3:00 AM
warden --task=antispam:training --training_interval=weekly --training_day_of_week=0 --training_hour=3
// set the training to monthly on the 3rd of each month at 3:00 AM
warden --task=antispam:training --training_interval=monthly --training_day_of_month=3 --training_hour=3
// set the training training_max_size to 1000 KB
warden --task=antispam:training --training_max_size=1000
// turn off the Bayes training cron task
warden --task=antispam:training --training_interval=disabled
// reset training_interval to its default value
warden --task=antispam:training --default_option=training_interval
// reset all settings to their default values
warden --task=antispam:training --default=yes
// run the Bayes training cron task immediately
warden --task=antispam:training --run_task=yes