[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mailing list policy (stats)

On Tue, 27 Jan 1998, Igor Grobman wrote:

> > I'm afraid that someone who posts a user question to debian-devel
> > will get a lot of private e-mail telling him to go somewhere else
> > with his question. Wouldn't a message like "I told him, so don't
> > respond to this anymore" on debian-devel be appropriate? I know it
> > would be still more mail, but it would at least shorten a lot of
> > threads compared to the current situation.
> I suspect we'll see at least 5 of those each time :-). Maybe it's a   
> better idea to appoint a person (or 2) who would do this?             

if an alias on lists.debian.org called "dd-bounce" or similar was piped
into a script like the one below then anyone on debian-devel could just
bounce inappropriate messages to dd-bounce and it would be handled

this script mostly works. i.e. i've tested it's behaviour by making it
write to a logfile instead of piping to sendmail. it probably needs

it checks to see if the message was to debian-devel, and if so it checks to
see that it hasn't already seen the message before.  if it passes both those
tests then it bounces the message back to the user with an explanatory

the message text should be padded out with more helpful instructions,
maybe a reference to the web site, the irc channel, and any debian faqs.

---cut here---
#! /usr/bin/perl

# set unbuffered output
$|=1 ;

$daemon_address="MAILER-DAEMON\@lists.debian.org" ;

$sendmail="/usr/sbin/sendmail -t" ;
$msgidfile="/tmp/msgidfile" ;

open(SENDMAIL,"|$sendmail") || die "couldn't open pipe to sendmail: $!" ;

# suck stdin into @MSG
@MSG=(<>) ;

$header = 1;
#while (<>) {
foreach (@MSG) {
    last if (/^$/) ;
    $subject = $_ if (s/^Subject: (.*)\n/$1/);
    $from = $_ if (s/^From: (.*)\n/$1/);
    $to = $_ if (s/^To: (.*)\n/$1/);
    $msgid = $_ if (s/^Message-Id: (.*)\n/$1/);

# check that the message was sent to debian-devel
# exit code 64 from /usr/include/sysexits.h seems most appropriate.
#define EX_USAGE    64  /* command line usage error */

if (! $to =~ /.*debian-devel.*/ ) {
		print STDERR "\n\nThis bounce handler only works for messages
incorrectly posted to debian-devel\n\n"; 
		exit 64 ;

# check to see if we've seen this Message-Id before.
# exit code 69 seems sort of appropriate.
#define EX_UNAVAILABLE  69  /* service unavailable */

open(MSGIDS,"<$msgidfile") ;
while (<MSGIDS>) {
	if (/$msgid$/) {
		print STDERR "\n\nThis message has already been processed\n\n"; 
		exit 69 ;
open(MSGIDS,">>$msgidfile") ;
print MSGIDS "$msgid\n" ;
close(MSGIDS) ;

print SENDMAIL <<__EOF__;
To: $from
From: $daemon_address
Subject: $subject 

Your message to $to was incorrectly addressed.

it should have been sent to debian-user\@lists.debian.org

you should re-send it to debian-user if you want a reply.


foreach (@MSG) {
	chomp ;
	$header = 0 if (/^$/) ;
	next if ($header) ;
	print SENDMAIL "$_\n" ;
---cut here---

craig sanders

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: