Q: auto delete junk mail on os x server
Lion Server was deleting mail marked as junk but since the upgrade to Mt Lion Server it stopped. The junk mail now gets delivered. Does anyone know where the setting is to delete mail marked as junk?
Posted on Aug 15, 2012 11:41 AM
Hi ,
To answer your question, you can do this if you want, however I would caution against it on the grounds of losing mail incorrectly judged to be spam.
Option 1.
make a backup copy and then edit /Library/Server/Mail/Config/amavisd/amavisd.conf
and look for this block:
# OTHER MORE COMMON SETTINGS
# $myhostname = 'host.mydomain.com'; # must be a fully-qualified domain name!
$notify_method = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter!
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_BOUNCE;
$final_spam_destiny = D_PASS;
$final_bad_header_destiny = D_PASS;
$bad_header_quarantine_method = undef;
Change D_PASS to D_DISCARD
Option 2.
1. Leave that block as is.
2. Set up a spam local user on the server called "spamcollector" or some such
3. Look for the following 2 lines in amavisd.conf. and change to:
$spam_admin = 'spamcollector@yourdomain.com';
$spam_quarantine_to = 'spamcollector@yourdomain.com';
That way, you can put all the spam in a mailbox in case its needed.
Ad the spamcollector account to your own mail system but leave it offline so you dont see it all and empty it out occasionally.
Up to you!
Posted on Aug 15, 2012 10:16 PM