Richard Mixon (qwest) wrote:
I have SLES 9 running our email using the default postfix LDAP setup and have amavis, clamd and Spamassassin configured (using the Yast Defaults mostly). Also we are using Cyrus as our POP/IMAP agent.
All seems to be well - as the admin I receive email notifications when SPAM or VIRUS emails are detected.
What I would like to do now is start getting Spam Assassin to take a more active role. I have read the README in /usr/share/doc/packages/perl-spamassassin. It directed me to look for a ~/.spamassassin directory - but none of our users have this directory setup by default. Should I just create it?
Such a directory would only be needed if you plan to enable individual per-user rules.
I would like to either: 1) Have Spamassassin put a score in the email headers that the users email agent can use for filtering.
That is the default. There are three headers you can use for filtering: X-Spam-Status: Yes, hits=20.929 tagged_above=0.5 required=3.5 tests=BAYES_99, DNS_FROM_RFC_POST, DRUGS_PAIN, DRUGS_PAIN_OBFU, HELO_DYNAMIC_IPADDR2, HELO_DYNAMIC_SPLIT_IP, MIME_BASE64_TEXT, RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL, RCVD_IN_SORBS_WEB, URIBL_OB_SURBL, URIBL_SC_SURBL X-Spam-Level: ******************** X-Spam-Flag: YES If you have Clients that can query these headers you can use the $sa_spam_subject_tag = '[suspect SPAM] '; in /etc/amavisd.conf
or 2) Have Spamassassin not deliver the high scoring emails. /etc/amavisd.conf: # The following symbolic constants can be used in *destiny settings: # # D_PASS mail will pass to recipients, regardless of bad contents; # # D_DISCARD mail will not be delivered to its recipients, sender will NOT be # notified. Effectively we lose mail (but will be quarantined # unless disabled). Losing mail is not decent for a mailer, # but might be desired. # # D_BOUNCE mail will not be delivered to its recipients, a non-delivery # notification (bounce) will be sent to the sender by amavisd-new; # Exception: bounce (DSN) will not be sent if a virus name matches # $viruses_that_fake_sender_re, or to messages from mailing lists # (Precedence: bulk|list|junk); # # D_REJECT mail will not be delivered to its recipients, sender should # preferably get a reject, e.g. SMTP permanent reject response # (e.g. with milter), or non-delivery notification from MTA # (e.g. Postfix). If this is not possible (e.g. different recipients # have different tolerances to bad mail contents and not using LMTP) # amavisd-new sends a bounce by itself (same as D_BOUNCE). # # Notes: # D_REJECT and D_BOUNCE are similar, the difference is in who is responsible # for informing the sender about non-delivery, and how informative # the notification can be (amavisd-new knows more than MTA); # With D_REJECT, MTA may reject original SMTP, or send DSN (delivery status # notification, colloquially called 'bounce') - depending on MTA; # Best suited for sendmail milter, especially for spam. # With D_BOUNCE, amavisd-new (not MTA) sends DSN (can better explain the # reason for mail non-delivery, but unable to reject the original # SMTP session). Best suited to reporting viruses, and for Postfix # and other dual-MTA setups, which can't reject original client SMTP # session, as the mail has already been enqueued.
$final_virus_destiny = D_BOUNCE; # (defaults to D_BOUNCE) $final_banned_destiny = D_BOUNCE; # (defaults to D_BOUNCE) $final_spam_destiny = D_PASS; $final_bad_header_destiny = D_PASS; # (defaults to D_PASS), D_BOUNCE suggested Just set according to your need.
Is this possible? Can it be configured through Yast? There appears to be ample Spamassassin instructions, but much of it talks about procmail and client side filtering on Linux. As we are using Cyrus IMAP/POP I do not
Yes, it is possible. procmail would be serverside filtering. Sandy