This is the /usr/local/etc/mail/spamassassin/local.cf that needs to be created to allow for server wide spamassassin rules. This is very handy otherwise the <br>10_misc.cf file is used as the default rule. the /etc/mail/spamassassin/local.cf and /etc/spamassassin/local.cf files didn't work. The system i'm running is FreeBSD 4.8, vpopmail 5.3.20, Qmail 1.03, Qmail-scanner 1.16, Courier-IMAP 1.7 i think, I'm still going to mess with customizing this file but i finallly got it! Anytime you change this file, you have to kill the spamd process <br><br>Other items learned how to debug qmail-scanner by opening up /var/qmail/qmail-queue-scanner.pl <br>#Want debugging? Enable this and read $scandir/qmail-queue.log<br>my $DEBUG='0';<br>line 230 turning 1 on this records /var/spool/qmailscan/qmail-queue.log. This grows quite large so don't leave it on. <br><br>Also another debugging switch was using -x on the spamd process. Both should be turned off after done to save disk space. <br>Here is my /usr/local/etc/spamd.sh file<br>replace x.x.x.x with the static IP given by your ISP.<br><br>#!/bin/sh<br><br>if ! PREFIX=$(expr $0 : "(/.*)/etc/rc.d/$(basename $0)$"); then<br>echo "$0: Cannot determine the PREFIX" >&2<br>exit 1<br>fi<br><br>case "$1" in<br>start)<br>[ -x ${PREFIX}/bin/spamd ] && ${PREFIX}/bin/spamd -a -d -v --vpopmail -u vpopmail -i --listen-ip=x.x.x.x && echo -n ' spamd'<br>;;<br>stop)<br>;;<br>*)<br>echo "Usage: `basename $0` {start|stop}" >&2<br>;;<br>esac<br><br>exit 0<br><br><br><br><br><br>1 - ps -ax | grep spamd to get the process and kill it<br>2 - also another thing to have a certain domain use spamC put this in the <br>3 - /usr/local/vpopmail/domains/mail.bgeek.com/.qmail.default file <br>4 - |preline /usr/local/bin/spamc | /usr/local/vpopmail/bin/vdelivermail '' /usr/local/vpopmail/domains/mail.bgeek.com/steve<br><br># SpamAssassin basic config file<br>#<br># Please don't modify this file as your changes will be overwritten with<br># the next update. Use /usr/local/etc/mail/spamassassin/local.cf instead.<br># See 'perldoc Mail::SpamAssassin::Conf' for details.<br>#<br># This program is free software; you can redistribute it and/or modify<br># it under the terms of either the Artistic License or the GNU General<br># Public License as published by the Free Software Foundation; either<br># version 1 of the License, or (at your option) any later version.<br>#<br># See the file "License" in the top level of the SpamAssassin source<br># distribution for more details.<br>#<br>################################################## #########################<br><br># Default template. Try to keep it under 76 columns (inside the the dots below).<br># Bear in mind that EVERY line will be prefixed with "SPAM: " in order to make<br># it clear what's been added, and allow other filters to *remove* spamfilter<br># modifications, so you lose 6 columns right there.<br>#<br># .................................................. ....................<br>clear_report_template<br>report This mail is probably spam. The original message has been attached<br>report along with this report, so you can recognize or block similar unwanted<br>report mail in future. See http://spamassassin.org/tag/ for more details.<br>report <br>report Content preview: _PREVIEW_<br>report <br>report Content analysis details: (_HITS_ points, _REQD_ required)<br>report _SUMMARY_<br># .................................................. ....................<br><br>################################################## #########################<br><br># Terse report template.<br>#<br># .................................................. ....................<br>clear_terse_report_template<br>terse_report ---- Start SpamAssassin results<br>terse_report _HITS_ points, _REQD_ required;<br>terse_report _SUMMARY_<br>terse_report ---- End of SpamAssassin results<br># .................................................. ....................<br><br>################################################## #########################<br># and now, a template for spam-trap responses. If the first few lines<br># begin with "Xxxxxx: " where Xxxxxx is a header, they'll be used as<br># headers.<br><br>clear_spamtrap_template<br>spamtrap Subject: this address is no longer available<br><br>spamtrap [this message has been automatically generated]<br>spamtrap <br>spamtrap Please note that this address is no longer in use, and nowadays<br>spamtrap receives nothing but unsolicited commercial mail. Accordingly,<br>spamtrap any mail sent to it is added to several spam-tracking databases,<br>spamtrap then automatically deleted.<br>spamtrap<br>spamtrap If you genuinely want to contact the owner of the address, please<br>spamtrap re-check your contact lists, or search the web, to find their<br>spamtrap current e-mail address.<br>spamtrap <br>spamtrap The mail you sent is reproduced in full below, for resending to<br>spamtrap the correct address. Sorry for the inconvenience!<br>spamtrap<br>spamtrap [-- Signed: the SpamAssassin mail filter]<br>spamtrap<br><br>################################################## #########################<br><br># Unsafe-for-viewing message report template.<br>#<br># .................................................. ....................<br>clear_unsafe_report_template<br>unsafe_report The original message did not contain plain text, and may be unsafe to<br>unsafe_report open with some email clients; in particular, it may contain a virus,<br>unsafe_report or confirm that your address can receive spam. If you wish to view<br>unsafe_report it, it may be safer to save it to a file and open it with an editor.<br># .................................................. ....................<br><br>################################################## #########################<br># Database configuration options.<br>#<br># user_scores_dsn MUST be in the form:<br># DBI:databasetype:databasename:hostname<img border="0" src="/forum/emoticons/tongue.gif" height="15" width="15" alt="

