#1142940 cyrus-imapd: sieveshell is broken - managesieve not built with libcaps

Package:
cyrus-imapd
Source:
cyrus-imapd
Description:
Cyrus mail system - IMAP support
Submitter:
Edmund Lodewijks
Date:
2026-07-28 12:12:34 UTC
Severity:
normal
Tags:
#1142940#5
Date:
2026-07-28 12:11:51 UTC
From:
To:
Dear Maintainer,

The `Cyrus::SIEVE::managesieve` Perl module (used by `sieveshell`) fails to load at runtime:

```
Can't load '.../auto/Cyrus/SIEVE/managesieve/managesieve.so' for module Cyrus::SIEVE::managesieve: .../managesieve.so: undefined symbol: cap_free  at .../sieveshell line 71.
Compilation failed in require at .../sieveshell line 71.
BEGIN failed--compilation aborted at .../sieveshell line 71.
```

### Cause

`perl/sieve/managesieve/Makefile.PL.in`'s `LIBS` list does not have `@LIBCAP_LIBS@` (unlike `perl/imap/Makefile.PL.in`).

This breaks `sieveshell` on builds that are built with `--with-libcap` (e.g. Debian).

Since `libcyrus_min.a` (linked in as `MYEXTLIB`, so its own link requirements don't propagate) calls `cap_free()` when built `--with-libcap`, `managesieve.so` ends up with an undefined symbol at dlopen time, breaking `sieveshell`.

Fix by adding `@LIBCAP_LIBS@` to `LIBS`, matching perl/imap.

Reported upstream:
- For 3.10: https://github.com/cyrusimap/cyrus-imapd/pull/6186
- For 3.12: https://github.com/cyrusimap/cyrus-imapd/pull/6185

Kind regards,

    Edmund