/[cvs]/nfo/perl/scripts/dispatchmail/bin/dispatchmail
ViewVC logotype

Contents of /nfo/perl/scripts/dispatchmail/bin/dispatchmail

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Wed Jan 22 17:50:56 2003 UTC (21 years, 11 months ago) by root
Branch: MAIN
Changes since 1.3: +25 -202 lines
- refactored most code to Mail::Audit::Dispath

1 #!/usr/bin/perl
2
3 # ============================================================
4 #
5 # dispatchmail v0.05
6 # A simple mail filter done in perl
7 # with the Perl-module "Mail::Audit"
8 # available from CPAN.
9 #
10 # $Id: dispatchmail,v 1.3 2003/01/22 07:16:51 root Exp $
11 #
12 # ============================================================
13 # $Log: dispatchmail,v $
14 # Revision 1.3 2003/01/22 07:16:51 root
15 # + sub traceEntry
16 # + further refactorings
17 #
18 # Revision 1.2 2003/01/22 05:38:44 collector
19 # + prepared refactoring to 'dispatchmail'
20 #
21 # ============================================================
22
23 use strict;
24 # don't use warnings;
25
26 use Data::Dumper;
27 use Getopt::Long;
28 use Hash::Merge qw( merge );
29
30 use lib qw( /data/libs/nfo/perl/libs );
31 use Mail::Audit::Dispatch;
32
33
34 # - - - - - - - - - - - - - - - - - - - -
35 # options
36 # - - - - - - - - - - - - - - - - - - - -
37
38 my $defaults = {
39 LOG => 1, # writes reports to logfile
40 VERBOSE => 1, # writes reports to STDOUT
41 TRACE => 1, # writes contents of messages to logfile
42 };
43
44 my $args;
45 GetOptions(
46 'user=s' => \$args->{user},
47 'base=s' => \$args->{base},
48 'rules=s' => \$args->{rules},
49 );
50
51 my $args_dispatch = merge($defaults, $args);
52
53 #print Dumper($args_dispatch);
54 #exit;
55
56 my @args_array = %$args_dispatch;
57 my $dispatcher = Mail::Audit::Dispatch->new(@args_array);
58 $dispatcher->run();
59
60 1;

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed