user@host:~$ sa-learn --progress --ham ~/Maildir/.90_spam/{cur,new}/*
user@host:~$ sa-learn --progress --spam ~/Maildir/.90_spam/{cur,new}/*
sa-learn
has a fixed, hard coded upper limit for the size of messages which will be examined. This upper limit is at 256 kBytes. Unfortunately, the size limit is calculated with regard to the whole message, including all possible files which might be attached! It might therefore be necessary to reduce the size of the message, e.g. by removal of possibly large attachments, before it can be successfully examined and before keywords can be extracted from it.
Example:
First training attempt:
user@host:~$ sa-learn --progress --spam ~/Maildir/.90_spam/{cur,new}/* Learned tokens from 0 message(s) (0 message(s) examined)
Determine the filesize:
user@host:~$ ls -al ~/Maildir/.90_spam/cur/1* -rw------- 1 user user 404627 Dec 13 08:57 1449993575.6294_1.bender:2,S
Remove attachments from the message in the mail client.
Determine the filesize:
user@host:~$ ls -al ~/Maildir/.90_spam/cur/1* total 48 -rw------- 1 user user 39125 Dec 13 08:57 1450011400.24630_3.bender:2,S
Second training attempt:
user@host:~$ sa-learn --progress --spam ~/Maildir/.90_spam/{cur,new}/* 100% [===========================================================================================] 279.66 msgs/sec 00m00s DONE Learned tokens from 1 message(s) (1 message(s) examined)