You first submit a message to the perl prog, it does its stuff and happily exits
without doing something with the content
What if you open a pipe from the program to /usr/local/bin/ezmlm/ezmlm-send
'/home/list/test'?
something like
#!/usr/bin/perl
my $from = 'From: [EMAIL PROTECTED]';
my $list = 'To: [EMAIL PROTECTED]';
open PIPE, '|/usr/local/bin/ezmlm/ezmlm-send /home/list/test';
while (<>) {
s/From:\s.+$/$from/io;
s/To:\s.+$/$list/io;
print PIPE $_;
}
close PIPE;
On Thu, Mar 22, 2001 at 05:21:52AM -0500, Todd Finney wrote:
> 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.
There's more than one way to do 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
>
>
>
>
>
>
>
>
>
--
Kirill