Setting up a cron job to train the spamassassin bayes filter

Posted by Ansgar Berhorn on Mai 28, 2006

on a Debian sarge system equiped with Spamassassin 3.* and Exim 4 MTA

Requirements:

  • every user on the system has an own bayes database in his $HOME directory (no side wide bayes learning)
  • emails will get learned and afterwards moved to a certain dir
  • the cron job runs with the rights of the certain user

Limitations:

  • the solution shall be need as less code as possible for security and maintenance reasons
  • the solution runs on a low-load server with only a few users

(…)