Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Top spam hosters, how to decline email mentioning them

From: Bill Landry <bill(at)inetmsg.com>
Date: Sun Oct 21 2007 - 15:59:55 EDT


JP Kelly wrote the following on 10/21/2007 11:41 AM -0800:
> this looks interesting to me as well
> i am a little confused about how to use/install it
>
> on the page you provided a link to it says under "USAGE" to "add the
> following to your local.cf file"
> ------------
> loadplugin Mail::SpamAssassin::Plugin::URICountry
>
> uricountry URICOUNTRY_XX XX
> header URICOUNTRY_XX eval:check_uricountry('URICOUNTRY_XX')
> describe URICOUNTRY_XX Contains a URI hosted in XX
> tflags URICOUNTRY_XX net
> score URICOUNTRY_XX 2.0
> ------------
> Where XX is replaced with the 2 character country code of your choice.
> (e.g. CN, KR, RO, RU, IN etc.)
>
> that makes sense to me but after that it says "THE CODE" followed by a
> bunch of code.
> i am unclear on what needs to be done with this code.
>
> any light shed on this will be greatly appreciated.
>

"THE CODE" will go into a file named "URICountry.pm" and placed in the same directory as your local.cf file (usually /etc/mail/spamassassin/). As for the rules, I prefer to create a separate .cf file for them rather than place them in local.cf (e.g., URICountry.cf), but that is simply a matter of personal preference - I just like to keep my local.cf clean of any rules and only use it for configuration settings.

I disagree with placing the "loadplugin" line in the cf file. The proper place for this entry is in init.pre so that it gets loaded before any rulesets, and can be referenced as:

loadplugin Mail::SpamAssassin::Plugin::URICountry /etc/mail/spamassassin/URICountry.pm

Also, at the top of your ruleset you should add:

    ifplugin Mail::SpamAssassin::Plugin::URICountry

and at the end:

    endif

For example:



ifplugin Mail::SpamAssassin::Plugin::URICountry
uricountry      URICOUNTRY_CN   CN
header          URICOUNTRY_CN   eval:check_uricountry('URICOUNTRY_CN')
describe        URICOUNTRY_CN   Contains a URI hosted in China
tflags          URICOUNTRY_CN   net
score           URICOUNTRY_CN   2.5

uricountry      URICOUNTRY_HK   HK
header          URICOUNTRY_HK   eval:check_uricountry('URICOUNTRY_HK')
describe        URICOUNTRY_HK   Contains a URI hosted in Hong Kong
tflags          URICOUNTRY_HK   net
score           URICOUNTRY_HK   2.5

uricountry      URICOUNTRY_IN   IN
header          URICOUNTRY_IN   eval:check_uricountry('URICOUNTRY_IN')
describe        URICOUNTRY_IN   Contains a URI hosted in India
tflags          URICOUNTRY_IN   net
score           URICOUNTRY_IN   2.5
Do you need help?X

endif


This will allow you to comment out the URICourntry "loadplugin" line in your init.pre file if you should want to disable the URICourntry test without having to remove the URICounrty.cf file (it will not load the ruleset unless the plugin has been pre-loaded).

Bill Received on Sun Oct 21 16:00:44 2007

This archive was generated by hypermail 2.1.8 : Mon Jul 07 2008 - 03:11:56 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library