lib/Exim/Grey.pm
changeset 69 0f66e8a1364a
parent 68 8bc711bdd180
child 70 bb6af74ba8b2
equal deleted inserted replaced
68:8bc711bdd180 69:0f66e8a1364a
     4 use strict;
     4 use strict;
     5 use warnings;
     5 use warnings;
     6 use base 'Exporter';
     6 use base 'Exporter';
     7 use Carp;
     7 use Carp;
     8 
     8 
     9 our @EXPORT_OK   = qw(unseen getDBDir connectDB getDefault);
     9 our @EXPORT_OK   = qw(unseen seen getDBDir connectDB getDefault);
    10 our %EXPORT_TAGS = (all => \@EXPORT_OK,);
    10 our %EXPORT_TAGS = (all => \@EXPORT_OK,);
    11 our $VERSION     = '2.0';
    11 our $VERSION     = '2.0';
    12 
    12 
    13 # You may choose, but DB_File's footprint is smaller.
    13 # You may choose, but DB_File's footprint is smaller.
    14 # perl -MDB_File -e 'tie %h, ...':	real    0m0.063s
    14 # perl -MDB_File -e 'tie %h, ...':	real    0m0.063s
    66     # we know the client, was patiently enough
    66     # we know the client, was patiently enough
    67     ++$count;
    67     ++$count;
    68     $h{$key} = "$created $now $count\0";
    68     $h{$key} = "$created $now $count\0";
    69     whitelist($auto, \%h) if defined $auto;
    69     whitelist($auto, \%h) if defined $auto;
    70     return 'no';
    70     return 'no';
       
    71 }
       
    72 
       
    73 sub seen {
       
    74     return(unseen(@_) eq 'yes' ? 'no' : 'yes');
    71 }
    75 }
    72 
    76 
    73 # According to a thought from "David Woodhouse <dwmw2@infradead.org>"
    77 # According to a thought from "David Woodhouse <dwmw2@infradead.org>"
    74 # on exim-users@exim.org (Thu, 08 May 2008 13:10:21 +0100,
    78 # on exim-users@exim.org (Thu, 08 May 2008 13:10:21 +0100,
    75 # Message-Id: <1210248621.25560.1088.camel@pmac.infradead.org>) we
    79 # Message-Id: <1210248621.25560.1088.camel@pmac.infradead.org>) we