/[cvs]/gateway/.dispatchmailrc
ViewVC logotype

Annotation of /gateway/.dispatchmailrc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Sun Mar 23 21:15:41 2003 UTC (21 years, 2 months ago) by gateway
Branch: MAIN
Changes since 1.1: +49 -1 lines
major update

1 gateway 1.1 package rules;
2    
3     use strict;
4     # don't use warnings;
5    
6    
7     my $mc = 0;
8     sub mark {
9     $mc++;
10     #report("mark $mc");
11     }
12    
13     sub dispatch {
14    
15     my $self = shift;
16    
17     my $incoming = $self->{incoming};
18     my $MAILDIR = $self->{settings}->{MAILDIR};
19    
20     my $from = $incoming->from;
21     my $to = $incoming->to;
22     my $subject = $incoming->subject;
23    
24     chomp($from);
25     chomp($to);
26     chomp($subject);
27    
28     # -----
29     # target-based-routing (gateway to news in this case...)
30 gateway 1.2
31     print "to: $to", "\n";
32    
33    
34     # --- @netfrag.org
35    
36 gateway 1.1 if ($to =~ /links-computing/) {
37     print "COPY", "\n";
38     #$self->copy('Newsgate', 'alt.test');
39     $self->copy('Newsgate', 'nfo.links.computing');
40     #my $prg = $0;
41     #my $prg = '/data/opt/dispatchmail/bin/dispatchmail';
42     #my $prg = '/etc/mail/smrsh/dispatchmail';
43     #my $pipeTo = $prg . ' --mode=mail2news --thread=alt.test --base=/home/collector';
44     #$self->report("PIPE: " . $pipeTo);
45     #$incoming->pipe($pipeTo);
46     }
47    
48 gateway 1.2 # cvs-log@netfrag.org
49     $self->copy('Newsgate', 'nfo.log.cvs') if $to =~ m/cvs-log\@.*netfrag\.org/;
50    
51     # faq@netfrag.org
52     $self->copy('Newsgate', 'nfo.support.faq') if $to =~ m/faq\@.*netfrag\.org/;
53    
54     # caesar@netfrag.org - Collaborative And Easy System ARchitecture
55     $self->copy('Newsgate', 'nfo.caesar') if $to =~ m/caesar\@.*netfrag\.org/;
56    
57     # support@netfrag.org
58     #$self->copy('Newsgate', 'nfo.support') if $to =~ m/support\@.*netfrag\.org/;
59    
60     # links-misc@netfrag.org
61     $self->copy('Newsgate', 'nfo.links.misc') if $to =~ m/links-misc/;
62    
63     # links-php@netfrag.org
64     $self->copy('Newsgate', 'nfo.dev.php') if $to =~ m/links-php/;
65    
66     # dev-php@netfrag.org
67     $self->copy('Newsgate', 'nfo.dev.php') if $to =~ m/dev-php/;
68    
69     # sysadmin-debian@netfrag.org
70     $self->copy('Newsgate', 'nfo.sysadmin.debian') if $to =~ m/sysadmin-debian/;
71    
72     # sysadmin@netfrag.org
73     # TODO: investigate this from the workflow point:
74     # this could act as a dispatcher to the timetracker for certain topic-hierarchies
75     $self->copy('Newsgate', 'nfo.sysadmin.tutos') if $to =~ m/sysadmin\@.*netfrag\.org/;
76    
77    
78     # --- @service.netfrag.org
79    
80     # alert@service.netfrag.org
81     # TODO: branch part of msg to sms here!!!
82     $self->copy('Newsgate', 'nfo.support') if $to =~ m/alert\@service\.netfrag\.org/;
83     $self->copy('Newsgate', 'nfo.support') if $to =~ m/.*\@h1\.service\.netfrag\.org/;
84    
85    
86    
87     # --- ignore (all above get *copied*)
88    
89 gateway 1.1 $self->ignore();
90     #$self->accept("$MAILDIR/Inbox");
91    
92     }
93    
94     1;
95 gateway 1.2 __END__
96    

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