Re: Virtual User handling
On Sat, Sep 07, 2019 at 11:53:58AM +0200, Ede Wolf wrote: > > > So it is a binary, thats useful information. Having specified /opt/smtpd > > > as prefix during ./configure, it is located here: > > > > > > /opt/smptd/libexec/opensmtpd/mail.lmtp > > > > > > > Throw it in /usr/local/libexec/smtpd/ and see what happens. May be a build > > tools bug. > > > > Excellent idea, however, the error stays the same. No change, despite > copying the whole opensmtpd folder to /usr/local/libexec > > > Even strace does not reveal the path it is looking for: > > > expand: 0x56284c3f4338: expand_insert() called for > address:m...@example.com[parent=(nil), rule=(nil)] > expand: 0x56284c3f4338: inserted node 0x56284c3f6030 > expand: lka_expand: address: m...@example.com [depth=0] > lookup: match "37.120.186.114" as NETADDR in table static: -> true > lookup: match "example.com" as DOMAIN in table static: -> true > rule #1 matched: match from any for domain action deliver > lookup: lookup "m...@example.com" as ALIAS in table static:vusers -> none > lookup: lookup "mary" as ALIAS in table static:vusers -> none > lookup: lookup "@example.com" as ALIAS in table static:vusers -> none > lookup: lookup "@" as ALIAS in table static:vusers -> "lmtpd" > expand: 0x56284c3f3b10: expand_insert() called for > username:lmtpd[parent=(nil), rule=(nil)] > expand: 0x56284c3f3b10: inserted node 0x56284c3f6590 > expand: 0x56284c3f4338: expand_insert() called for > username:lmtpd[parent=0x56284c3f6030, rule=0x56284c403e50, > dispatcher=0x56284c405750] > expand: 0x56284c3f4338: inserted node 0x56284c3f6af0 > expand: 0x56284c3f3b10: clearing expand tree > expand: 0x56284c3f3b10: freeing expand tree > debug: aliases_virtual_get: '@example.com' resolved to 1 nodes > expand: lka_expand: username: lmtpd [depth=1, sameuser=0] > lookup: lookup "lmtpd@" as ALIAS in table static:vusers -> none > lookup: lookup "lmtpd" as ALIAS in table static:vusers -> none > lookup: lookup "@" as ALIAS in table static:vusers -> "lmtpd" > expand: 0x56284c3ed110: expand_insert() called for > username:lmtpd[parent=(nil), rule=(nil)] > expand: 0x56284c3ed110: inserted node 0x56284c3f6590 > expand: 0x56284c3f4338: expand_insert() called for > username:lmtpd[parent=0x56284c3f6af0, rule=0x56284c403e50, > dispatcher=0x56284c405750] > expand: 0x56284c3f4338: setting sameuser = 1 > expand: 0x56284c3f4338: inserted node 0x56284c3f7050 > expand: 0x56284c3ed110: clearing expand tree > expand: 0x56284c3ed110: freeing expand tree > debug: aliases_virtual_get: '@' resolved to 1 nodes > expand: lka_expand: username: lmtpd [depth=2, sameuser=1] > lookup: lookup "lmtpd" as USERINFO in table getpwnam: -> > "115:115:/opt/smptd/var/lmtpd" > [{EPOLLIN, {u32=6, u64=6}}], 32, -1) = 1 > epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffeb16e607c) = 0 > socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 12 > socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 13 > close(12) = 0 > close(13) = 0 > recvmsg(6, {msg_name=NULL, msg_namelen=0, > msg_iov=[{iov_base="4\0\0\0(\21\0\0\0\0\0\0\237\25\0\0[\300\213\3725\333\374!\0lmtpd\0\0"..., > iov_len=65535}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4392 > stat("/opt/smptd/var/lmtpd", {st_mode=S_IFDIR > openat(AT_FDCWD, "/opt/smptd/var/lmtpd/.forward", O_RDONLY > epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN > epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffeb16e5fdc) = 0 > epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN > epoll_wait(3, [{EPOLLOUT, {u32=6, u64=6}}], 32, -1) = 1 > epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffeb16e607c) = 0 > sendmsg(6, {msg_name=NULL, msg_namelen=0, > msg_iov=[{iov_base="4\0\0\0(\21\0\0\0\0\0\0\234\25\0\0[\300\213\3725\333\374!\1lmtpd\0\0"..., > iov_len=4392}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4392 > epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=6, u64=6}}expand: no forward > for user lmtpd, just deliver > ) = 0 > epoll_wait(3, expand: 0x56284c3f4338: clearing expand tree > smtp: 0x564267537b60: fd 14 from queue > smtp: 0x564267537b60: message fd 14 > smtp: 0x564267537b60: message begin > debug: 0x564267537b60: end of message, error=0 > 21fcdb35fa8bc05b smtp message msgid=22c2f515 size=245 nrcpt=1 proto=ESMTP > 21fcdb35fa8bc05b smtp envelope evpid=22c2f5151c4decec > from= to= > debug: scheduler: evp:22c2f5151c4decec scheduled (mda) > mda: new user 21fcdb36b331cade for ":lmtpd" delivering as "lmtpd" > debug: lka: userinfo :lmtpd > lookup: lookup "lmtpd" as USERINFO in table getpwnam: -> > "115:115:/opt/smptd/var/lmtpd" > debug: mda: new session 21fcdb37f01f7374 for user ":lmtpd" evpid > 22c2f5151c4decec > debug: mda: no more envelope for ":lmtpd" > debug: mda: got message fd 14 for session 21fcdb37f01f7374 evpid > 22c2f5151c4decec > debug: mda: querying mda fd for session 21fcdb37f01f7374 evpid > 22c2f5151c4decec > [{EPOLLIN, {u32=7, u64=7}}], 32, -1) = 1 > epoll_ctl(3, EPOLL_CTL_DEL, 7, 0x7ffeb16e607c) = 0 > socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 12 > socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) =
Re: Virtual User handling
So it is a binary, thats useful information. Having specified /opt/smtpd as prefix during ./configure, it is located here: /opt/smptd/libexec/opensmtpd/mail.lmtp Throw it in /usr/local/libexec/smtpd/ and see what happens. May be a build tools bug. Excellent idea, however, the error stays the same. No change, despite copying the whole opensmtpd folder to /usr/local/libexec Even strace does not reveal the path it is looking for: expand: 0x56284c3f4338: expand_insert() called for address:m...@example.com[parent=(nil), rule=(nil)] expand: 0x56284c3f4338: inserted node 0x56284c3f6030 expand: lka_expand: address: m...@example.com [depth=0] lookup: match "37.120.186.114" as NETADDR in table static: -> true lookup: match "example.com" as DOMAIN in table static: -> true rule #1 matched: match from any for domain action deliver lookup: lookup "m...@example.com" as ALIAS in table static:vusers -> none lookup: lookup "mary" as ALIAS in table static:vusers -> none lookup: lookup "@example.com" as ALIAS in table static:vusers -> none lookup: lookup "@" as ALIAS in table static:vusers -> "lmtpd" expand: 0x56284c3f3b10: expand_insert() called for username:lmtpd[parent=(nil), rule=(nil)] expand: 0x56284c3f3b10: inserted node 0x56284c3f6590 expand: 0x56284c3f4338: expand_insert() called for username:lmtpd[parent=0x56284c3f6030, rule=0x56284c403e50, dispatcher=0x56284c405750] expand: 0x56284c3f4338: inserted node 0x56284c3f6af0 expand: 0x56284c3f3b10: clearing expand tree expand: 0x56284c3f3b10: freeing expand tree debug: aliases_virtual_get: '@example.com' resolved to 1 nodes expand: lka_expand: username: lmtpd [depth=1, sameuser=0] lookup: lookup "lmtpd@" as ALIAS in table static:vusers -> none lookup: lookup "lmtpd" as ALIAS in table static:vusers -> none lookup: lookup "@" as ALIAS in table static:vusers -> "lmtpd" expand: 0x56284c3ed110: expand_insert() called for username:lmtpd[parent=(nil), rule=(nil)] expand: 0x56284c3ed110: inserted node 0x56284c3f6590 expand: 0x56284c3f4338: expand_insert() called for username:lmtpd[parent=0x56284c3f6af0, rule=0x56284c403e50, dispatcher=0x56284c405750] expand: 0x56284c3f4338: setting sameuser = 1 expand: 0x56284c3f4338: inserted node 0x56284c3f7050 expand: 0x56284c3ed110: clearing expand tree expand: 0x56284c3ed110: freeing expand tree debug: aliases_virtual_get: '@' resolved to 1 nodes expand: lka_expand: username: lmtpd [depth=2, sameuser=1] lookup: lookup "lmtpd" as USERINFO in table getpwnam: -> "115:115:/opt/smptd/var/lmtpd" [{EPOLLIN, {u32=6, u64=6}}], 32, -1) = 1 epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffeb16e607c) = 0 socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 12 socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 13 close(12) = 0 close(13) = 0 recvmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="4\0\0\0(\21\0\0\0\0\0\0\237\25\0\0[\300\213\3725\333\374!\0lmtpd\0\0"..., iov_len=65535}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4392 stat("/opt/smptd/var/lmtpd", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 openat(AT_FDCWD, "/opt/smptd/var/lmtpd/.forward", O_RDONLY|O_NONBLOCK|O_NOFOLLOW) = -1 ENOENT (No such file or directory) epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLOUT, {u32=6, u64=6}}) = 0 epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffeb16e5fdc) = 0 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLOUT, {u32=6, u64=6}}) = 0 epoll_wait(3, [{EPOLLOUT, {u32=6, u64=6}}], 32, -1) = 1 epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffeb16e607c) = 0 sendmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="4\0\0\0(\21\0\0\0\0\0\0\234\25\0\0[\300\213\3725\333\374!\1lmtpd\0\0"..., iov_len=4392}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4392 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=6, u64=6}}expand: no .forward for user lmtpd, just deliver ) = 0 epoll_wait(3, expand: 0x56284c3f4338: clearing expand tree smtp: 0x564267537b60: fd 14 from queue smtp: 0x564267537b60: message fd 14 smtp: 0x564267537b60: message begin debug: 0x564267537b60: end of message, error=0 21fcdb35fa8bc05b smtp message msgid=22c2f515 size=245 nrcpt=1 proto=ESMTP 21fcdb35fa8bc05b smtp envelope evpid=22c2f5151c4decec from= to= debug: scheduler: evp:22c2f5151c4decec scheduled (mda) mda: new user 21fcdb36b331cade for ":lmtpd" delivering as "lmtpd" debug: lka: userinfo :lmtpd lookup: lookup "lmtpd" as USERINFO in table getpwnam: -> "115:115:/opt/smptd/var/lmtpd" debug: mda: new session 21fcdb37f01f7374 for user ":lmtpd" evpid 22c2f5151c4decec debug: mda: no more envelope for ":lmtpd" debug: mda: got message fd 14 for session 21fcdb37f01f7374 evpid 22c2f5151c4decec debug: mda: querying mda fd for session 21fcdb37f01f7374 evpid 22c2f5151c4decec [{EPOLLIN, {u32=7, u64=7}}], 32, -1) = 1 epoll_ctl(3, EPOLL_CTL_DEL, 7, 0x7ffeb16e607c) = 0 socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 12 socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 13 close(12) = 0 close(13) = 0 recvmsg(7, {