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.


echo "register|report|smtp-in|*" 
echo "register|ready"

while read -r line;
        echo "$line" >> /tmp/test.txt

However, the perl and lua equivalents do nothing. I don't see anything in the 
logs, but not sure if any filtering causes log entries to begin with. I suppose 
I could just use perl in my shell script, but overall it would be better for 
the perl to just work. I don't have much experience with lua, just wanted to 
test something else when I couldn't get perl working. I also tested the 
filter-eventlog and the filters Joerg posted. All of which worked in my very 
basic testing/experimenting. Thanks in advance for any help.



open (my $fh, '>', '/tmp/test.txt') or die $!;

print "register|report|smtp-in|*\n";
print "register|ready\n";

while ( <> ) {
        print $fh;




out = io.open("/tmp/test.txt", "w")

while true do
        local line = io.read("*line")
        if line == nil then break end

You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to