$__KAM_LOTTO6="/(Dear Lucky Winner|Winning Notification|Attention:Winner|Dear Winner)/isrP";
$__KAM_LOTTO7="Subject=/(Your Lucky Day|(Attention:|ONLINE) WINNER)/iH";
$KAM_LOTTO1="regexp_match_number(3, ${__KAM_LOTTO1}, ${__KAM_LOTTO2}, ${__KAM_LOTTO3}, ${__KAM_LOTTO4}, ${__KAM_LOTTO5}, ${__KAM_LOTTO6}, ${__KAM_LOTTO7})";
-#$R_LOTTO="regexp_match_number(3, ${__KAM_LOTTO1}, ${__KAM_LOTTO2}, ${__KAM_LOTTO3}, ${__KAM_LOTTO4}, ${__KAM_LOTTO5}, ${__KAM_LOTTO6})";
+$R_LOTTO="regexp_match_number(3, ${__KAM_LOTTO1}, ${__KAM_LOTTO2}, ${__KAM_LOTTO3}, ${__KAM_LOTTO4}, ${__KAM_LOTTO5}, ${__KAM_LOTTO6})";
package Mail::Rspamd::Client;
use IO::Socket;
+use Carp;
use vars qw($VERSION);
$VERSION = "1.02";
eval {
require IO::Socket::SSL;
IO::Socket::SSL->import(LIST);
- } or$self->{error} = "IO::Socket::SSL required for imaps";
+ } or croak "IO::Socket::SSL required for imaps";
return IO::Socket::SSL->new("$host:$port");
}
The return value is a hash reference containing metrics indexed by name. Each metric
is hash that contains data:
+
=over
=item *
isspam
The return value is a hash reference containing metrics indexed by name. Each metric
is hash that contains data:
+
=over
=item *
isspam
chomp $password;
Term::ReadKey->ReadMode('normal');
$self->{error} = "\n";
- } or die "cannot get password. Check that Term::ReadKey is installed";
+ } or croak "cannot get password. Check that Term::ReadKey is installed";
}
# Stupid code that does not take care of timeouts etc, just trying to extract messages
'deliver_to'=> '',
'weight' => 1,
'imap_search' => 'ALL',
+ 'ip' => '127.0.0.1',
);
my $terminal;
-d define deliver-to header
-w define weight for fuzzy operations
-S define search string for IMAP operations
+-i emulate that message was send from specified IP
Notes:
imap format: imap:user:<username>:password:[<password>]:host:<hostname>:mbox:<mboxname>
HELP_MESSAGE() unless scalar @ARGV >= 1;
-getopt('c:h:P:s:d:w:S:H:', \%args);
+getopt('c:h:P:s:d:w:S:H:i:', \%args);
my $cmd = shift;
my @path = shift;
if (defined ($args{w})) {
$cfg{'weight'} = $args{w};
}
+if (defined ($args{i})) {
+ $cfg{'ip'} = $args{i};
+}
if ($cmd =~ /(SYMBOLS|PROCESS|CHECK|URLS|EMAILS)/i) {
$cfg{'command'} = $1;
cb->rec->addrs->prev = elt->prev;
}
+ /* Shift temporary list */
+ while (tmp->prev) {
+ tmp = tmp->prev;
+ }
+
cb->rec->addrs = tmp;
g_list_free1 (elt);
}
cb->rec->task->save.saved--;
if (cb->rec->task->save.saved == 0 && cb->rec->callback) {
+ cb->rec->callback (cb->rec, cb->rec->task);
if (cb->rec->addrs) {
- cb->rec->callback (cb->rec, cb->rec->task);
g_list_free (cb->rec->addrs);
cb->rec->addrs = NULL;
}