#!/usr/bin/perl
-# $Id: receive.in,v 1.12 2002/01/06 10:46:24 ajt Exp $
+# $Id: receive.in,v 1.17 2005/07/24 18:42:41 don Exp $
# usage: mail is piped directly into program
#set umask in order to have group-writable incoming/*
#umask(002);
-#load configuration file
-$config_path = '/org/bugs.debian.org/etc';
-#$lib_path = '/org/bugs.debian.org/scripts';
+use Debbugs::Config qw(:globals :text);
+my $lib_path = $gLibPath;
-require "$config_path/config";
-$ENV{'PATH'} = '/org/bugs.debian.org/scripts:'.$ENV{'PATH'};
+$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'};
#set source of mail delivery
#sets any prefix needed to get mailer to add it to error mail
s/\>//;
s/\<//;
}
-require("/etc/debbugs/text");
#remove everything from @ to end of line
s/\@.*$//;
'-maintonly', 'M',
'-quiet', 'Q',
'-forwarded', 'F',
- '-fixed', 'X',
'-done', 'D',
'-close', 'D',
'-request', 'R',
- '-submitter', 'U');
+ '-submitter', 'U',
+ # Used for bug subscription
+ #'-list-nothing-will-match-this', 'L',
+ );
%withpkgaddressmap= ('-request', 'R');
#determine command
if (s/^(\d{1,9})\b//) {
$bugnumber= $1;
- $map= $withbugaddressmap{$_};
+ if (not exists $withbugaddressmap{$_} and
+/-(?:(?:un)?subscribe|subhelp|help|ignore|(?:sub(?:yes|approve|reject)
+ |unsubyes|bounce|probe|approve|reject|
+ setlistyes|setlistsilentyes).*)/x
+ ) {
+ $map = 'L';
+ }
+ else {
+ $map= $withbugaddressmap{$_};
+ }
$addrrec= "$bugnumber$_";
} elsif (s/^(\w+)-//) {
$bugnumber= $1;
$gBadEmailPrefix
$gBadEmailPrefix For instructions via the WWW see:
$gBadEmailPrefix http://$gWebDomain/
-$gBadEmailPrefix http://$gWebDomain/Reporting.html
-$gBadEmailPrefix http://$gWebDomain/Developer.html
-$gBadEmailPrefix http://$gWebDomain/Access.html
+$gBadEmailPrefix http://$gWebDomain/Reporting$gHTMLSuffix
+$gBadEmailPrefix http://$gWebDomain/Developer$gHTMLSuffix
+$gBadEmailPrefix http://$gWebDomain/Access$gHTMLSuffix
$gTextInstructions
$gBadEmailPrefix For details of how to access $gBug report logs by email:
$gBadEmailPrefix send \`request\@$gEmailDomain' the word \`help'
while(<STDIN>) { print(FILE) || &failure("write temporary file: $!"); }
close(FILE) || &failure("close temporary file: $!");
-rename("T.$id","I$queue.$id") || &failure("rename spool message: $!");
+my $prefix;
+if ($gSpamScan) {
+ $prefix = 'S';
+} else {
+ $prefix = 'I';
+}
+rename("T.$id","$prefix$queue.$id") || &failure("rename spool message: $!");
exit(0);