It's working now. Here is how I build it:

./configure --sysconfdir=/usr/local/etc/mail/ --with-path-CAfile=/usr/local/share/certs/ca-root-nss.crt --with-bundled-libtls --with-bundled-libtls --with-bundled-libasr --with-libevent=/usr/local --with-user-smtpd=_smtpd --with-user-queue=_smtpq --with-path-mbox=/var/mail

I have added --with-bundled-libtls --with-bundled-libasr

With there options I was not able to build it with libressl 3.7.3 and 3.8.0 so I build it with OpenSSL from base and it's working now.

Here is error when I tried to build it with libressl-3.7.3:

...
libtool: link: cc -DIO_TLS -pipe -O0 -g3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Qunused-arguments -Wunknown-warning-option -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-meml,-rpath -Wl,/usr/local/lib -fstack-protector-strong -o smtpd ../../usr.sbin/smtpd/smtpd-aliases.o ../../usr.sbin/smtpd/smtpd-bounce.o ../../usr.sbin/smtpd/smtpd-ca.o ../../usr.sbin/smtpd/smtpd-compress_backend.o ../../usr.sbin/smtpd/smtpd-config.o ../../usr.sbin/smtpd/smtpd-control.o ../../usr.sbin/smtpd/smtpd-dict.o ../../usr.sbin/smtpd/smtpd-dispatcher.o ../../usr.sbin/smtpd/smtpd-dns.o ../../usr.sbin/smtpd/smtpd-esc.o ../../usr.sbin/smtpd/smtpd-envelope.o ../../usr.sbin/smtpd/smtpd-expand.o ../../usr.sbin/smtpd/smtpd-forward.o ../../usr.sbin/smtpd/smtpd-iobuf.o ../../usr.sbin/smtpd/smtpd-limit.o ../../usr.sbin/smtpd/smtpd-lka.o ../../usr.sbin/smtpd/smtpd-lka_filter.o ../../usr.sbin/smtpd/smtpd-lka_session.o ../../usr.sbin/smtpd/smtpd-log.o ../../usr.sbin/smtpd/smtpd-mda.o ../../usr.sbin/smtpd/smtpd-mda_mbox.o ../../usr.sbin/smtpd/smtpd-mda_unpriv.o ../../usr.sbin/smtpd/smtpd-mda_variables.o ../../usr.sbin/smtpd/smtpd-mproc.o ../../usr.sbin/smtpd/smtpd-mailaddr.o ../../usr.sbin/smtpd/smtpd-mta.o ../../usr.sbin/smtpd/smtpd-mta_session.o ../../usr.sbin/smtpd/smtpd-parse.o ../../usr.sbin/smtpd/smtpd-proxy.o ../../usr.sbin/smtpd/smtpd-queue.o ../../usr.sbin/smtpd/smtpd-queue_backend.o ../../usr.sbin/smtpd/smtpd-report_smtp.o ../../usr.sbin/smtpd/smtpd-resolver.o ../../usr.sbin/smtpd/smtpd-rfc5322.o ../../usr.sbin/smtpd/smtpd-ruleset.o ../../usr.sbin/smtpd/smtpd-runq.o ../../usr.sbin/smtpd/smtpd-scheduler.o ../../usr.sbin/smtpd/smtpd-scheduler_backend.o ../../usr.sbin/smtpd/smtpd-smtp.o ../../usr.sbin/smtpd/smtpd-smtp_session.o ../../usr.sbin/smtpd/smtpd-smtpd.o ../../usr.sbin/smtpd/smtpd-srs.o ../../usr.sbin/smtpd/smtpd-ssl.o ../../usr.sbin/smtpd/smtpd-stat_backend.o ../../usr.sbin/smtpd/smtpd-table.o ../../usr.sbin/smtpd/smtpd-to.o ../../usr.sbin/smtpd/smtpd-tree.o ../../usr.sbin/smtpd/smtpd-unpack_dns.o ../../usr.sbin/smtpd/smtpd-util.o ../../usr.sbin/smtpd/smtpd-waitq.o ../../usr.sbin/smtpd/smtpd-ioev.o ../../usr.sbin/smtpd/smtpd-crypto.o ../../usr.sbin/smtpd/smtpd-compress_gzip.o ../../usr.sbin/smtpd/smtpd-table_db.o ../../usr.sbin/smtpd/smtpd-table_getpwnam.o ../../usr.sbin/smtpd/smtpd-table_proc.o ../../usr.sbin/smtpd/smtpd-table_static.o ../../usr.sbin/smtpd/smtpd-queue_fs.o ../../usr.sbin/smtpd/smtpd-queue_null.o ../../usr.sbin/smtpd/smtpd-queue_proc.o ../../usr.sbin/smtpd/smtpd-queue_ram.o ../../usr.sbin/smtpd/smtpd-scheduler_null.o ../../usr.sbin/smtpd/smtpd-scheduler_proc.o ../../usr.sbin/smtpd/smtpd-scheduler_ramqueue.o ../../usr.sbin/smtpd/smtpd-stat_ramstat.o -L/usr/local/lib ../../openbsd-compat/libopenbsd.a -lz -lcrypto -lssl -levent -lcrypt -lutil -lpam -ldl
ld: error: undefined symbol: X509_LOOKUP_meth_new
>>> referenced by by_mem.c:85 (libtls/by_mem.c:85)
>>> by_mem.o:(X509_LOOKUP_mem) in archive ../../openbsd-compat/libopenbsd.a

ld: error: undefined symbol: X509_LOOKUP_meth_set_ctrl
>>> referenced by by_mem.c:86 (libtls/by_mem.c:86)
>>> by_mem.o:(X509_LOOKUP_mem) in archive ../../openbsd-compat/libopenbsd.a

ld: error: undefined symbol: X509_LOOKUP_get_store
>>> referenced by by_mem.c:115 (libtls/by_mem.c:115)
>>> by_mem.o:(by_mem_ctrl) in archive ../../openbsd-compat/libopenbsd.a
>>> referenced by by_mem.c:121 (libtls/by_mem.c:121)
>>> by_mem.o:(by_mem_ctrl) in archive ../../openbsd-compat/libopenbsd.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [smtpd] Error code 1


Petr

Dne 18. 06. 23 v 16:30 Omar Polo napsal(a):
On 2023/06/18 14:09:52 +0200, Petr <i...@admin.jevklidu.cz> wrote:
Hello.

I am trying new OpenSMTPD 7.3.0p0 on FreeBSD 13.2. I have it compiled
with LibreSSL 3.7.3. When mail is send from this server or is received
from outside, smtpd crashes.

What could be wrong please?

Here is trace output while processing incomming mail:

# /usr/local/sbin/smtpd -d -T all -f /usr/local/etc/mail/smtpd.conf
[...]
imsg: lka <- dispatcher: IMSG_??? (139) (len=42)

If I'm counting right, IMSG #139 is IMSG_REPORT_SMTP_FILTER_RESPONSE
(which was forgotten in the big switch in imsg_to_str...)

Can you please share you configuration and the version of the filters
you're using?

it also would be great if you could manage to extract a stacktrace
from the crash.  To do so, please build with debug symbols enabled
(make `WITH_DEBUG=yes' if you're building from the FreeBSD port tree,
something like ./configure CFLAGS='-O0 -g3' otherwise)

Thank you!

imsg: lka <- dispatcher: IMSG_REPORT_SMTP_PROTOCOL_SERVER (len=63)
smtpd: process dispatcher socket closed
root@mail:~ # passwd[59715]: warn: table-api: pipe closed

Thanks you,

Petr




Reply via email to