#! /usr/bin/perl -w # Perl routine: makeanonymous.pl 17 August 1999. # This script deletes all headers except some recognized headers # It may provide anonymity # For use with a mailing list Sympa, http://listes.cru.fr/sympa/ (or others) # By anonymous : !! not tested at all. For support contact Sympa use strict; my($insideheaders, $buf) = (1, ""); # uncomment next line if debugging # open(STDOUT, "| /home/sympa/bin/queue sympa"); # pipe output into Sympa Mailing List while (1) { $buf = ; if (not defined $buf) { last; } if (not $insideheaders) { goto DoPrint; }; if ($buf =~ /^\s*$/) { $insideheaders = 0; goto DoPrint; }; if (not ($buf =~ # /si means ignore case, include new lines # Continued 'Received:' lines start with spaces /^(Subject|X-Sympa-To|X-Mailer|Date|To|Subject|Mime-Version|Content-Type):/isx )) { goto DontPrint; }; DoPrint: print $buf; DontPrint: } if ($insideheaders) { print "\n\nNo message body after a empty line was detected by the Perl\n"; print " anonymising filter. This version of the filter script deletes\n"; print " message bodies when no blank line is found between the headers\n"; print " and the message body.\n"; } #-------------------- #[sympa:~/spool/$ cat ./msg/BAD-alliance-news.939828867.3233 #X-Sympa-To: alliance-news #Received: from chirpy (ip-203-98-35-26.strongnet.co.nz [203.98.35.26]) # by ns1.strongnet.co.nz (8.9.3/8.9.3) with SMTP id EAA03231 # for ; Thu, 14 Oct 1999 04:34:25 +1300 #Message-Id: <4.1.19991014053246.00a6be40@203.98.35.3> #X-Sender: a02@210.55.107.49 #X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 #Date: Thu, 14 Oct 1999 05:32:54 +1300 #To: alliance-news@ns1.strongnet.co.nz #From: a02 #Subject: a02 b2 (test that alliance-news prohibits public seding) #Mime-Version: 1.0 #Content-Type: text/plain; charset="us-ascii" # #confirm ec44dce89bb0920c36edc800db13654d