/[pkg-listmaster]/trunk/archive-spam-removals/cgi-bin/spam-report.pl
ViewVC logotype

Contents of /trunk/archive-spam-removals/cgi-bin/spam-report.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 405 - (show annotations) (download)
Sun Apr 8 20:55:08 2012 UTC (13 months, 2 weeks ago) by cord
File MIME type: text/plain
File size: 3176 byte(s)
* removed http://lists.debian.org so we don't jump between http and https
1 #!/usr/bin/perl -wT
2
3 require 5.001;
4 use strict;
5 use CGI;
6
7 umask 002;
8
9 my $input = new CGI;
10
11 # sanity checks
12 my $sane = 1;
13 # list name could be tighter: only lowercase or only existing list
14 $sane &&= ($input->param('listname') =~ /^[0-9a-z\-]+$/);
15 $sane &&= ($input->param('date') =~ /^\d{4}\/(\d{2})?$/);
16 $sane &&= ($input->param('msg') =~ /^msg\d+\.html$/);
17
18 my $message;
19 my $title;
20
21 if ($sane) {
22 # log all connections that present sane input
23 my $logfile = '/org/lists.debian.org/spam-log/spam-report.log';
24 open (LOG, ">>$logfile") ;
25 my $time = time;
26 print LOG "time: $time; ";
27 #if (exists $ENV{'REMOTE_HOST'}) {
28 # print LOG "host: $ENV{'REMOTE_HOST'}; addr: $ENV{'REMOTE_ADDR'} sub_cnt: $#subscribe unsub_cnt: $#unsubscribe: email: $user_email\n";
29 #} else {
30 print LOG "addr: $ENV{'REMOTE_ADDR'}; list: ".$input->param('listname').", date: ".$input->param('date').", msg: ".$input->param('msg')."\n";
31 #}
32 close LOG;
33 $message = <<SUCCESS
34 <h2>Report accepted</h2>
35 <p>
36 Thank you for reporting this email as a potential spam message. Scores are reviewed regularly, and are used to mark emails as spam.
37 </p>
38 SUCCESS
39 ;
40 $title = 'Email status recorded';
41 }
42 else {
43 $message = <<ERRMSG
44 <h2>An error occurred</h2>
45 <p>
46 Unfortunately, your report could not be recorded. Please try again or contact the listmasters.
47 </p>
48 ERRMSG
49 ;
50 }
51 print $input->header;
52 print $input->start_html(-title=>$title, -style=>{ -src => ['http://www.debian.org/debian.css','http://www.debian.org/debian-en.css']});
53 print <<BLAH
54 <div id="header">
55 <div id="upperheader">
56 <div id="logo">
57 <a href="/"><img src="/Pics/openlogo-50.png" width="50" height="61" alt=""></a>
58 </div> <!-- end logo -->
59 </div> <!-- end upperheader -->
60 <!--UdmComment-->
61 <div id="navbar">
62 <p class="hidecss"><a href="#inner">Skip Quicknav</a></p>
63 <ul>
64 <li><a href="http://www.debian.org/intro/about">About Debian</a></li>
65 <li><a href="http://www.debian.org/distrib/">Getting Debian</a></li>
66 <li><a href="http://www.debian.org/support">Support</a></li>
67 <li><a href="http://www.debian.org/devel/">Developers'&nbsp;Corner</a></li>
68 </ul>
69 </div> <!-- end navbar -->
70 <p id="breadcrumbs"><a href="/">mailing lists </a>/ Spam Report accepted </p>
71 </div> <!-- end header -->
72
73 <div id="content">
74 <div class="index_include">
75
76
77 $message
78 <p><hr noshade width="100%" size="1">
79
80 Back to:
81 <a href="http://www.debian.org/">Debian Project homepage</a> ||
82
83 <a href="/">Debian mailing lists</a>
84
85 <hr noshade width="100%" size="1">
86
87 <p><small>You may <a href="http://www.debian.org/Bugs/Reporting">submit bugs</a>
88 against the list archives using the
89 <a href="http://bugs.debian.org/listarchives"><var>listarchives</var>
90 pseudo-package</a> or contact the maintainer at
91 <a href="mailto:listarchives\@debian.org">listarchives\@debian.org</a>.
92 The scripts which generate the archives are
93 <a href="http://packages.debian.org/unstable/web/lists-archives.html">available</a>
94
95 under the GPL.</small></p>
96
97 <p><small>See the Debian <a href="http://www.debian.org/contact">contact
98 page</a> for further information on contacting us.</small></p>
99 </div>
100 </div>
101 BLAH
102 ;
103 print $input->end_html;
104 exit 0;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5