On 01/26/20 01:01, Edgar Pettijohn wrote:
On Jan 26, 2020 12:11 AM, Martijn van Duren <opensm...@list.imperialat.at> 
On 1/25/20 8:50 PM, Edgar Pettijohn wrote:
I haven't seen any mention of this, but for some reason in my limited
"testing" of filters I have to use \r\n in my responses to smtpd. Is
this normal? Doesn't seem to be documented and what filters I've looked
at don't appear to be using \r\n.

For example without ORS = "\r\n" the following script will cause smtpd
to basically just hang. There is no errors reported, but when I attempt
to telnet localhost 25 the daemon doesn't greet me. After adding ORS =
"\r\n" everything works as expected.

#!/usr/bin/awk -f
           ARGC = 0
           FS = "|"
           OFS = FS
           ORS = "\r\n"

"config|ready" == $0 {
           print "register|report|smtp-in|*"
           print "register|ready"
           print $0 >> "/tmp/report.txt"

"config" == $1 {

"report" == $1 {
           print $0 >> "/tmp/report.txt"

I tried both your awk script without ORS and perl script a
OpenBSD-current machine and both work as expected. So either there's
something weird in -portable or there's something weird with your

I don't have a NetBSD machine at hand, so could you provide me shell-
access to a machine that can reproduce this problem? I can probably
take a look at it in the coming week.
Will do. I'll spin one up and get it ready for you tomorrow hopefully.



Must be a local issue to my laptop. I spun up a server at vultr and got everything ready. Then tested and it works both with and without the /r/n. I don't understand what the difference is between my laptop and the server. Either way it appears to be resolved.



Reply via email to