How do i read STDIN from sendmail ?
i'm trying to pipe the message through the sendmail alias file like:
help: |/usr/local/bin/help.pl
All attemps to read are failed, like:
#!/usr/binperl
while (<STDIN>) {
#....
}
#or simply
print <STDIN>;
#or trying Mail::Message
my $msg = Mail::Message->read(\*STDI
N);
the messag is always:
Mar 5 23:54:01 mail sm-mta[14609]: m25MrwNS014595: SYSERR(root): putbody: write error: Broken pipe
...
...
Mar 5 23:54:01 mail sm-mta[14609]: m25MrwNS014595: m25Ms1NS014609: DSN: unknown mailer error 2
could somebody help to point me to thr right track ?
Start Free Trial