#!/usr/bin/perl -w
@MAILOPTS = ("-oi", "-t");
while ( <> ) {
$cuerpo .= $_;
}
$cuerpo =~ s/domain.com/domain.com.ve/gi;
open(MAIL, "|-") || exec("/usr/sbin/sendmail", @MAILOPTS);
print MAIL $cuerpo;
close(MAIL);
The problem is that sending again the mail creates a loop, how can I
avoid it?.
Thanks.
Resolved, I created a chroot postfix, in the main postfix I set
transport maps for external mail to chroot postfix. In the chroot I
set smtp generics maps to some address. That's all.