In main() mail.lmtp checks 'if (argc == 0 && session.rcptto == NULL)' after getopt(). If neither an 'r' nor an 'u' option was specified, 'session.rcptto' seems to be uninitialized. The obvious solution would be to NULL initialize 'struct session'.
ok? Index: mail.lmtp.c =================================================================== RCS file: /mount/openbsd/cvs/src/usr.sbin/smtpd/mail.lmtp.c,v retrieving revision 1.12 diff -u -p -r1.12 mail.lmtp.c --- mail.lmtp.c 2 Feb 2020 22:13:48 -0000 1.12 +++ mail.lmtp.c 16 Mar 2020 22:40:22 -0000 @@ -57,7 +57,7 @@ main(int argc, char *argv[]) int ch; int conn; const char *destination = "localhost"; - struct session session; + struct session session = { 0 }; if (! geteuid()) errx(EX_TEMPFAIL, "mail.lmtp: may not be executed as root");