The SpamAssassin manager looks for emails left in specific directories by the IMAP server.
When these files are found, the SpamAssassin training command (
sa-learn) is invoked
on these files. The files start with either
spam_ depending on
the type of messages. In order to maintain the expected behavior, the files
are processed in chronological order. That way if a user drags a message to the Junk
folder then back to the INBOX, it will not be considered spam.
To help avoid any race conditions, only files that are at least 1 minute old (or in the future by 1 or more minutes to handle clock changes) are considered on each pass. This gives the IMAP server at least one minute to write all of its files.
Multiple files from one user are sent to
sa-learn at once when possible for efficiency.
TODO: SELinux port management for non-standard (other than 783) ports.
TODO: Somehow report when users drag from Junk to elsewhere (ham training), perhaps we can tweak our sa_discard_score some
- AO Industries, Inc.
Nested Class SummaryModifier and TypeClassDescription
static classTODO: Make this be a standard Unix-based cron job, outside aoserv-daemon package, so that functionality remains when aoserv-daemon disabled or uninstalled.
Methods inherited from class com.aoindustries.aoserv.daemon.util.BuilderThread
getMaximumDelay, getMinimumDelay, getProcessTimerReminderInterval, getProcessTimerSubject, getRandomDelay, packageListUpdated, tableUpdated, waitForBuild
runpublic void run()
nullif SpamAssassin is not enabled.
Note: CentOS 7 supports more than one bind for spamd, but we have no need for it at this time.
doRebuildprotected boolean doRebuild()
getProcessTimerDescriptionpublic String getProcessTimerDescription()
getProcessTimerMaximumTimepublic long getProcessTimerMaximumTime()