rev 1966 - trunk/siesta/lib/Siesta/Plugin

[prev] [thread] [next] [lurker] [Date index for 2005/09/07]

From: simon
Subject: rev 1966 - trunk/siesta/lib/Siesta/Plugin
Date: 17:00 on 07 Sep 2005
Author: simon
Date: 2005-09-07 17:00:18 +0100 (Wed, 07 Sep 2005)
New Revision: 1966

Added:
   trunk/siesta/lib/Siesta/Plugin/Blacklist.pm
Log:
Add a blacklisting plugin


Added: trunk/siesta/lib/Siesta/Plugin/Blacklist.pm
===================================================================
--- trunk/siesta/lib/Siesta/Plugin/Blacklist.pm	2005-05-23 11:27:20 UTC (rev 1965)
+++ trunk/siesta/lib/Siesta/Plugin/Blacklist.pm	2005-09-07 16:00:18 UTC (rev 1966)
@@ -0,0 +1,24 @@
+package Siesta::Plugin::Blacklist;
+use strict;
+use Siesta::Plugin;
+use String::Random;
+use base 'Siesta::Plugin';
+
+sub description {
+    'A system plugin for blacklisting email addresses';
+}
+
+sub process {
+    my $self  = shift;
+    my $mail  = shift;
+
+   return 1 if grep {
+        $mail->from eq $_
+    } split ' ', $self->pref('blacklist');
+
+
+    return;
+}
+
+1;
+

Generated at 18:00 on 07 Sep 2005 by mariachi 0.52