Seems the solution is very
simple - postfix doesn't care if the pipe closes before reading all
input, so a
$string .= $_ while
(<STDIN> && $lines++<100) will do the trick.
On 1/21/10 2:11 PM, Razvan Cosma wrote:
Hello,
I have a Postfix daemon that handles just one task - receive bounces
(user not found, autoresponders, temporary server errors). It simply
pipes all messages to a "| usr/local/bin/script.pl". The reason I don't
have the Perl app listening on port 25 itself is SPAM and other attacks
that Postfix handles very well. My question is: can I instruct it to
truncate all incoming messages to a byte limit? I don't care about the
actual message contents after 1000 bytes or so where I should find the
reason of the bounce.
|