Skip navigation

Where do I configure spamassassin in Mountain Lion Server?

7814 Views 24 Replies Latest reply: Oct 8, 2013 7:06 AM by Buckiejoe RSS
  • niwrik Level 1 Level 1 (0 points)

    Following redshift82r's instructions posted elsewhere in the forums, I loaded Roundcube on our MLS and added the managesieve plug in.  Once everything was working, I was able to setup a rule to move messages with the string ***JUNK MAIL*** in the subject to the junk folder.  This seems pretty effective at keeping the inboxes clean, while allowing end users to  check their own junk folders so long as they are using IMAP.


    I'm real green still, so I'm looking at the following (over the next several months):


    1) Default templates for Roundcube mailboxes (default folders) and default manageseve filters

    2) Updating whitelists/blacklists with some script (maybe called from cronjob) to allow users to put false positives in one folder and spam in another to train spamassassin <-- this might turn out to be a pipe dream

    3) More customization in spamassasin rules to automaticaly delete/bounce spam with certain characteristics


    So far, so good, though.  Got a snapin running that allows carddav sync with MLS address books.  Looking at getting calendar snapin to work as well.


    I am getting e-mails from spamassassin RE: blocked spam and blocked viruses.  Since 10.8.2, there are additional messages sent when the filter blocks a virus...

  • redshift82r Level 2 Level 2 (325 points)

    Hi AIU,


    Hopefully my other replies have set you on the right track, but to make it easy.


    1. Set up a local user on the server to catch spam - say 'spamcollector'.


    2 using serveradmin from the command line:


    Re: auto delete junk mail on os x server

    Aug 15, 2012 10:26 PM (in response to shcaerp)

    Or, easier than Option 1 and 2 above. - use serveradmin to make the changes instead.



    $ sudo serveradmin settings mail:postfix:spam_quarantine =


    Other spam settings configureable in serveradmin include:


    mail:postfix:spam_subject_tag = "***JUNK MAIL*** "

    mail:postfix:spam_ok_locales = "en"

    mail:postfix:spam_notify_admin_email =                          # "i.e. spamcollector at your domain dot com"

    mail:postfix:black_hole_domains:_array_index:0 = ""

    mail:postfix:spam_scan_enabled = yes

    mail:postfix:spam_rewrite_subject = yes

    mail:postfix:spam_notify_admin = no                              #yes

    mail:postfix:spam_ok_languages = "en fr de ja sw ta"

    mail:postfix:spam_action = "deliver"                          # don't change to 'delete' and definitely don't change to 'bounce'

    mail:postfix:spam_log_level = "info"  #warning/notice/critical/debug





  • Kostas B Level 1 Level 1 (90 points)

    Thank you,


    Can you please share how do you whitelist some addresses and domains in SpamAssassin, and how to check if they really get whitelisted or blacklisted?


    Best regards



  • essandess Level 1 Level 1 (0 points)

    See this post to train spamassassin using the content of the mailboxes "junkmail" and "notjunkmail":

  • niwrik Level 1 Level 1 (0 points)

    It looks like server app 2.2 has addressed the spamassassin issue whereby the slider bar was inverted.  I have not yet loaded this on our production server, having adjusted all the threshholds manually in amavisd.conf - I'm afraid the update will break everything that is finally working perfectly.  Here is a screen shot of the 2.2 mail filter screen from my test box:


    Screen Shot 2012-12-10 at 10.26.46 AM.png


    NOTE:  In brief testing, I noticed that the slider controls only the 'tag2' level and not the 'kill' level.  You're probably still better off changing the settings manually in amavisd.conf - I found that it was far more effective to reduce the tag level to zero so that everything gets tagged, then set the kill level action to discard.  ($final_spam_destiny = D_DISCARD;)

  • Matt Domenici Level 1 Level 1 (110 points)

    @Brian:  I'm having the same issue with rules not being run -- seemed to happen after I needed to do a complete restore.  Did you ever determine what the root cause of your spamassassin rules not being run was?

  • Matt Domenici Level 1 Level 1 (110 points)

    @Brian-- could you share the location and steps you followed?

  • Buckiejoe Level 1 Level 1 (0 points)

    Am I the only one who found out that the actual working config file for spamassassin is located in


    instead of /Library/Server/Mail/config/spamassassin/ ?

    It could be because I migrated from 10.6 to 10.8 and spamassassin lost its bayes database access for some reason (wrong db version or something along those lines) and I had to manually update SA through cpan, took some work because of errors but eventually worked out, then ran sa-update and it fixed the database after which it worked again with amavis with the only problem being that I couldn't set any rules in that resided in /Library... Took a run of

    spamassassin --lint -D

    to see that it's actually looking in /etc... instead of /Library... to find its there. Once I set the rules in the former directory they immediately started working.

1 2 Previous Next


More Like This

  • Retrieving data ...

Bookmarked By (3)


  • 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.