Junk mail not being moved to quarantine account

Having trained my spam filter, I find that spamassassin is correctly identifying over 95% of junk mail, and is marking it as such by rewriting the subject. However, it is still being delivered to my inbox despite having the following settings :-


mail:postfix:spam_quarantine = "spamcop@mydomain.com"

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

mail:postfix:spam_notify_admin_email = "spamcop@mydomain.com"

mail:postfix:black_hole_domains:_array_index:0 = "zen.spamhaus.org"

mail:postfix:spam_scan_enabled = yes

mail:postfix:virus_quarantine = "spamcop@mydomain.com"

mail:postfix:spam_rewrite_subject = yes

mail:postfix:virus_notify_admin_email = "spamcop@mydomain.com"

mail:postfix:spam_notify_admin = no

mail:postfix:spam_action = "deliver"


Do I need to change mail:postfix:spam_action or some other setting to have the junk sent to spamcop@mydomain.com instead of the user's inbox? Even better would be a global setting to send the spam to each user's 'Junk' folder, but for now a global quarantine account is fine.


**** UPDATE ***

I just checked in /Library/Server/Mail/Config/amavisd/amavisd.conf and find that the relevant lines are commented out. I could edit this manually, but suspect that some other setting is required to enable these. Any ideas?


#$virus_admin = 'spamcop@mydomain.com'; # notifications recip.

#$spam_admin = 'spamcop@mydomain.com';

#$spam_quarantine_to = 'spamcop@mydomain.com';

#$banned_quarantine_to = 'spamcop@mydomain.com';

#$virus_quarantine_to = 'spamcop@mydomain.com';

iMac, OS X Server, Mountain Lion Server 10.8.3

Posted on Mar 18, 2013 9:25 AM

Reply
6 replies

Mar 18, 2013 12:57 PM in response to Munger1

You are looking in the right place.


There are 3 levels of action


low-score: delivered to inbox

med-score: default is **JUNK MAIL** added to subject and still delivered to your inbox

high-score: can be discarded or quarantined (and other options available)

sky-high-score: setting is optional, if mail hits this level then its not quarantined


What I like to do is enable + addressing and set it up like this:


low-score: delivered to user inbox

med-score: delivered to user's Junk folder (not their inbox)

this allows the user to scan their junk)

high-score: either discard or route to a quarantine account

sky-high: always discarded


You can tweak these levels in amavisd.conf


less than tag2 level is a low score

$sa_tag2_level_deflt = 3.5;

between tag2 and kill_level_deflt is medium

$sa_kill_level_deflt = 6.5;

above kill_level_deflt is high

$sa_quarantine_cutoff_level = 18;

and above quarantine_cutoff is sky-high


$final_spam_destiny = D_DISCARD;

In example above, this causes mail which is 6.5+ to be discarded and not delivered to the user

unless it hits 18 (always discarded at 18+ based on above settings)


To enable the medium level to automatically be placed in the Users Junk folder, make these changes adjust these in amavisd.conf

@addr_extension_spam_maps = ('Junk');

$recipient_delimiter = '+';


And you'll need to enable plus addressing, to do so edit:

/Library/Server/Mail/Config/postfix/master.cf

You will find a line about plus addressing in dovecot. You comment this one:

flags=DRhu user=_dovecot:mail argv=/Applications/Server.app/Contents/ServerRoot/usr/libexec/dovecot/dovecot-lda -d ${user}

And uncomment this one:

flags=DRhu user=_dovecot:mail argv=/Applications/Server.app/Contents/ServerRoot/usr/libexec/dovecot/dovecot-lda -d ${user} -a ${recipient} -m ${extension}

Stop/start mail.


Make sure each user has a folder named 'Junk' (case sensitive)

Now medium score should land in their Junk folder.

This works great for iOS devices, they don't have to see ***Junk*** in their inbox anymore




hope that helps

Mar 18, 2013 2:13 PM in response to UptimeJeff

Yeah, I always worked directly with that when I hosted my mail on Linux, but prefer touse thesupplied tools where possible as it *should* provide a level of abstraction in the eventthat Apple decide to change the underlying mechanisms again. Of course, this is only true if they provide full support for all the options in their serveradmin tool, which does not appear to be the case.


My concern about the commented out lines is that some other setting may be causing those options to be disabled when serveradmin writes it's settings, which may see them disabled again next time I use that tool.


In the meantime I'm awaiting some spam emails to test the settings you suggested. Thanks for the info ;-)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Junk mail not being moved to quarantine account

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.