Howdy, The following patch updates the mailing list subscription CGI script to correctly handle the debian-user-de list. It is large mainly because it obsoletes the Subscribe2 function, which I therefore removed.
Matt --- subscribe.pl.orig Mon Jul 2 13:04:40 2001 +++ subscribe.pl Mon Jul 2 13:07:59 2001 @@ -58,8 +58,8 @@ " to the following mailing lists:\n<UL>\n"; foreach (@subscribe) { if (/^debian-user-de$/) { - Subscribe2($user_email, 'debian-user-de', '[EMAIL PROTECTED]', ''); - print "<LI>".$_."[EMAIL PROTECTED]<BR>\n"; + Subscribe($user_email, '[EMAIL PROTECTED]', ''); + print "<LI>".$_."[EMAIL PROTECTED]<BR>\n"; } else { Subscribe($user_email, $_.'[EMAIL PROTECTED]', ''); @@ -74,8 +74,8 @@ " to the following mailing lists:\n<UL>\n"; foreach (@unsubscribe) { if (/^debian-user-de$/) { - Subscribe2($user_email, 'debian-user-de', '[EMAIL PROTECTED]', 'un'); - print "<LI>".$_."[EMAIL PROTECTED]<BR>\n"; + Subscribe($user_email, '[EMAIL PROTECTED]', 'un'); + print "<LI>".$_."[EMAIL PROTECTED]<BR>\n"; } else { Subscribe($user_email, $_.'[EMAIL PROTECTED]', 'un'); @@ -116,40 +116,6 @@ # some versions of sendmail might need the following line instead. # "\n\n".$subscribep."subscribe ".$mail_list."\n.\n"; @command = ("/usr/sbin/sendmail", "-f", $user_email, $mail_list); - - $pid = open(FILEHANDLE, "|-"); - if($pid) { # in parent - print FILEHANDLE $text; - } - else { # in child - exec @command; - } -} - -# same as above except it works on majordomo style mailing lists -sub Subscribe2 { - # user_email is the address of the subscriber - # mail_list is the subscription address of the mailing list - # subscribep is '' for subscription and 'un' for unsubscription - my ($user_email, $mail_list, $subscribe_address, $subscribep) = @_; - my (@command, $text); - my $pid; - - $text = "From: ".$user_email. - "\nTo: ".$subscribe_address. - "\nSender: ".$user_email. - "\nReturn-Path: ".$user_email. - "\nReply-To: ".$user_email. - "\nSubject: ".$subscribep."subscribe ".$mail_list. -# "\n\n".$subscribep."subscribe ".$mail_list."\n.\n"; - "\nX-Remote-IP: $ENV{'REMOTE_ADDR'}"; - $text .= "\nX-Remote-Host: $ENV{'REMOTE_HOST'}" if (exists $ENV{'REMOTE_HOST'}); - $text .= "\nX-Forwarded-For: $ENV{'HTTP_X_FORWARDED_FOR'}" if (exists $ENV{'HTTP_X_FORWARDED_FOR'}); - $text .= "\n\n".$subscribep."subscribe ".$user_email."\n\n"; - # some versions of sendmail might need the following line instead. - # "\n\n".$subscribep."subscribe ".$mail_list."\n.\n"; - # "\nErrors-To: ".$list_main. - @command = ("/usr/sbin/sendmail", "-f", $user_email, $subscribe_address); $pid = open(FILEHANDLE, "|-"); if($pid) { # in parent