You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2006/02/03 23:51:41 UTC
svn commit: r374772 -
/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm
Author: dos
Date: Fri Feb 3 14:51:39 2006
New Revision: 374772
URL: http://svn.apache.org/viewcvs?rev=374772&view=rev
Log:
bug 4782: add domainkeys_timeout config option
Modified:
spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm
Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm?rev=374772&r1=374771&r2=374772&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm Fri Feb 3 14:51:39 2006
@@ -59,9 +59,37 @@
$self->register_eval_rule ("check_domainkeys_testing");
$self->register_eval_rule ("check_domainkeys_signall");
+ $self->set_config($mailsaobject->{conf});
+
return $self;
}
+###########################################################################
+
+sub set_config {
+ my($self, $conf) = @_;
+ my @cmds = ();
+
+=head1 USER SETTINGS
+
+=over 4
+
+=item domainkeys_timeout n (default: 5)
+
+How many seconds to wait for a DomainKeys query to complete, before
+scanning continues without the DomainKeys result.
+
+=cut
+
+ push (@cmds, {
+ setting => 'domainkeys_timeout',
+ default => 5,
+ type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC
+ });
+
+ $conf->{parser}->register_commands(\@cmds);
+}
+
sub check_domainkeys_signed {
my ($self, $scan) = @_;
@@ -136,7 +164,7 @@
return;
}
- my $timeout = 5; # TODO: tunable timeout
+ my $timeout = $scan->{conf}->{domainkeys_timeout};
my $oldalarm = 0;
eval {