Skip to content

System in Python for training SpamAssassin with user-submitted mail

Notifications You must be signed in to change notification settings

stemid/spamutbildning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo was moved from devops to its own repo because it sort of grew in use and importance.

Spam Training for SpamAssassin

System setup to receive spam candidates from users into a special mailbox. And then notify admins who can confirm or delete the candidates. Confirmed candidates are placed in a special directory for later sa-learning.

Please go through settings.py before attempting science.

Tools

In the tools dir is what I use to run sa-learn, along with incrond. I wrote it in Python only to use the settings.py file, all it does is run the sa-learn program on the two ham and spam directories.

HOWTO Sendmail

It's supposed to receive e-mail from an alias in /etc/aliases like this.

spamtraining: 	|/etc/smrsh/spamtraining

In sendmail this requires a symlink with the actual program from /etc/smrsh/spamtraining. The program should be owned by the mail user that executes it.

HOWTO Postfix

Has also been tested in postfix where the smrsh linking procedure is not required.

Simply put it into /etc/aliases like this:

spamtraining: |/usr/share/devops/spam/spamutbildning.py

And make sure the devops/spam dir is owned by the postfix user, nobody:nogroup on Debian. This is required to create directories inside the spam dir.

Alternatively in Postfix you can use virtual aliases to setup a real host.

spamtraining@mydomain spamtraining

For example.

TODO

About

System in Python for training SpamAssassin with user-submitted mail

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages