spamassassin & sa-learn

Discussion in 'Server Operation' started by Ovidiu, May 11, 2006.

  1. Ovidiu

    Ovidiu Active Member

    Hi guys,

    I would like to have the following commands executed at i.e. midnight for each of my systems users: (but keep in mind I might have errors in here)

    cd $HOME =>
    cd Maildir/.spam
    path-to-sa-learn --spam cur/
    cd ../.ham
    path-to-sa-learn --ham cur/

    so that spamassassin learns each users spam and ham every night.
    If possible the mails that were marked SPAM and are found in HAM should be moved to the inbox after learning and vice versa.

    can anyone help me with this?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You can either create a cron job for each user, or you create a sript run by a root cron job that parses /etc/password and then performs the tasks by going through a loop.
     
  3. Ovidiu

    Ovidiu Active Member

    thx,

    the second options makes more sense, except if (by a plugin maybe) one could have the first choice as a tickbox during user creation inside ispconfig...

    anyone with too much free time could give me a hint on how to perform the second option? maybe quote a similar script, I am good at adopting but rather bad at inventing my own solutions :)
     
  4. Ovidiu

    Ovidiu Active Member

    sorry to insist in this matter but is there anyone out there who could do this?
    Is actually noone using the sa-learning function of SA ?

    besides now it got harder because of the chrooting to sa-learn my own spams...

    would someone interested in this help me and others out?
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Free time? What's that? :(
     
  6. Ovidiu

    Ovidiu Active Member

    I just started using another script for backing up the databases, I'll quote it here:
    maybe someone can show me how to adapt this to look for all users? I can adapt stuff, I am just no good at creating, so can someone give me a hint how to get sa-learn running as each of those users so that the learned tokens go to each users bayes db?
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Why don't you use the root MySQL user? He has permissions to do anything on all databases.
     
  8. Ovidiu

    Ovidiu Active Member

    ähh, sorry I just reread my post and it is indeed confusing. forget about that backup script, it is taken from another post around here by another member.

    what I actualy wanted to express was how to make a script that looks through a DB to run sa-learn --spam on each users spam folder and then deletes the spam...
     

Share This Page