Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bestpractical/rt-extension-spamfilter
https://github.com/bestpractical/rt-extension-spamfilter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/bestpractical/rt-extension-spamfilter
- Owner: bestpractical
- Created: 2014-09-03T14:52:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-30T19:33:22.000Z (7 months ago)
- Last Synced: 2024-05-30T22:26:36.080Z (7 months ago)
- Language: Perl
- Homepage: http://metacpan.org/release/rt-extension-spamfilter
- Size: 85 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
RT-Extension-SpamFilter - Spam FilterDESCRIPTION
This is for public RT systems, where everyone can create tickets. Admins
can define a list of rules, and if an email comes from a non-existing
user and reached the score threshold(scored by the rules), it will be
marked as spam and no tickets will be created.Admins can manually handle those spams from /Tools/SpamFilter/List.html
RT VERSION
Works with RT 4.0, 4.2, 4.4 and 5.0.INSTALLATION
perl Makefile.PL
make
make install
May need root permissionsmake initdb
Only run this the first time you install this module.If you run this twice, you may end up with duplicate data in your
database.If you are upgrading this module, check for upgrading instructions
in case changes need to be made to your database.Patch RT earlier than 5.0.5
patch -d /opt/rt5 -p1 < patches/0001-Pass-action-info-to-GetCurrentUser-for-email-interfa.patchSet up spam filter rules (see "CONFIGURATION" for details.)
Clear your mason cache
rm -rf /opt/rt5/var/mason_data/objRestart your webserver
CONFIGURATION
Edit your /opt/rt5/etc/RT_SiteConfig.pm; a sample configuration is shown
below:Plugin('RT::Extension::SpamFilter');
Set(@MailPlugins, 'SpamFilter', 'Auth::MailFrom');
Set($SpamFilterThreshold, 30);
Set(
@SpamFilters,
{
Field => 'Subject',
Regex => qr/urgent reply/i,
Score => 20,
},
{
Field => 'X-Gm-Spam',
Regex => qr/1/,
Score => 30, # Trust spam header and flag as spam
},
{
Field => 'Body',
Regex => qr/download the attachment/i,
Score => 10
},
{
Field => 'To',
Regex => qr/\@example\.com/i,
Score => 30,
Operator => 'no-match'
}
);Set($SpamListRowsPerPage, 50);
@SpamFilters
The @SpamFilters array is an array of hashes. Each hash must contain the
following keys:Field
Either 'Body' or the name of an email header.Regex
A regular expression to apply to the email header named by Field (or
the email body if Field is 'Body').Score
A number indicating how many points to add to the spam score if the
rule matches.Operator
This optional key defaults to 'match', meaning it will evaluate
whether Regex matches Field. You can set this to 'no-match' to
reverse the evaluatation and apply the Score if the Regex does not
match Field. You can use this mode to add spam points for email
headers that should match an expected value, like your domain in the
To header, but doesn't. This can happen if a spammer sets the To
envelope to your domain, but the To header in the email is something
else.You can use the configuration above to check for provided spam headers
as shown in the example above. However, any score provided as a value in
a header currently isn't used. The configuration will detect the
presence of the spam header and then add the score you configure.$SpamFilterThreshold
The $SpamFilterThreshold is the score above which an incoming message is
considered to be spam and placed in the spam list.$SpamListRowsPerPage
The $SpamListRowsPerPage is an optional configuration to change the
number of rows to display per page in the spam list. Default is 50.AUTHOR
Best Practical Solutions, LLCBUGS
All bugs should be reported via email toL
or via the web at
L.
LICENSE AND COPYRIGHT
This software is Copyright (c) 2014 Best Practical Solutions, LLC.This is free software, licensed under:
The GNU General Public License, Version 2, June 1991