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...
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 = email@example.com
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 = "zen.spamhaus.org"
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
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:
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;)
The steps I followed to not get it to work? No, I'm sorry, that was months ago and I finally gave up on it and resigned myself to having to delete the spam on my iPhone.
I would really love the mail server to automatically move spam into the Junk folder for me (without me having to keep a desktop Mail client running to do this). Or, better yet, to refuse acceptance of spam in the first place - I used to do this with Exim and the sa-exim plugin. Maybe if I eventually get annoyed enough, I'll switch back to Exim.
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/local.cf ?
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 local.cf 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 local.cf there. Once I set the rules in the former directory they immediately started working.
using "/Library/Server/Mail/Data/scanner/spamassassin/3.003002/updates_spamassassin_o rg/30_text_de.cf" for included file
and although the files inside there have been updated recently, is it not correct? The spam filtering sure seems to not be working.
Any clues how I would go about fixing the above path to:
Also, while I'm at it how do I enter my junkmail into this:
sudo mail:imap:junk_mail_userid = ""
You're looking at the wrong line. The thing you should be looking for is
dbg: config: using "<your working dir here>" for site rules dir
dbg: config: read file <your working dir here>/local.cf
As for the latter part, read here https://discussions.apple.com/thread/4481820
That's part of the larger output of
spamassassin --lint -D
Read through all the lines being output and you will find it. Two lines above will give you a clue to your proper local.cf location.
The other thread mentions that on page 3 or 4, and your command should be preceded with "serveradmin" and other options, not just sudo mail:imap... which makes no sense to the system. Read carefully, you will find the examples there. It should be working by default though. Create a user named junkmail, add it in your IMAP email client and try pasting/dragging some spam message into its inbox. If the message is gone next day from junkmail's inbox then spam training's working proprely and there's no need to assign anything through sudo...