-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ sub new { | |
$self->register_eval_rule('esp_constantcontact_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
$self->register_eval_rule('esp_ecmessenger_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
$self->register_eval_rule('esp_emarsys_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
$self->register_eval_rule('esp_emlbest_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
$self->register_eval_rule('esp_exacttarget_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
$self->register_eval_rule('esp_fxyn_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
$self->register_eval_rule('esp_keysender_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); | ||
|
@@ -126,6 +127,9 @@ Usage: | |
esp_emarsys_check() | ||
Checks for EMarSys abused accounts | ||
esp_emlbest_check() | ||
Checks for Emlbest abused accounts | ||
esp_exacttarget_check() | ||
Checks for ExactTarget abused accounts | ||
|
@@ -227,6 +231,11 @@ Files can be separated by a comma. | |
A list of files with abused EMarSys accounts. | ||
Files can be separated by a comma. | ||
=item emlbest_feed [...] | ||
A list of files with abused Eimlbest accounts. | ||
Files can be separated by a comma. | ||
=item exacttarget_feed [...] | ||
A list of files with abused ExactTarget accounts. | ||
|
@@ -469,6 +478,12 @@ sub set_config { | |
type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING, | ||
} | ||
); | ||
push(@cmds, { | ||
setting => 'emlbest_feed', | ||
is_admin => 1, | ||
type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING, | ||
} | ||
); | ||
push(@cmds, { | ||
setting => 'exacttarget_feed', | ||
is_admin => 1, | ||
|
@@ -606,6 +621,7 @@ sub finish_parsing_end { | |
$self->_read_configfile('constantcontact_feed', 'CONSTANTCONTACT'); | ||
$self->_read_configfile('ecmessenger_feed', 'ECMESSENGER'); | ||
$self->_read_configfile('emarsys_feed', 'EMARSYS'); | ||
$self->_read_configfile('emlbest_feed', 'EMLBEST'); | ||
$self->_read_configfile('exacttarget_feed', 'EXACTTARGET'); | ||
$self->_read_configfile('fordem_feed', 'FORDEM'); | ||
$self->_read_configfile('fxyn_feed', 'FXYN'); | ||
|
@@ -818,6 +834,30 @@ sub esp_emarsys_check { | |
return _hit_and_tag($self, $pms, $uid, 'EMARSYS', 'EMarSys', 'EMARSYSID', $opts); | ||
} | ||
|
||
sub esp_emlbest_check { | ||
my ($self, $pms, $opts) = @_; | ||
my $fid; | ||
|
||
# return if X-Complaints-To is not what we want | ||
my $xc = $pms->get("X-Complaints-To", undef); | ||
|
||
chomp($xc); | ||
if((not defined $xc) or ($xc ne '[email protected]')) { | ||
return; | ||
} | ||
|
||
# Parse the X-Feedback-ID | ||
# X-Feedback-ID: 332658814:5769873:campaign:US | ||
$fid = $pms->get("X-Feedback-ID", undef); | ||
return if not defined $fid; | ||
|
||
if($fid =~ /\d+:(\d+):campaign:\w+/) { | ||
$fid = $1; | ||
return _hit_and_tag($self, $pms, $fid, 'EMLBEST', 'Emlbest', 'EMLBESTID', $opts); | ||
} | ||
return; | ||
} | ||
|
||
sub esp_exacttarget_check { | ||
my ($self, $pms, $opts) = @_; | ||
my ($fid, $uid); | ||
|
@@ -1245,6 +1285,7 @@ sub has_esp_be_mail_check { 1 }; | |
sub has_esp_constantcontact_check { 1 }; | ||
sub has_esp_ecmessenger_check { 1 }; | ||
sub has_esp_emarsys_check { 1 }; | ||
sub has_esp_emlbest_check { 1 }; | ||
sub has_esp_exacttarget_check { 1 }; | ||
sub has_esp_fxyn_check { 1 }; | ||
sub has_esp_keysender_check { 1 }; | ||
|