You claim almost 100% reproduction, but your Perl script has multiple
errors, and you did not provide all the inputs to reproduce the
problem.
First, the Perl script.
1 - When I run the script in your email message, it does not compile.
$ perl your-script
syntax error at your-script line 5, near "0) "
syntax error at your-script line 6, near "; }"
2 - After I 'fix' that, the script logs an error when it adds a message header.
$ perl your-script
addheader: no header value
3 - The above error happens because the script has an undefined variable.
When I add a line with "use strict;", this is the warning:
$ perl your-script
Global symbol "@args" requires explicit package name (did you forget to
declare "my @args"?) at your-script line 16.
Can you provide the following:
- A script that reproduces the problem.
- The complete command line for running your script that reproduces
the problem.
- Complete Postfix SMTP server input that reproduces the problem,
and HOW that input is sent to the Postfix SMTP server.
For example, the problem does not reproduce when I store an entire
SMTP session with multiple messages in a file, and feed that with
netcat into Postfix (nc -w 5 127.0.0.1 25 <file).
Wietse