Turned out to be a line buffering issue. The following works.
#!/usr/bin/perl
open(my $fh, '>', '/tmp/test.txt');
select(STDOUT);
$|++;
select($fh);
$|++;
print STDOUT "register|report|smtp-in|*\n";
print STDOUT "register|ready\n";
while ( my $line = <> ) {
print $fh "$line";
}
close
hello,
as it's not relatted to opensmtp, i don't know if replying is ok. please
let me know if it wasn't.
> Here is a basic shell script that works.
#!/bin/sh
echo "register|report|smtp-in|*"
echo "register|ready"
while read -r line;
do
echo "$line" >> /tmp/test.txt
I've been playing around with filters for a few hours, but I can't seem to get
perl or lua scripts to work.
Here is a basic shell script that works.
#!/bin/sh
echo "register|report|smtp-in|*"
echo "register|ready"
while read -r line;
do
echo "$line" >> /tmp/test.txt
done
However, the