🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
2 messages
2 total messages Started by Ger Sat, 17 Oct 2026 22:20
Bug#1151187: dovecot-sieve: undefined reference to mail_deliver_ctx_get_log_var_expand_table breaks sieve plugin in IMAP service
#1212
Author: Ger
Date: Sat, 17 Oct 2026 22:20
27 lines
3108 bytes
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).
Bug#1151187: dovecot-sieve: undefined reference to mail_deliver_ctx_get_log_var_expand_table breaks sieve plugin in IMAP service
#1228
Author: Noah Meyerhans
Date: Sun, 18 Oct 2026 02:40
50 lines
3852 bytes
On Sat, Oct 17, 2026 at 05:56:47PM -0400, Ger wrote:
> 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.

I don't see this, at least on amd64.

It's defined in libdovecot-lda:
root@c9c251285d2c:/# nm -D -U /usr/lib/dovecot/libdovecot-lda.so.0 | grep log_var_expand
00000000000076a0 T mail_deliver_ctx_get_log_var_expand_table

But I don't see a reference to it in libdovecot-sieve.so:
root@c9c251285d2c:/# nm -D -u /usr/lib/dovecot/libdovecot-sieve.so.0.0.0 | grep log_var_expand | wc -l

0
root@c9c251285d2c:/# nm -D -u /usr/lib/dovecot/libdovecot-sieve.so.0.0.0 | wc -l
458

root@c9c251285d2c:/# dpkg -S libdovecot-sieve.so.0.0.0
dovecot-sieve: /usr/lib/dovecot/libdovecot-sieve.so.0.0.0
root@c9c251285d2c:/# apt policy dovecot-sieve
dovecot-sieve:
  Installed: 1:2.4.1+dfsg1-6+deb13u7
  Candidate: 1:2.4.1+dfsg1-6+deb13u7
  Version table:
 *** 1:2.4.1+dfsg1-6+deb13u7 500
        500 http://deb.debian.org/debian-security trixie-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1:2.4.1+dfsg1-6+deb13u6 500
        500 http://deb.debian.org/debian trixie/main amd64 Packages


What architecture are you using?

noah
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads