I've been thrashing at this for a couple of hours, and I'm starting to 
wonder if I'm even on the right track.

The short question:
I'd like to strip a few headers from messages sent to a particular 
address, for the purpose of setting up a anonymous remailer for a 
mailing list.  I have a small perl script that I think should do this, 
but it isn't working.   Is this possible without qmail-filter?  It 
seems like it should be, but I'm starting to doubt it.


The longer question:
I have set up the appropriate .qmail file, which points to a file 
inside DIR called anonymizer.  Inside that file is:

|/usr/local/bin/ezmlm/anonymizer.pl
|/usr/local/bin/ezmlm/ezmlm-send '/home/list/test'

anonymizer.pl, in its barest form, is this:

#!/usr/bin/perl
my $from = 'From: [EMAIL PROTECTED]';
my $list = 'To: [EMAIL PROTECTED]';
while (<>) {
     s/From:\s.+$/$from/o;
     s/To:\s.+$/$list/o;
}
exit 0;

I have confirmed that the messages are actually hitting the script by 
changing the exit code to 100 and catching the bounce.

The script works as expected from the command line:

[alias@sonata alias]$ /usr/local/bin/ezmlm/anonymizer.pl
here
here
From: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

However, messages sent to that test-anonymizer@ address come through 
with neither header altered.

Can someone put me on the right track?

thanks,
Todd









Reply via email to