Package: dovecot-sieve
Version: 1:2.4.1+dfsg1-6+deb13u7
Severity: important

libdovecot-sieve.so.0 in the Debian build contains an undefined reference to
mail_deliver_ctx_get_log_var_expand_table, which is defined in
/usr/lib/dovecot/libdovecot-lda.so.0, but the sieve library is not linked
against libdovecot-lda. In Dovecot 2.4 each service is a separate binary
(e.g. /usr/lib/dovecot/imap) that does not link libdovecot-lda, so dlopen()
of the pigeonhole sieve plugin from the IMAP service fails with:

  undefined symbol: mail_deliver_ctx_get_log_var_expand_table

This breaks any IMAP-context use of libdovecot-sieve, e.g. the sieve-imapsieve
event hook used for antispam training on mailbox COPY events. The symbol only
resolves in binaries that already have libdovecot-lda loaded, so the delivery
side (lda/lmtp) works while IMAP event handling does not.

Verification on this system:
  nm -D -u /usr/lib/dovecot/libdovecot-sieve.so.0.0.0 | grep log_var_expand
  -> U mail_deliver_ctx_get_log_var_expand_table
  readelf -d shows only libc.so.6 as NEEDED for the sieve library.

Workaround in use locally: LD_PRELOAD of libdovecot-lda.so.0 applied at
service exec via a wrapper script (a systemd Environment= drop-in alone is
insufficient because the Dovecot master sanitizes the environment before
exec'ing service binaries).

Reply via email to