diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-15 19:20:45 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-15 19:20:45 +0400 |
commit | 205cb6049d86f74707949ac6a3b2de64afe2850a (patch) | |
tree | 0c40e3ee9b10f2fab59f873d005dc4f966ec4d04 /perl | |
parent | ecbbd935773673d8df1f2cb8334b447f7b834b5a (diff) | |
download | rspamd-205cb6049d86f74707949ac6a3b2de64afe2850a.tar.gz rspamd-205cb6049d86f74707949ac6a3b2de64afe2850a.zip |
* Add ability to assign several actions to one metric
* Report action in rspamc protocol
* Mail::Rspamd::Client and rspamc can now understand Action header too
* Write action to log as well
Diffstat (limited to 'perl')
-rw-r--r-- | perl/lib/Mail/Rspamd/Client.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perl/lib/Mail/Rspamd/Client.pm b/perl/lib/Mail/Rspamd/Client.pm index ca90b7421..d74484002 100644 --- a/perl/lib/Mail/Rspamd/Client.pm +++ b/perl/lib/Mail/Rspamd/Client.pm @@ -943,6 +943,7 @@ sub _do_rspamc_command { symbols => [], urls => [], messages => [], + action => 'reject', }; foreach my $line (@lines) { if ($line =~ /^Urls: (.+)$/) { @@ -979,6 +980,9 @@ sub _do_rspamc_command { my $symref = $metrics{$cur_metric}->{'messages'}; push(@$symref, $1); } + elsif ($line =~ /^Action: (.+)/ && $cur_metric) { + $metrics{$cur_metric}->{'action'} = $1; + } elsif ($line =~ /^${EOL}$/) { last; } |