Mail-SpamAssassin
view release on metacpan or search on metacpan
lib/Mail/SpamAssassin/Plugin/TxRep.pm view on Meta::CPAN
=item B<txrep_spf>
0 | 1 (default: 1)
When enabled, TxRep will treat any IP address using a given email address as
the same authorized identity, and will not associate any IP address with it.
(The same happens with valid DKIM signatures. No option available for DKIM).
Note: at domains that define the useless SPF +all (pass all), no IP would be
ever associated with the email address, and all addresses (incl. the forged
ones) would be treated as coming from the authorized source. However, such
domains are hopefully rare, and ask for this kind of treatment anyway.
=back
=cut
push (@cmds, {
setting => 'txrep_spf',
default => 1,
type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL
});
=head2 REPUTATION WEIGHTS
The overall reputation of the sender comprises several elements:
=over 4
=item 1) The reputation of the 'From' email address bound to the originating IP
address fraction (see the mask parameters for details)
=item 2) The reputation of the 'From' email address alone (regardless the IP
address being currently used)
=item 3) The reputation of the domain name of the 'From' email address
=item 4) The reputation of the originating IP address, regardless of sender's email address
=item 5) The reputation of the HELO name of the originating computer (if available)
=back
Each of these partial reputations is weighted with the help of these parameters,
and the overall reputation is calculation as the sum of the individual
reputations divided by the sum of all their weights:
sender_reputation = weight_email * rep_email +
weight_email_ip * rep_email_ip +
weight_domain * rep_domain +
weight_ip * rep_ip +
weight_helo * rep_helo
You can disable the individual partial reputations by setting their respective
weight to zero. This will also reduce the size of the database, since each
partial reputation requires a separate entry in the database table. Disabling
some of the partial reputations in this way may also help with the performance
on busy servers, because the respective database lookups and processing will
be skipped too.
=over 4
=item B<txrep_weight_email>
range [0..10] (default: 3)
This weight factor controls the influence of the reputation of the standalone
email address, regardless of the originating IP address. When adjusting the
weight, you need to keep on mind that an email address can be easily spoofed,
and hence spammers can use 'from' email addresses belonging to senders with
good reputation. From this point of view, the email address bound to the
originating IP address is a more reliable indicator for the overall reputation.
On the other hand, some reputable senders may be sending from a bigger number
of IP addresses, so looking for the reputation of the standalone email address
without regarding the originating IP has some sense too.
We recommend using a relatively low value for this partial reputation.
=cut
push (@cmds, {
setting => 'txrep_weight_email',
default => 3,
type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC,
code => sub {
my ($self, $key, $value, $line) = @_;
if ($value < 0 || $value > 10) {return $Mail::SpamAssassin::Conf::INVALID_VALUE;}
$self->{txrep_weight_email} = $value;
}
});
=item B<txrep_weight_email_ip>
range [0..10] (default: 10)
This is the standard reputation used in the same way as it was by the original
AWL plugin. Each sender's email address is bound to the originating IP, or
its part as defined by the txrep_ipv4_mask_len or txrep_ipv6_mask_len parameters.
At a user sending from multiple locations, diverse mail servers, or from a dynamic
IP range out of the masked block, his email address will have a separate reputation
value for each of the different (partial) IP addresses.
When the option auto_welcomelist_distinguish_signed is enabled, in contrary to
the original AWL module, TxRep does not record the IP address when DKIM
signature is detected. The email address is then not bound to any IP address, but
rather just to the DKIM signature, since it is considered that it authenticates
the sender more reliably than the IP address (which can also vary).
This is by design the most relevant reputation, and its weight should be kept
high.
=cut
push (@cmds, {
setting => 'txrep_weight_email_ip',
default => 10,
( run in 1.861 second using v1.01-cache-2.11-cpan-39bf76dae61 )