Skip to content

Commit

Permalink
Revert "add "Webtrk" support"
Browse files Browse the repository at this point in the history
This reverts commit 5292d3a.
  • Loading branch information
bigio committed Nov 14, 2024
1 parent 4e9d337 commit 4e9cefd
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions Esp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ sub new {
$self->register_eval_rule('esp_smtpcom_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS);
$self->register_eval_rule('esp_sparkpost_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS);
$self->register_eval_rule('esp_turbosmtp_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS);
$self->register_eval_rule('esp_webtrk_check', $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS);

return $self;
}
Expand Down Expand Up @@ -194,9 +193,6 @@ Usage:
esp_turbosmtp_check()
Checks for TurboSmtp abused accounts
esp_webtrk_check()
Checks for "Webtrk" abused accounts
Every sub can be called with an options parameter which can contain the keywords "md5"
to crypt the Esp id using md5 algorithm and "nodash" which will substitute the "-" char
with a "_" in order to be possible to use the Esp id in dns records.
Expand Down Expand Up @@ -344,11 +340,6 @@ Files can be separated by a comma.
A list of files with abused TurboSmtp accounts.
Files can be separated by a comma.
=item webtrk_feed [...]
A list of files with abused "Webtrk" accounts.
Files can be separated by a comma.
=back
=head1 TEMPLATE TAGS
Expand Down Expand Up @@ -443,9 +434,6 @@ SPARKPOSTID
=item *
TURBOSMTPID
=item *
WEBTRKID
=back
=cut
Expand Down Expand Up @@ -622,12 +610,6 @@ sub set_config {
type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING,
}
);
push(@cmds, {
setting => 'webtrk_feed',
is_admin => 1,
type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING,
}
);
$conf->{parser}->register_commands(\@cmds);
}

Expand Down Expand Up @@ -661,7 +643,6 @@ sub finish_parsing_end {
$self->_read_configfile('smtpcom_feed', 'SMTPCOM');
$self->_read_configfile('sparkpost_feed', 'SPARKPOST');
$self->_read_configfile('turbosmtp_feed', 'TURBOSMTP');
$self->_read_configfile('webtrk_feed', 'WEBTRK');
}

sub _read_configfile {
Expand Down Expand Up @@ -1300,23 +1281,6 @@ sub esp_turbosmtp_check {
return _hit_and_tag($self, $pms, $fid, 'TURBOSMTP', 'TurboSmtp', 'TURBOSMTPID', $opts);
}

sub esp_webtrk_check {
my ($self, $pms, $opts) = @_;

my $cid = $pms->get("X-Campaign", undef);
return if not defined $cid;

my $lu = $pms->get("List-Unsubscribe", undef);
return if not defined $lu;
my $fid;
if($lu =~ /https?:\/\/.{3,32}\/u\/\w+\-(\w+)/) {
$fid = $1;
}
return if not defined $fid;

return _hit_and_tag($self, $pms, $fid, 'WEBTRK', 'Webtrk', 'WEBTRKID', $opts);
}

# Version features
sub has_esp_4dem_check { 1 };
sub has_esp_acelle_check { 1 };
Expand Down Expand Up @@ -1345,6 +1309,5 @@ sub has_esp_sendinblue_check { 1 };
sub has_esp_smtpcom_check { 1 };
sub has_esp_sparkpost_check { 1 };
sub has_esp_turbosmtp_check { 1 };
sub has_esp_webtrk_check { 1 };

1;

0 comments on commit 4e9cefd

Please sign in to comment.