Issue with Rspamd learning (IMAPSieve) on Dovecot 2.4.1 (Debian 13)

Discussion in 'Installation/Configuration' started by Adrian-Pasmionka, Apr 7, 2026 at 2:44 PM.

  1. Adrian-Pasmionka

    Adrian-Pasmionka New Member

    Hello all,

    I’ve been spending the last few hours trying to get a fresh ISPConfig install to handle Rspamd learning (moving emails to Junk), but I’m hitting a wall with Dovecot 2.4.1. It seems this version completely changes the rules, and the old tutorials/templates for dovecot.conf just dosen't work :(

    What I’ve tried:

    • Section Errors: I tried adding the standard plugin { ... } block to set the imapsieve paths. Dovecot fails to start with: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: Unknown section name: plugin It seems the global plugin block is no longer recognized in the same way in 2.4.x.

    • New Syntax Failure: I tried the "flat" syntax (e.g., plugin/sieve_plugins), but that also fails with an Unknown setting error. Even worse, it triggers dependency errors regarding the quota plugin: Error: Couldn't load required plugin /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: Plugin quota must be loaded also (you must set: mail_plugins=$mail_plugins quota)

    • IMAP Conflicts: If I add the sieve plugin to protocol imap (traditional method), Dovecot crashes with an undefined symbol error. It only accepts imap_sieve, but without a working plugin section or flat equivalent, I have no way to define the imapsieve_mailbox parameters and trigger the learning scripts.
    Code:
    # load plugin
    plugin/sieve_plugins = sieve_imapsieve
    # spam
    plugin/imapsieve_mailbox1_name = Junk
    plugin/imapsieve_mailbox1_causes = COPY APPEND
    plugin/imapsieve_mailbox1_before = file:/var/vmail/rspamd-learn-spam.sieve
    # ham
    plugin/imapsieve_mailbox2_name = *
    plugin/imapsieve_mailbox2_from = Junk
    plugin/imapsieve_mailbox2_causes = COPY
    plugin/imapsieve_mailbox2_before = file:/var/vmail/rspamd-learn-ham.sieve
    
    the mail service itself is working fine (users can log in, mail is flowing), but Rspamd learning is stuck. Moving messages between folders and Junk does not trigger the rspamc pipe because the configuration for those triggers is rejected by the Dovecot 2.4 parser.

    Code:
    root@ns1:~# rspamc stat
    ...
    Messages learned: 16
    Total learns: 16 <======= (Static - no increase on move to Junk)
    
    Does anyone have a working dovecot.conf example specifically for version 2.4.x? Or at least some info on how to properly define imapsieve_mailbox parameters now that both the old plugin {} block and the flat plugin/ prefix are being rejected?

    Thanks for the help!
     
  2. uacnix

    uacnix New Member

    ISPConfig's basically any in-depth spamfilter manual/docs is a damn blackbox- nothing ever works properly, I have a huge list of either:
    complete@adress. tld
    *@address. tld
    @address. tld
    in spamfilter whitelist, as we llas the same in postfix whitelist in UI, and I still can't receive emails, this is a damn joke and there's not a single plain document on how to configure the damn thing.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    I do not use Email learning in Rspamd, so I do not have a config at hand for that. But you can probably convert your old config using Claude or ChatGPT. The config syntax in Dovecot 2.4 changed completely.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    First, please do not hijack threads of other users, your post is not related to the topic of the thread starter. There is plenty of documentation available on the Rspamd website: https://docs.rspamd.com/. Configuring Rspamd is not ISPConfig-specific. The Rspamd ISPConfig spam filter typically works out of the box, so no adjustments are needed. If you cannot receive mail, then you should check the mail.log and mail headers to see why this is the case on your system. You can also use the rspamd GUI to get more details. And please make a new thread for your issue.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    @Adrian-Pasmionka In case you have not seen the example from Dovecot 2.4 docs for spam learning, here is the link: https://doc.dovecot.org/2.4.3/core/config/spam_reporting.html

    Also, the warning on that page:

     

Share This Page