Skip navigation

Spamassassin Junkmail and Notjunkmail Learning in Mountain Lion

5385 Views 34 Replies Latest reply: Nov 14, 2013 10:56 AM by scottl31 RSS
  • pterobyte Level 6 Level 6 (10,910 points)

    That would be the userid not the name. In any case you don't need to worry about this. Just make sure you have the accounts named junkmail and notjunkmail and feed them with spam and ham. Both learn_junk_mail and spamtrainer will find the mailbox and the id and train from those mailboxes.

  • Robb Allan Level 2 Level 2 (340 points)

    I believe the original settings parameter name is incorrect. Try:

     

         sudo serveradmin settings mail | grep junk

     

    and you will see the following:

     

         mail:postfix:junk_mail_userid = "junkmail"

         mail:postfix:not_junk_mail_userid = "notjunkmail"

         mail:imap:junk_mail_userid = ""

         mail:imap:not_junk_mail_userid = ""

     

    If the "mail:postfix:..." settings are blank, set them to junkmail and notjunkmail.

  • Armand Welsh Calculating status...

    I am still completely stumped.  I create two public folder in dovcot, junkmail and notjunkmail.  I cannot figure out how to get spamtrainer to find the junkmail and notjunkmail imap folders when scanning/learining.  it always looks for (and fails to find) GUID of the junkmail and notjunkmail users.

     

    from what I am reading, the point of this is to not have to create these accounts, but to just create a couple public folders, or to create standard folders on all user accounts.. but this spamtrainer doesn't find them  what the heck are the command line arguments to use the public folders junkmail and notjunkmail.

  • UptimeJeff Level 4 Level 4 (3,390 points)

    Did you try the options for top-level (-t) ?

     

    I'm not 100% sure if the top level function works with a public folder namespace.

    You can always read directly with something like

     

    You'll want to do something like - this is untested in this specific form.. hopefully gets you on track.

     

    SharedSpam="/Library/Server/Mail/Data/mail/SpamTrainer/.JunkMail"
    SharedHam="/Library/Server/Mail/Data/mail/SpamTrainer/.NotJunkMail"
    
    SpamDB="/Library/Server/Mail/Data/scanner/amavis/.spamassassin"
    sa_PATH="/Applications/Server.app/Contents/ServerRoot/usr/bin/sa-learn"
    
    $sa_PATH -u _amavisd --dbpath "$SpamDB" --no-sync --spam $SharedSpam/{cur,new}
    $sa_PATH -u _amavisd --dbpath "$SpamDB" --no-sync --ham $SharedHam/{cur,new}
    

     

    This simply tells sa-learn to read directly from your spam/ham directories.

     

    You can add automatic purging and all sorts of other goodies....

     

     

    To learn more:

    man sa-learn

  • scottl31 Level 1 Level 1 (5 points)

    Hi,

     

    I have been trying to figure this out. If I'm not mistaken, this thread is all about using the "junkmail" and "notjunkmail" accounts to learn spam. But it seems it's only if the users are using IMAP. Correct?

     

    Our users are using POP3, so we can spam train by having them forward each spam message to the "junkmail" account, right? If so, can anybody tell me by the following if it is set up correctly, or do I need to do anything else?

     

    I ran:

    sudo serveradmin settings mail | grep junk

     

    I got:

    mail:postfix:spam_quarantine = "junk-quarantine@example.com"

    mail:postfix:spam_notify_admin_email = "junk-admin@example.com"

    mail:postfix:junk_mail_userid = "junkmail"

    mail:postfix:not_junk_mail_userid = "notjunkmail"

    mail:imap:junk_mail_userid = ""

    mail:imap:not_junk_mail_userid = ""

     

    Also, how do the quarantine and notify admin accounts work? Depending on your answer, if I want to set up accounts for them, how do I change those example.com defaults to the real accounts I set up?

     

    This has been exhausting trying to find this out, thanks to Apple's lack of documentation.

     

    Thanks very much!

    Scott

1 2 3 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.