BOG0 TRAINER
ver 1.0-0 2020-09-05
Introduction
These scripts are used to execute the bogofilter program to filter
mail messages to folders based on the bogosity of the message.
Bogofilter's primary goal is to learn what the user considers Spam.
So, it would be beneficial to read more about how to use bogofilter
before using these scripts, although it might not be necessary.
Generally, a mailserver that delivers to a user Maildir is needed
with maildrop and a .mailfilter file for filtering those messages.
The scripts 'bogonotspam.sh' and 'bogospam.sh' should be run at least
daily. Cron has been tested for scheduling and reporting and works well.
The email paths are hard coded in the Bogo Trainer scripts, in order to
function correctly they must reflect your system configuration. Maildrop
is used to filter email messages via the .mailfilter file using bogofilter
(an example filter file is included in the doc dir). The 'bogonotspam.sh'
script only processes the INBOX. The 'bogospam.sh' script only processes
the 'Unsure' folder. Messages are moved if appropriate, but messages are
never deleted.
The function of these two scripts is to implement a method of processing
email message(s) that can not be determined to be SPAM with certainty
or are wrongly registered as SPAM by bogofilter. Incomimg messages are
filtered by maildrop via the .mailfilter file, which runs bogofilter.
Bogofilter initially assigns a bogosity rating of 'Ham', 'Unsure' or 'Spam'
when it is called from the .mailfilter file. 'Ham' means bogofilter sees
the message as 'not Spam'. 'Unsure' means that bogofilter is not sure if
the messages is or is not Spam. 'Spam' means bogofilter is sure that the
message is 'Spam'.
Messages that have a bogosity of 'SPAM' must be automatically filtered to the
SPAM folder using the .mailfilter file. Messages that have a bogosity of
'Unsure' must be automatically filtered to an 'Unsure' folder using the
.mailfilter file.
Four conditions to be considered.
1) SPAM MESSAGES IN THE UNSURE FOLDER
If there are any 'Unsure' messages in the 'Unsure' folder that the
user would like to be considered as SPAM, that user only need leave
them in the 'Unsure' folder and they will be moved to the SPAM folder
and registered as 'Spam' by bogofilter when the 'bogospam.sh' script
is next executed.
2) GOOD MESSAGES IN THE UNSURE FOLDER
If there are any 'Unsure' messages in the 'Unsure' folder that the
user would like to be considered as 'not Spam' then the user need only
move them to the INBOX and those messages will be registered as 'not Spam'
by bogofilter when the 'bogonotspam.sh' script is next executed.
3) GOOD MESSAGES IN THE SPAM FOLDER
If the user finds that there are messages in the SPAM folder the user
doesn't want to be registered as Spam the user only needs to move
them to the INBOX where they will be processed by the 'bogonotspam.sh'
script when it is next executed, registering them as 'not Spam'.
4) INBOX FOLDER
Keep in mind that the more messages that are stored in the INBOX the
longer it will take bogofilter to process that mail folder. 'Ham' messages
are not processed at all and will not add to the processing time. Twenty or
less average size 'Unsure'/'Spam' messages will take less than one minute to
process on a 64bit machine. Keeping more 'Unsure'/'Spam' messages in the INBOX
will increase the processing time. The more 'Unsure'/'Spam' messages there are,
the larger each is, the longer the processing will take. The processing time is
printed at the end of the cron report.

Disclaimer

These scripts are written specifically to function under a system that is configured with a single user in mind, the original author. The dependencies required are all available from Debian repositories. Although an honest effort is made to accomplish a useful task, the author does not guaranty these scripts to be useful in any way. Users of these scripts are 100% responsible for any consequence of their. use. The code herein is free as in 'beer and chicken', there are no restrictions inferred. Anyone may alter/distribute any/all of the code at will, without any need to notify or credit the original author.