/[cvs]/nfo/perl/scripts/dispatchmail/etc/.dispatchmailrc-gateway
ViewVC logotype

Annotation of /nfo/perl/scripts/dispatchmail/etc/.dispatchmailrc-gateway

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Jan 30 23:38:00 2003 UTC (21 years, 5 months ago) by root
Branch: MAIN
CVS Tags: HEAD
+ initial commit

1 root 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     print "to: $to", "\n";
31     if ($to =~ /links-computing/) {
32     print "COPY", "\n";
33     #$self->copy('Newsgate', 'alt.test');
34     $self->copy('Newsgate', 'nfo.links.computing');
35     #my $prg = $0;
36     #my $prg = '/data/opt/dispatchmail/bin/dispatchmail';
37     #my $prg = '/etc/mail/smrsh/dispatchmail';
38     #my $pipeTo = $prg . ' --mode=mail2news --thread=alt.test --base=/home/collector';
39     #$self->report("PIPE: " . $pipeTo);
40     #$incoming->pipe($pipeTo);
41     }
42    
43     # cvs-log@netfrag.org
44     $self->copy('Newsgate', 'nfo.log.cvs') if $to =~ m/cvs-log\@.*netfrag\.org/;
45    
46     # sysadmin@netfrag.org
47     $self->copy('Newsgate', 'nfo.sysadmin.tutos') if $to =~ m/sysadmin\@.*netfrag\.org/;
48    
49     # faq@netfrag.org
50     $self->copy('Newsgate', 'nfo.support.faq') if $to =~ m/faq\@.*netfrag\.org/;
51    
52     # caesar@netfrag.org - Collaborative And Easy System ARchitecture
53     $self->copy('Newsgate', 'nfo.caesar') if $to =~ m/caesar\@.*netfrag\.org/;
54    
55     $self->ignore();
56     #$self->accept("$MAILDIR/Inbox");
57    
58     }
59    
60     1;

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