" />ort<br># ex. DBI:mysql:spamassassin:localhost<br>#<br># user_scores_sql_username is the authorized username to connect to DSN<br># user_scores_sql_password is the password for the database username<br><br>#user_scores_dsn DBI:mysql:spamassassin:localhost<br>#user_scores_sql_username spam<br>#user_scores_sql_password spamfilter<br><br>################################################## #########################<br># Automatic-whitelist directory, for the default db-based whitelist<br># backend. By default, each user has their own, in their ~/.spamassassin<br># directory with mode 0600, but for system-wide SpamAssassin use, you may<br># want to share this across all users; uncomment and customise the below<br># lines. (Make sure the mode has --x bits set.)<br><br># auto_whitelist_factor 0.5<br><br># default: per-user whitelist:<br># auto_whitelist_path ~/.spamassassin/auto-whitelist<br># auto_whitelist_file_mode 0600<br><br># use this for a system-wide whitelist:<br># auto_whitelist_path /var/spool/spamassassin/auto-whitelist<br># auto_whitelist_file_mode 0666<br><br>################################################## #########################<br># Define the sensitivity level. Standard level is 5.<br># After a lot of testing, we found that 10 was the best option. <br># Anything lower produced too many false positives<br>required_hits 10.0<br><br># Allow SpamAssassin to rewrite the subject line of any messages it classifies as spam<br>rewrite_subject 1<br><br># This is the value that will prepended to the subject line of messages classified as spam<br># subject_tag [SPAM]<br><br># Put the spam report into the headers of the message, rather than in the body<br>report_header 0<br><br># Use condensed wording for the spam report<br>use_terse_report 1<br><br># As of SpamAssassin 2.50, if SPAM is detected, by default a new report<br># email will be created and the spam message will be attached as a MIME part.<br># We don't like this behavior so we turn it off<br>report_safe 1<br><br># Don't modify the content-type: mime header of suspect mail.. <br># Usually you would be running a virus checker from Qmail-Scanner which will block out<br># any such nasty attachments<br>defang_mime 0<br><br># Spamassassin by default will try and run these following spam-detection utilities<br># for every mail message. (You can read about them at http://www.spamassassin.org/dist/INSTALL)<br># We don't want to waste any CPU cycles trying to run utilities that we don't have installed,<br># so disable these tests for the moment .<br>use_dcc 0<br>use_pyzor 0<br>use_razor1 0<br># enable razor2 checking<br>use_razor2 1<br><br># Enable SpamAssassin's RBL checking features :<br># Although we have already done some RBL filtering earier in qmail's rblsmtpd program,<br># it is still recommended to turn on RBL checking in SpamAssassin, as it will run<br># checks against a variety of different RBL sources, and the results will help<br># tag spam more accurately<br>skip_rbl_checks 0<br><br># If we haven't received a response from the RBL server in X seconds, then skip that test<br>rbl_timeout 3<br><br># Examine the headers of the message for the last 3 mail servers that the message<br># passed through. Run all of these IPs through the RBL checking systems<br>num_check_received 3<br><br># Now we want to alter some of the default scores for RBL hits<br># By default the bl.spamcop.net RBL score is 0 (disabled).<br># We will override this and give any hits a score of 3 <br># Info about this RBL is available from http://spamcop.net/fom-serve/cache/290.html <br>score RCVD_IN_BL_SPAMCOP_NET 3<br><br># Mail using locales used in these country codes will not be marked<br># as being possibly spam in a foreign language.<br>ok_locales all<br><br># Mail using languages used in these country codes will not be marked<br># as being possibly spam in a foreign language. This is an expensive<br># test, so it is set to "all" so the test will not be used by default.<br>ok_languages all<br><br># Mail which scores outside this range will be fed back into SpamAssassin's<br># learning system automatically, to train the Bayesian scanner.<br>auto_learn_threshold_nonspam -2<br>auto_learn_threshold_spam 15<br><br># Set this to 0 to turn off auto-learning.<br>auto_learn 1<br><br># Some common prefs settings can be set here, to take effect site-wide<br># unless the user override them. See the user_prefs.template file for<br># explanations.<br><br># rewrite_subject 0<br># report_safe 1<br># subject_tag *****SPAM*****<br># skip_rbl_checks 0<br>check_mx_attempts 2<br>check_mx_delay 5<p><hr size="1" width="50%" align="left" />*----------------------------------------*<br>* Steve Schofield<br>* steve@aspfree.com<br>*<br>* Microsoft MVP - ASP.NET<br>* http://www.aspfree.com<br>* <br>*----------------------------------------*</p>