- open(PIPE, '|'.$aliases{$recipient})
- or return(0, 451, "Can't fork: $!" );
- print PIPE $$data
- or return(0, 451, "Can't write to pipe: $!" );
- close PIPE
- or return(0, 451, "Can't close: status=$?" );
-
+ my $result = eval { run $aliases{$recipient}, $data };
+ if (!$result) {
+ syslog('info', "pipe command failed: $@");
+ return(0, 451, "pipe command failed: $@");
+ }