From 971bad45c44cf430bde13faede56699ba0381e83 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 26 Apr 2010 17:50:13 +0400 Subject: * Add ability to pass all filters by using flag -p in case of rspamc or adding header Pass: all in rspamc protocol --- perl/lib/Mail/Rspamd/Client.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'perl/lib/Mail') diff --git a/perl/lib/Mail/Rspamd/Client.pm b/perl/lib/Mail/Rspamd/Client.pm index 5945680f1..529a2bf9b 100644 --- a/perl/lib/Mail/Rspamd/Client.pm +++ b/perl/lib/Mail/Rspamd/Client.pm @@ -94,6 +94,9 @@ sub new { else { $self->{weight} = 1; } + if ($args->{pass_all}) { + $self->{pass_all} = 1; + } if ($args->{imap_search}) { $self->{imap_search} = $args->{imap_search}; } @@ -868,6 +871,7 @@ sub _do_rspamc_command { syswrite $remote, "From: $self->{from}$EOL" if ($self->{from}); syswrite $remote, "IP: $self->{ip}$EOL" if ($self->{ip}); syswrite $remote, "Subject: $self->{subject}$EOL" if ($self->{subject}); + syswrite $remote, "Pass: all$EOL" if ($self->{pass_all}); if (ref $self->{rcpt} eq "ARRAY") { foreach ($self->{rcpt}) { syswrite $remote, "Rcpt: $_ $EOL"; -- cgit v1.2.3