On Sun, Feb 22, 2004 at 09:01:27AM -0600, Peter Eisch wrote: > sub rewrite { > my $self = shift; > my $was = shift; > my $qacct = $self->{_args}->{redirect_addr} || 'spamq'; > > return $qacct > if $qacct =~ /\@/; > > $was =~ s/([\w\.\-\_]+)\@/$qacct\@/g; > return $was; > } > > Which gets called from: > > ... > foreach my $adr ( $transaction->recipients() ) { > my $old = $adr->address(); > $adr->address($self->rewrite($old)); > } > ...
This is okay, but for a five-recipient email you're going to get five copies of the email in your spamq mailbox - being able to do a: $transaction->recipients($spamq) and having the entire recipient list replaced seems a much nicer outcome to me. Cheers, Gavin