From: Omar Polo Subject: Re: smtpd: require an error message on table-proc failure replies To: Omar Polo Cc: tech@openbsd.org Date: Wed, 22 May 2024 19:49:34 +0200 On 2024/05/22 19:43:12 +0200, Omar Polo wrote: > in retrospect I should have added a message for the `error' replies > since the beginning. To ease the transition don't make it mandatory > until we fix the external tables and release an update, but document it > so that it's clear that it is required. forgot to add, here's a small awk script to test this change. It'll return " failed" for update, check and lookup attempts. use it for example like this: table pwd "fail" action "local_mail" mbox alias userbase # ... #!/usr/bin/awk -f # /usr/local/libexec/smtpd/table-fail BEGIN { FS = "|" for (i = 0; i < ARGC; i++) ARGV[i] = "" } $1 == "config" && $2 == "ready" { print "register|alias" print "register|userinfo" print "register|ready" fflush } $5 == "update" { printf("%s-result|%s|error|%s failed\n", $5, $6, $5) } $5 == "check" { printf("%s-result|%s|error|%s failed\n", $5, $7, $5) } $5 == "lookup" { printf("%s-result|%s|error|%s failed\n", $5, $7, $5) } // { fflush }